FreePBX behind NAT no audio at all


(Vcba79) #1

Hello, Everyone

I am new to FreePBX and my box works fine with PSTN. Recently, I applied a sip.us trial account and tried to dial through sip but there is no audio and cdr show as answer. This box is behind NAT and all sip firewall rules applied, There is no sip connection blocked when I made sip call. Please give me some hint to solve this problem. Here is the log

> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [out@sub-record-check:8] Return("PJSIP/200-0000000c", "") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:3] ExecIf("PJSIP/200-0000000c", "0 ?Set(CDR(accountcode)=)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:4] Set("PJSIP/200-0000000c", "_ROUTEID=6") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:5] Set("PJSIP/200-0000000c", "_ROUTENAME=US_LOCAL") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:6] Set("PJSIP/200-0000000c", "INTRACOMPANYROUTE=YES") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:7] Set("PJSIP/200-0000000c", "MOHCLASS=default") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:8] Set("PJSIP/200-0000000c", "_CALLERIDNAMEINTERNAL=Grandstream GXP1610") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:9] Set("PJSIP/200-0000000c", "_CALLERIDNUMINTERNAL=200") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:10] Set("PJSIP/200-0000000c", "_EMAILNOTIFICATION=FALSE") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:11] Set("PJSIP/200-0000000c", "_NODEST=") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [118005669810@from-internal:12] Macro("PJSIP/200-0000000c", "dialout-trunk,2,18005669810,,off") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/200-0000000c", "DIAL_TRUNK=2") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:2] ExecIf("PJSIP/200-0000000c", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:3] GosubIf("PJSIP/200-0000000c", "0?sub-pincheck,s,1()") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:4] ExecIf("PJSIP/200-0000000c", "0?Set(CALLERID(num)=200)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:5] GotoIf("PJSIP/200-0000000c", "0?disabletrunk,1") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:6] Set("PJSIP/200-0000000c", "DIAL_NUMBER=18005669810") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:7] Set("PJSIP/200-0000000c", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:8] Set("PJSIP/200-0000000c", "OUTBOUND_GROUP=OUT_2") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:9] Set("PJSIP/200-0000000c", "DIAL_TRUNK_OPTIONS=T") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:10] GotoIf("PJSIP/200-0000000c", "1?nomax") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx_builtins.c: Goto (macro-dialout-trunk,s,12)
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:12] GotoIf("PJSIP/200-0000000c", "1?skipoutcid") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx_builtins.c: Goto (macro-dialout-trunk,s,14)
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/200-0000000c", "0?sub-flp-2,s,1()") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:15] Set("PJSIP/200-0000000c", "OUTNUM=18005669810") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:16] Set("PJSIP/200-0000000c", "custom=PJSIP") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/200-0000000c", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/200-0000000c", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:19] Macro("PJSIP/200-0000000c", "dialout-trunk-predial-hook,") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/200-0000000c", "") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:20] GotoIf("PJSIP/200-0000000c", "0?skipcrm") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:21] Set("PJSIP/200-0000000c", "__CRM_DIRECTION=OUTBOUND") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:22] Set("PJSIP/200-0000000c", "__CRM_DESTINATION=18005669810") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:23] Set("PJSIP/200-0000000c", "__CRM_SOURCE=200") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:24] AGI("PJSIP/200-0000000c", "agi://127.0.0.1/sangomacrm.agi") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] res_agi.c: <PJSIP/200-0000000c>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:25] Set("PJSIP/200-0000000c", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:26] NoOp("PJSIP/200-0000000c", "CRM Finished") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:27] GotoIf("PJSIP/200-0000000c", "0?bypass,1") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:28] ExecIf("PJSIP/200-0000000c", "1?Set(CONNECTEDLINE(num,i)=18005669810)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf("PJSIP/200-0000000c", "1?Set(CONNECTEDLINE(name,i)=CID:200)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:30] ExecIf("PJSIP/200-0000000c", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)200)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:31] GotoIf("PJSIP/200-0000000c", "0?customtrunk") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:32] ExecIf("PJSIP/200-0000000c", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:33] Set("PJSIP/200-0000000c", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-dialout-trunk:34] Dial("PJSIP/200-0000000c", "PJSIP/18005669810@SIP.US_DEMO,300,Tb(func-apply-sipheaders^s^1,(2))U(sub-send-obroute-email^18005669810^118005669810^2^1595508950^Grandstream GXP1610^200)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] app_stack.c: PJSIP/SIP.US_DEMO-0000000d Internal Gosub(func-apply-sipheaders,s,1(2)) start
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/SIP.US_DEMO-0000000d", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/SIP.US_DEMO-0000000d", "Applying SIP Headers to channel PJSIP/SIP.US_DEMO-0000000d") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/SIP.US_DEMO-0000000d", "TECH=PJSIP") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:4] Set("PJSIP/SIP.US_DEMO-0000000d", "SIPHEADERKEYS=Alert-Info") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/SIP.US_DEMO-0000000d", "1") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:6] Set("PJSIP/SIP.US_DEMO-0000000d", "sipheader=unset") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/SIP.US_DEMO-0000000d", "0?SIPRemoveHeader(Alert-Info:)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/SIP.US_DEMO-0000000d", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
> [2020-07-23 20:55:50] ERROR[28508] res_pjsip_header_funcs.c: No headers had been previously added to this session.
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/SIP.US_DEMO-0000000d", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/SIP.US_DEMO-0000000d", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:11] ExecIf("PJSIP/SIP.US_DEMO-0000000d", "0?SIPAddHeader(Alert-Info:unset)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:12] ExecIf("PJSIP/SIP.US_DEMO-0000000d", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:13] EndWhile("PJSIP/SIP.US_DEMO-0000000d", "") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/SIP.US_DEMO-0000000d", "0") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] pbx.c: Executing [s@func-apply-sipheaders:14] Return("PJSIP/SIP.US_DEMO-0000000d", "") in new stack
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] app_stack.c: Spawn extension (from-pstn, 118005669810, 1) exited non-zero on 'PJSIP/SIP.US_DEMO-0000000d'
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] app_stack.c: PJSIP/SIP.US_DEMO-0000000d Internal Gosub(func-apply-sipheaders,s,1(2)) complete GOSUB_RETVAL=
> [2020-07-23 20:55:50] VERBOSE[29517][C-00000008] app_dial.c: Called PJSIP/18005669810@SIP.US_DEMO
> [2020-07-23 20:55:51] VERBOSE[29517][C-00000008] app_dial.c: PJSIP/SIP.US_DEMO-0000000d answered PJSIP/200-0000000c
> [2020-07-23 20:55:51] VERBOSE[29517][C-00000008] app_stack.c: PJSIP/SIP.US_DEMO-0000000d Internal Gosub(sub-send-obroute-email,s,1(18005669810,118005669810,2,1595508950,Grandstream GXP1610,200)) start
> [2020-07-23 20:55:51] VERBOSE[29517][C-00000008] pbx.c: Executing [s@sub-send-obroute-email:1] GotoIf("PJSIP/SIP.US_DEMO-0000000d", "0?sendEmail") in new stack
> [2020-07-23 20:55:51] VERBOSE[29517][C-00000008] pbx.c: Executing [s@sub-send-obroute-email:2] NoOp("PJSIP/SIP.US_DEMO-0000000d", "email notifications disabled..exiting.") in new stack
> [2020-07-23 20:55:51] VERBOSE[29517][C-00000008] pbx.c: Executing [s@sub-send-obroute-email:3] Return("PJSIP/SIP.US_DEMO-0000000d", "") in new stack
> [2020-07-23 20:55:51] VERBOSE[29517][C-00000008] app_stack.c: Spawn extension (from-pstn, , 1) exited non-zero on 'PJSIP/SIP.US_DEMO-0000000d'
> [2020-07-23 20:55:51] VERBOSE[29517][C-00000008] app_stack.c: PJSIP/SIP.US_DEMO-0000000d Internal Gosub(sub-send-obroute-email,s,1(18005669810,118005669810,2,1595508950,Grandstream GXP1610,200)) complete GOSUB_RETVAL=
> [2020-07-23 20:55:51] VERBOSE[29529][C-00000008] bridge_channel.c: Channel PJSIP/SIP.US_DEMO-0000000d joined 'simple_bridge' basic-bridge <af5eb25b-5468-46c0-846d-869de5bc8de2>
> [2020-07-23 20:55:51] VERBOSE[29517][C-00000008] bridge_channel.c: Channel PJSIP/200-0000000c joined 'simple_bridge' basic-bridge <af5eb25b-5468-46c0-846d-869de5bc8de2>
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] bridge_channel.c: Channel PJSIP/200-0000000c left 'simple_bridge' basic-bridge <af5eb25b-5468-46c0-846d-869de5bc8de2>
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] app_macro.c: Spawn extension (macro-dialout-trunk, s, 34) exited non-zero on 'PJSIP/200-0000000c' in macro 'dialout-trunk'
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Spawn extension (from-internal, 118005669810, 12) exited non-zero on 'PJSIP/200-0000000c'
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [h@from-internal:1] Macro("PJSIP/200-0000000c", "hangupcall") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/200-0000000c", "1?theend") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx_builtins.c: Goto (macro-hangupcall,s,3)
> [2020-07-23 20:56:17] VERBOSE[29529][C-00000008] bridge_channel.c: Channel PJSIP/SIP.US_DEMO-0000000d left 'simple_bridge' basic-bridge <af5eb25b-5468-46c0-846d-869de5bc8de2>
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("PJSIP/200-0000000c", "0?Set(CDR(recordingfile)=)") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-hangupcall:4] NoOp("PJSIP/200-0000000c", "PJSIP/SIP.US_DEMO-0000000d montior file= ") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-hangupcall:5] GotoIf("PJSIP/200-0000000c", "1?skipagi") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx_builtins.c: Goto (macro-hangupcall,s,7)
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@macro-hangupcall:7] Hangup("PJSIP/200-0000000c", "") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'PJSIP/200-0000000c' in macro 'hangupcall'
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/200-0000000c'
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] app_stack.c: PJSIP/200-0000000c Internal Gosub(crm-hangup,s,1) start
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@crm-hangup:1] NoOp("PJSIP/200-0000000c", "Sending Hangup to CRM") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@crm-hangup:2] NoOp("PJSIP/200-0000000c", "HANGUP CAUSE: 16") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@crm-hangup:3] ExecIf("PJSIP/200-0000000c", "0?Set(__CRM_VOICEMAIL=)") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@crm-hangup:4] NoOp("PJSIP/200-0000000c", "MASTER CHANNEL: 1595508950.14 = 1595508950.14") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@crm-hangup:5] GotoIf("PJSIP/200-0000000c", "0?return") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@crm-hangup:6] Set("PJSIP/200-0000000c", "__CRM_HANGUP=1") in new stack
> [2020-07-23 20:56:17] VERBOSE[29517][C-00000008] pbx.c: Executing [s@crm-hangup:7] AGI("PJSIP/200-0000000c", "agi://127.0.0.1/sangomacrm.agi") in new stack
> [2020-07-23 20:56:18] VERBOSE[29517][C-00000008] res_agi.c: <PJSIP/200-0000000c>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
> [2020-07-23 20:56:18] VERBOSE[29517][C-00000008] pbx.c: Executing [s@crm-hangup:8] Return("PJSIP/200-0000000c", "") in new stack
> [2020-07-23 20:56:18] VERBOSE[29517][C-00000008] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/200-0000000c'
> [2020-07-23 20:56:18] VERBOSE[29517][C-00000008] app_stack.c: PJSIP/200-0000000c Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

#2

Simple things to check:
In Asterisk SIP Settings, confirm that External Address has your correct public IPv4 address and that Local Networks is correctly set.

In your router, confirm that SIP ALG (or anything with a similar name) is turned off.

If no luck, at the Asterisk command prompt, type
pjsip set logger on
(you should get a response “PJSIP Logging enabled”)
then make another failing test call.

The Asterisk log should now include a SIP trace. Paste the relevant section at pastebin.freepbx.org and post the link here.


(Vcba79) #3

Hi, Stewart1

Thank you very much for your reply. I do find something in log file.

v=0
o=- 1971956030 1971956030 IN IP4 1.1.1.1
s=Asterisk
c=IN IP4 1.1.1.1
t=0 0
m=audio 15876 RTP/AVP 0 8 3 111 9 4 18 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

The ip marked above 1.1.1.1 (I changed it) is not my real ip. I recently changed it to another IP.
Maybe this might the cause sip failed. Where should I check for ip setting? Setting > Asterisk SIP setting IP is correct.

BTW:
I just opened my firewall for testing and I see log below immediately

[2020-07-24 03:47:14] VERBOSE[7377][C-00001133] func_timeout.c: Channel will hangup at 2020-07-24 03:47:29.407 CST.
[2020-07-24 03:47:14] VERBOSE[7377][C-00001133] pbx.c: Executing [s@from-sip-external:6] Set("PJSIP/anonymous-0000113a", "receveip=pjsip,remote_addr") in new stack
[2020-07-24 03:47:14] VERBOSE[7377][C-00001133] pbx.c: Executing [s@from-sip-external:7] Log("PJSIP/anonymous-0000113a", "WARNING,"Rejecting unknown SIP connection from 156.96.117.191:61910"") in new stack
[2020-07-24 03:47:14] WARNING[7377][C-00001133] Ext. s: "Rejecting unknown SIP connection from 156.96.117.191:61910"

It seem someone tried to connect my system but rejected right? Under what condition FreePBX will serve incoming sip connection? Local networks listed in Asterisk SIP setting?


#4

I don’t understand what you are saying. Was the address in the SDP that you show as 1.1.1.1 a public IP address (one other than 10.x.x.x, 192.168.x.x, or 172.16-31.x.x)? If so, is it one that you recognize (such as a former address of yours)?

Confirm that the SDP you posted was part of the SIP INVITE sent to sip.us. If so, there should have been a Contact header. Was the address in the Contact header your correct public IP, the private address of the PBX, or something else?

In any case, on the General tab of Asterisk SIP Settings, External Address must be your correct public IP address and local networks must match your router’s LAN, for example 192.168.1.0 / 24.
Normally, the External IP Address and Local Network settings on the chan_pjsip tab should be left blank. Also, special settings such as Media Address in the trunk should be left blank. And, if you have changed any of these, you must restart (not just reload) Asterisk.

If you still have trouble, please post a new log including SIP trace. If you redact any IP addresses or other personal info, please indicate what they are, e.g. “I changed my public IP address to 1.1.1.1, my phone number to 2125551212 and my account number to 12345678”. I see no reason to change anything not personal, such as the address of the sip.us server or the private IP addresses of the extension or PBX, but if you do change them, identify clearly what they are.


(Vcba79) #5

I just do another test. Dial from grandstream phone in local network via sip.us trunk. It works fine if firewall rule and nat configured correctly. Thanks for your kindly help.


#6

For the benefit of others who find this thread, please explain what you had to change. The FreePBX firewall should pass RTP packets by default, and pjsip does not have any explicit NAT settings.

If there were changes to your external (hardware) firewall, please describe them.


(Vcba79) #7

My FreePBX is behind opnsense firewall. After opnsense firewall rule and NAT configured, Grandstream phone can dial through sip.us trunk.

When I first report no audio issue, I use android internal sip and vpn connection to reach FreePBX box. I guess VPN connection might cause audio problem and will figure it out later.

Thanks,


(kowalskilinux) #8

@vcba79

In the case of calls without audio I recommend an analysis using SNGREP that can follow better. Another point that freepbx behind nat is not legal, ideal to make use of vpn.


(Vcba79) #9

After my grandstream phone can call out successfully, I still can not call out using android 9 internal sip function. But everything works fine after I use zoiper application. If anyone has issue using android 9 internal sip function, I will suggest swich to android application first.


(Firstfilter) #10

This is a pretty well known issue. The stock Android Phone app is somewhat broken. The Nexus 6 was my last working stock dialer. My current Pixel 3XL doesn’t work and never has. Go with Zoiper.


(system) closed #11

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.