TLDR:: Looks registered, but call requests ignored
Hello folks,
My ISP provides a “free” phone service with the cable internet service, but the catch is you MUST use an analog phone attached to their software crippled, low powered wifi router. By assorted devious means, I’ve extracted my SIP account username/password/proxy/domain, and they work fine in a softphone (PhonerLite) on my PC using a much better router I have full control of.
However . . . the same details do not work successfully when transferred into my FreePBX. Asterisk appears to register successfully, but call attempts fail, with a “critical response timeout”.
I’ve fired up Wireshark and observed some interesting behavior when FreePBX tries to register. The first REGISTER request gets a 200 OK response (!) from the ISP, and my Asterisk thinks all is good. This is not correct. The ISP should reply with a 401 UNAUTHORISED response to trigger a password exchange. This happens with the softphone and the ISP router, but not Asterisk. When Asterisk sends an INVITE to start a call, it is ignored, and gets no response at all, which is why I a get a “critical response timeout”
The only significant? difference between operational REGISTER requests of ISP router (and the softphone on my PC) and the non-functional requests of FreePBX is the inclusion of an Allow: field. According to the standard, this is optional and can be negotiated in later OPTION or INVITE requests. It’s not the non-standard port number I use, the softphone on my PC uses the same number and it work fine, and I’ve tried changing the user-agent so it does not say FPBX to no avail. I’m obviously missing something.
This is the FreePBX REGISTER request, it gets and immediate 200 OK reply, it should get a 401 UNAUTHORIZED to trigger the password exchange:-
xxxx – My public IP
nnnn = My phone number and user name.
Session Initiation Protocol (REGISTER) Request-Line: REGISTER sip:ims01.yesphone.optus.com.au SIP/2.0 Method: REGISTER Request-URI: sip:ims01.yesphone.optus.com.au Request-URI Host Part: ims01.yesphone.optus.com.au [Resent Packet: False] Message Header Via: SIP/2.0/UDP 114.xxx.xxx.xxx:8494;branch=z9hG4bK4e8bb3f8;rport Transport: UDP Sent-by Address: 114.xxx.xxx.xxx Sent-by port: 8494 Branch: z9hG4bK4e8bb3f8 RPort: rport Max-Forwards: 70 From: ;tag=as418133d5 SIP from address: sip:[email protected] SIP from address User Part: +6129nnnnnnn E.164 number (MSISDN): 6129nnnnnnn Country Code: Australia (61) SIP from address Host Part: ims01.yesphone.optus.com.au SIP from tag: as418133d5 To: SIP to address: sip:[email protected] SIP to address User Part: +6129nnnnnnn E.164 number (MSISDN): 6129nnnnnnn Country Code: Australia (61) SIP to address Host Part: ims01.yesphone.optus.com.au Call-ID: [email protected] [Generated Call-ID: [email protected]] CSeq: 102 REGISTER Sequence Number: 102 Method: REGISTER Supported: replaces, timer User-Agent: FPBX-13.0.197.14(13.28.1) Expires: 1800 Contact: Contact URI: sip:[email protected]:8494 Contact URI User Part: +6129nnnnnnn E.164 number (MSISDN): 6129nnnnnnn Contact URI Host Part: 114.xxx.xxx.xxx Contact URI Host Port: 8494 Content-Length: 0
Here is the first REGISTER Request the ISP’s router sends, it (correctly) gets a 401 Unauthorized response and proceeds to the password exchange.
Session Initiation Protocol (REGISTER) Request-Line: REGISTER sip:ims01.yesphone.optus.com.au SIP/2.0 Method: REGISTER Request-URI: sip:ims01.yesphone.optus.com.au Request-URI Host Part: ims01.yesphone.optus.com.au [Resent Packet: False] Message Header From: ;tag=7c9190-ea654972-13c4-6006-b-49167107-b SIP from address: sip:[email protected] SIP from address User Part: +6129nnnnnnn E.164 number (MSISDN): 6129nnnnnnn Country Code: Australia (61) SIP from address Host Part: ims01.yesphone.optus.com.au SIP from tag: 7c9190-ea654972-13c4-6006-b-49167107-b To: SIP to address: sip:[email protected] SIP to address User Part: +6129nnnnnnn E.164 number (MSISDN): 6129nnnnnnn Country Code: Australia (61) SIP to address Host Part: ims01.yesphone.optus.com.au Call-ID: 7dcaa0-ea654972-13c4-6006-b-59ac0ed9-b [Generated Call-ID: 7dcaa0-ea654972-13c4-6006-b-59ac0ed9-b] CSeq: 1 REGISTER Sequence Number: 1 Method: REGISTER Via: SIP/2.0/UDP 114.xxx.xxx.xxx:5060;rport;branch=z9hG4bK-b-2bdc-484b814d-7be440 Transport: UDP Sent-by Address: 114.xxx.xxx.xxx Sent-by port: 5060 RPort: rport Branch: z9hG4bK-b-2bdc-484b814d-7be440 Max-Forwards: 70 Session-ID: 889affa09ae91634df00465fa567d046 sess-id: 889affa09ae91634df00465fa567d046 Supported: replaces,path,199,100rel User-Agent: SAGEMCOM / FAST5366 / BCM63138 Expires: 3600 Contact: Contact URI: sip:[email protected]:5060 Contact URI User Part: +6129nnnnnnn E.164 number (MSISDN): 6129nnnnnnn Country Code: Australia (61) Contact URI Host Part: 114.xxx.xxx.xxx Contact URI Host Port: 5060 Allow: INVITE,ACK,PRACK,CANCEL,BYE,NOTIFY,OPTIONS,REFER,UPDATE Content-Length: 0
FreePBX Configuration
Peer Details:
username=+6129nnnnnnn
type=friend
trustrpid=yes
sendrpid=yes
secret=secret
qualify=yes
outboundproxy=210.49.225.85
insecure=port,invite
host=ims01.yesphone.optus.com.au
fromuser=+6129nnnnnnn
fromdomain=ims01.yesphone.optus.com.au
disallow=all
directmedia=no
canreinvite=no
allow=alaw
Register String:
[email protected]:secret:[email protected]:5060/+6129nnnnnnn
Any help/suggestions would be appreciated.