Connecting a Fujitsu SS-170A to Asterisk

November 15, 2018 8:56 pm Published by Leave your thoughts

For those looking for it, saving you some time: the default NW-Password (NWパスワード) for the SS-170A is: 999999

The Fujitsu SS-170A, while is a darn good looking IP phone, seems to have been designed for some kind of a satellite or trunk phone system. Other than that, I can’t really explain why, when you pick up the receiver, this happens:

<--- SIP read from UDP::5060 --->
MESSAGE sip:[email protected]:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK2621781087c1096064fa949
From: "number" :5060;user=phone>;tag=2621781087c1096064fa949;fjline-hunt=ML-141
To: :5060;user=phone>
CSeq: 1 MESSAGE
Call-ID: [email protected]
Content-Length: 0
Max-Forwards: 70
User-Agent: Fujitsu SS-170A/B/C V02L001C06

<------------->
--- (9 headers 0 lines) ---
Sending to :5060 (NAT)
Receiving message!

<--- Transmitting (NAT) to :5060 --->
SIP/2.0 415 Unsupported Media Type
Via: SIP/2.0/UDP :5060;branch=z9hG4bK2621781087c1096064fa949;received=;rport=5060
From: "number" :5060;user=phone>;tag=2621781087c1096064fa949;fjline-hunt=ML-141
To: :5060;user=phone>;tag=as7f612584
Call-ID: [email protected]
CSeq: 1 MESSAGE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0

<------------>

and it starts to do long beeps, meaning there is no phone line to call, and stops responding to any input.

I posted a question on StackOverflow and user arheops suggested me to fiddle with the accept_outofcall_message = yes setting, which didn’t result in anything.

However, following their lead, I stumbled upon this line in Asterisk’s channels/chan_sip.c file:
if (strncmp(content_type, "text/plain", strlen("text/plain"))) { /* No text/plain attachment */
transmit_response(p, "415 Unsupported Media Type", req); /* Good enough, or? */

Which is even before the setting is being checked!

Now, the proper way to fix it would be adjusting the chan_sip.c file and rebuilding Asterisk, but being the lazy arse I am, I just loaded chan_sip.so in HxD, searched for “text/plain”, and overwrote the following “415 Unsupported Media Type” literal with a “200 OK ” (extra spaces to keep file size).

And presto! It works.
At least when calling from the phone, but as it turns out, not receiving incoming calls.
And I can’t check voicemail either, because it won’t send any inband or out of band DTMF at all.

To cut a long story short: don’t buy a SIP phone on a shady used electronics sale just because it’s cheap and looks cool, vendor-specific protocols can be a PITA.

Categorised in: ,


Leave a Reply

Your email address will not be published. Required fields are marked *