voip and freepbx / asterisk
-
maybe there is some expert here that can give me some hints
sorry this has nothing to do with pfSenseso I have configured a voip trunk to a FreePBX behind pfsense,
I can make calls but I can't receivethis voip use the TEL URI scheme so I'm using chan_sip
if you have any suggestions on where I should look to make it work thanks
<-------------> [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 0 [ 53]: INVITE sip:0039XXXXXXXX@217.133.80.167:5060 SIP/2.0 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 1 [ 74]: Via: SIP/2.0/UDP 94.32.130.112:5060;branch=z9hG4bKda2812d8d8cf6f1ecb5ctaN0 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 2 [ 49]: To: <sip:0039XXXXXXXX@94.32.130.112;user=phone> [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 3 [ 77]: From: <tel:0039XXXXXXXXX>;tag=ztesip-OuI1Xd1pFvXrhAVYtGwr5x*2-2-20481*cdej.2 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 4 [ 37]: Call-ID: bM4IWJIsW1O_Hsrq2debc@zteims [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 5 [ 17]: CSeq: 1000 INVITE [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 6 [ 16]: Max-Forwards: 63 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 7 [ 74]: Contact: <sip:0039XXXXXXX@94.32.130.112:5060;zte-did=2-2-20481-3760-12> [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 8 [ 69]: P-Called-Party-ID: "?"<sip:0039XXXXXXX@ims.tiscali.net;user=phone> [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 9 [ 23]: Supported: 100rel,timer [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 10 [ 24]: P-Early-Media: supported [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 11 [ 37]: P-Asserted-Identity: <tel:373XXXXXX> [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 12 [ 57]: X-ZTE-Cookie: 7zs4rm21;id=8FD5715F48A9390000@10.253.2.205 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 13 [ 88]: Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,UPDATE,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,MESSAGE [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 14 [ 10]: Min-SE: 90 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 15 [ 35]: Session-Expires: 1800;refresher=uac [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 16 [ 29]: Content-Type: application/sdp [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 17 [ 19]: Content-Length: 235 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 18 [ 28]: Content-Disposition: session [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Header 19 [ 0]: [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 0 [ 3]: v=0 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 1 [ 52]: o=UTSTARCOM 894511378 779705889 IN IP4 94.32.130.114 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 2 [ 3]: s=- [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 3 [ 22]: c=IN IP4 94.32.130.114 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 4 [ 5]: t=0 0 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 5 [ 30]: m=audio 37904 RTP/AVP 8 18 100 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 6 [ 10]: a=sendrecv [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 7 [ 21]: a=rtpmap:18 G729/8000 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 8 [ 19]: a=fmtp:18 annexb=no [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 9 [ 33]: a=rtpmap:100 telephone-event/8000 [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Body 10 [ 15]: a=fmtp:100 0-15 [2020-09-28 12:22:40] VERBOSE[1901] chan_sip.c: --- (19 headers 11 lines) --- [2020-09-28 12:22:40] DEBUG[1901] acl.c: For destination '94.32.130.112', our source address is '192.168.50.1'. [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Target address 94.32.130.112:5060 is not local, substituting externaddr [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Setting AST_TRANSPORT_UDP with address 217.133.80.167:5060 [2020-09-28 12:22:40] VERBOSE[1901] chan_sip.c: Sending to 94.32.130.112:5060 (no NAT) [2020-09-28 12:22:40] DEBUG[1901] chan_sip.c: Allocating new SIP dialog for bM4IWJIsW1O_Hsrq2debc@zteims - INVITE (No RTP) [2020-09-28 12:22:40] DEBUG[1901][C-0000001d] chan_sip.c: **** Received INVITE (5) - Command in SIP INVITE [2020-09-28 12:22:40] DEBUG[1901][C-0000001d] sip/reqresp_parser.c: Begin: parsing SIP "Supported: 100rel,timer" [2020-09-28 12:22:40] DEBUG[1901][C-0000001d] sip/reqresp_parser.c: Found SIP option: -100rel- [2020-09-28 12:22:40] DEBUG[1901][C-0000001d] sip/reqresp_parser.c: Matched SIP option: 100rel [2020-09-28 12:22:40] DEBUG[1901][C-0000001d] sip/reqresp_parser.c: Found SIP option: -timer- [2020-09-28 12:22:40] DEBUG[1901][C-0000001d] sip/reqresp_parser.c: Matched SIP option: timer [2020-09-28 12:22:40] VERBOSE[1901][C-0000001d] chan_sip.c: Sending to 94.32.130.112:5060 (no NAT) [2020-09-28 12:22:40] DEBUG[1901][C-0000001d] chan_sip.c: Initializing initreq for method INVITE - callid bM4IWJIsW1O_Hsrq2debc@zteims [2020-09-28 12:22:40] VERBOSE[1901][C-0000001d] chan_sip.c: Using INVITE request as basis request - bM4IWJIsW1O_Hsrq2debc@zteims [2020-09-28 12:22:40] DEBUG[1901][C-0000001d] sip/reqresp_parser.c: No RFC 3966 global number or context found in '0039XXXXXXX'; returning local number anyway [2020-09-28 12:22:40] NOTICE[1901][C-0000001d] chan_sip.c: From address missing 'sip:', using it anyway [2020-09-28 12:22:40] ERROR[1901][C-0000001d] chan_sip.c: Empty domain name in FROM header [2020-09-28 12:22:40] NOTICE[1901][C-0000001d] chan_sip.c: Unexpected error for device <tel:0039XXXXXXXXX>;tag=ztesip-OuI1Xd1pFvXrhAVYtGwr5x*2-2-20481*cdej.2 for INVITE, code = -100 [2020-09-28 12:22:40] VERBOSE[1901][C-0000001d] chan_sip.c: <--- Reliably Transmitting (no NAT) to 94.32.130.112:5060 ---> SIP/2.0 503 Service Unavailable Via: SIP/2.0/UDP 94.32.130.112:5060;branch=z9hG4bKda2812d8d8cf6f1ecb5ctaN0;received=94.32.130.112
-
You see that same 'From address' error when calling from any external client?
-
no error when calling, anyway
I found the problem in the meantime
this Isp is not respecting the RFCsip/reqresp_parser.c: No RFC 3966 global number or context found
this is because instead of using +39 it's using 0039.
the parser expects to find a '+'
the solution for me was to recompile Asterisk after modifying reqresp_parser.c replacing + with 0
-
Ah, nice catch. Nice fix!
ISPs.