我在CentOS 6.5上安装了Asterisk + FreePBX。
Case 1
Asterisk + FreePBX + CentOS 6.5
Phone A - Android 4G newtork (Linphone, PCMA codec)
Phone B - Android Wifi network (Linphone, PCMA codec)
If I can make a call to Phone B from Phone A, it works and answers the phone.
However, I can only hear sound from Phone A when I speak on Phone B.
我认为这是NAT问题,并检查了Asterisk的所有防火墙。 Wifi网络也没有问题。有没有办法正确更改NAT设置?谢谢。
当我打电话和通话时,这是Asterisk CLI日志。
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [1004@from-internal:1] Set("SIP/1003-0000005e", "__RINGTIMER=15") in new stack
-- Executing [1004@from-internal:2] Macro("SIP/1003-0000005e", "exten-vm,novm,1004,0,0,0") in new stack
-- Executing [s@macro-exten-vm:1] Macro("SIP/1003-0000005e", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/1003-0000005e", "TOUCH_MONITOR=1395938841.94") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/1003-0000005e", "AMPUSER=1003") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/1003-0000005e", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/1003-0000005e", "1?Set(REALCALLERIDNUM=1003)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/1003-0000005e", "AMPUSER=1003") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/1003-0000005e", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/1003-0000005e", "AMPUSERCIDNAME=Third") in new stack
-- Executing [s@macro-user-callerid:8] GotoIf("SIP/1003-0000005e", "0?report") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/1003-0000005e", "AMPUSERCID=1003") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/1003-0000005e", "__DIAL_OPTIONS=Ttr") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/1003-0000005e", "CALLERID(all)="Third" <1003>") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("SIP/1003-0000005e", "0?limit") in new stack
-- Executing [s@macro-user-callerid:13] ExecIf("SIP/1003-0000005e", "0?Set(GROUP(concurrency_limit)=1003)") in new stack
-- Executing [s@macro-user-callerid:14] GosubIf("SIP/1003-0000005e", "7?sub-ccss,s,1(macro-exten-vm,1004)") in new stack
-- Executing [s@sub-ccss:1] ExecIf("SIP/1003-0000005e", "0?Return()") in new stack
-- Executing [s@sub-ccss:2] Set("SIP/1003-0000005e", "CCSS_SETUP=TRUE") in new stack
-- Executing [s@sub-ccss:3] GosubIf("SIP/1003-0000005e", "0?monitor_config,1(macro-exten-vm,1004):monitor_default,1(macro-exten-vm,1004)") in new stack
-- Executing [monitor_default@sub-ccss:1] GotoIf("SIP/1003-0000005e", "1?is_exten") in new stack
-- Goto (sub-ccss,monitor_default,4)
-- Executing [monitor_default@sub-ccss:4] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_monitor_policy)=generic") in new stack
-- Executing [monitor_default@sub-ccss:5] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_max_monitors)=5") in new stack
-- Executing [monitor_default@sub-ccss:6] Return("SIP/1003-0000005e", "TRUE") in new stack
-- Executing [s@sub-ccss:4] GosubIf("SIP/1003-0000005e", "7?agent_config,1():agent_default,1()") in new stack
-- Executing [agent_config@sub-ccss:1] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_agent_policy)=generic") in new stack
-- Executing [agent_config@sub-ccss:2] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_offer_timer)=30") in new stack
-- Executing [agent_config@sub-ccss:3] Set("SIP/1003-0000005e", "CALLCOMPLETION(ccbs_available_timer)=") in new stack
-- Executing [agent_config@sub-ccss:4] Set("SIP/1003-0000005e", "CALLCOMPLETION(ccnr_available_timer)=") in new stack
-- Executing [agent_config@sub-ccss:5] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_callback_macro)=ccss-default") in new stack
-- Executing [agent_config@sub-ccss:6] ExecIf("SIP/1003-0000005e", "1?Set(CALLCOMPLETION(cc_recall_timer)=)") in new stack
-- Executing [agent_config@sub-ccss:7] ExecIf("SIP/1003-0000005e", "1?Set(CALLCOMPLETION(cc_max_agents)=)") in new stack
-- Executing [agent_config@sub-ccss:8] ExecIf("SIP/1003-0000005e", "0?Set(CALLCOMPLETION(cc_agent_dialstring)=Local/1003_1004@from-ccss-)") in new stack
-- Executing [agent_config@sub-ccss:9] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_callback_macro)=ccss-default") in new stack
-- Executing [agent_config@sub-ccss:10] Return("SIP/1003-0000005e", "") in new stack
-- Executing [s@sub-ccss:5] Set("SIP/1003-0000005e", "DB(AMPUSER/1003/ccss/last_number)=1004") in new stack
-- Executing [s@sub-ccss:6] Return("SIP/1003-0000005e", "") in new stack
-- Executing [s@macro-user-callerid:15] ExecIf("SIP/1003-0000005e", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:16] GotoIf("SIP/1003-0000005e", "0?continue") in new stack
-- Executing [s@macro-user-callerid:17] ExecIf("SIP/1003-0000005e", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
-- Executing [s@macro-user-callerid:18] Set("SIP/1003-0000005e", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:19] GotoIf("SIP/1003-0000005e", "1?continue") in new stack
-- Goto (macro-user-callerid,s,30)
-- Executing [s@macro-user-callerid:30] Set("SIP/1003-0000005e", "CALLERID(number)=1003") in new stack
-- Executing [s@macro-user-callerid:31] Set("SIP/1003-0000005e", "CALLERID(name)=Third") in new stack
-- Executing [s@macro-user-callerid:32] Set("SIP/1003-0000005e", "CDR(cnum)=1003") in new stack
-- Executing [s@macro-user-callerid:33] Set("SIP/1003-0000005e", "CDR(cnam)=Third") in new stack
-- Executing [s@macro-user-callerid:34] Set("SIP/1003-0000005e", "CHANNEL(language)=en") in new stack
-- Executing [s@macro-exten-vm:2] Set("SIP/1003-0000005e", "RingGroupMethod=none") in new stack
-- Executing [s@macro-exten-vm:3] Set("SIP/1003-0000005e", "__EXTTOCALL=1004") in new stack
-- Executing [s@macro-exten-vm:4] Set("SIP/1003-0000005e", "__PICKUPMARK=1004") in new stack
-- Executing [s@macro-exten-vm:5] Set("SIP/1003-0000005e", "RT=") in new stack
-- Executing [s@macro-exten-vm:6] ExecIf("SIP/1003-0000005e", "0?Macro(vm,novm,DIRECTDIAL,)") in new stack
-- Executing [s@macro-exten-vm:7] ExecIf("SIP/1003-0000005e", "0?MacroExit()") in new stack
-- Executing [s@macro-exten-vm:8] Gosub("SIP/1003-0000005e", "sub-record-check,s,1(exten,1004,)") in new stack
-- Executing [s@sub-record-check:1] Set("SIP/1003-0000005e", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:2] GotoIf("SIP/1003-0000005e", "1?check") in new stack
-- Goto (sub-record-check,s,7)
-- Executing [s@sub-record-check:7] Set("SIP/1003-0000005e", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:8] GotoIf("SIP/1003-0000005e", "1?next") in new stack
-- Goto (sub-record-check,s,11)
-- Executing [s@sub-record-check:11] ExecIf("SIP/1003-0000005e", "0?Return()") in new stack
-- Executing [s@sub-record-check:12] ExecIf("SIP/1003-0000005e", "0?Set(__REC_POLICY_MODE=)") in new stack
-- Executing [s@sub-record-check:13] GotoIf("SIP/1003-0000005e", "0?exten,1") in new stack
-- Executing [s@sub-record-check:14] Set("SIP/1003-0000005e", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:15] Set("SIP/1003-0000005e", "NOW=1395938841") in new stack
-- Executing [s@sub-record-check:16] Set("SIP/1003-0000005e", "__DAY=28") in new stack
-- Executing [s@sub-record-check:17] Set("SIP/1003-0000005e", "__MONTH=03") in new stack
-- Executing [s@sub-record-check:18] Set("SIP/1003-0000005e", "__YEAR=2014") in new stack
-- Executing [s@sub-record-check:19] Set("SIP/1003-0000005e", "__TIMESTR=20140328-014721") in new stack
-- Executing [s@sub-record-check:20] Set("SIP/1003-0000005e", "__FROMEXTEN=1003") in new stack
-- Executing [s@sub-record-check:21] Set("SIP/1003-0000005e", "__CALLFILENAME=exten-1004-1003-20140328-014721-1395938841.94") in new stack
-- Executing [s@sub-record-check:22] Goto("SIP/1003-0000005e", "exten,1") in new stack
-- Goto (sub-record-check,exten,1)
-- Executing [exten@sub-record-check:1] GotoIf("SIP/1003-0000005e", "0?callee") in new stack
-- Executing [exten@sub-record-check:2] Set("SIP/1003-0000005e", "__REC_POLICY_MODE=dontcare") in new stack
-- Executing [exten@sub-record-check:3] GotoIf("SIP/1003-0000005e", "1?caller") in new stack
-- Goto (sub-record-check,exten,10)
-- Executing [exten@sub-record-check:10] Set("SIP/1003-0000005e", "__REC_POLICY_MODE=dontcare") in new stack
-- Executing [exten@sub-record-check:11] GosubIf("SIP/1003-0000005e", "0?record,1(exten,1004,1003)") in new stack
-- Executing [exten@sub-record-check:12] Return("SIP/1003-0000005e", "") in new stack
-- Executing [s@macro-exten-vm:9] GotoIf("SIP/1003-0000005e", "1?macrodial") in new stack
-- Goto (macro-exten-vm,s,15)
-- Executing [s@macro-exten-vm:15] GosubIf("SIP/1003-0000005e", "0?clrheader,1()") in new stack
-- Executing [s@macro-exten-vm:16] Macro("SIP/1003-0000005e", "dial-one,,Ttr,1004") in new stack
-- Executing [s@macro-dial-one:1] Set("SIP/1003-0000005e", "DEXTEN=1004") in new stack
-- Executing [s@macro-dial-one:2] Set("SIP/1003-0000005e", "DIALSTATUS_CW=") in new stack
-- Executing [s@macro-dial-one:3] GosubIf("SIP/1003-0000005e", "0?screen,1()") in new stack
-- Executing [s@macro-dial-one:4] GosubIf("SIP/1003-0000005e", "0?cf,1()") in new stack
-- Executing [s@macro-dial-one:5] GotoIf("SIP/1003-0000005e", "1?skip1") in new stack
-- Goto (macro-dial-one,s,8)
-- Executing [s@macro-dial-one:8] GotoIf("SIP/1003-0000005e", "0?nodial") in new stack
-- Executing [s@macro-dial-one:9] GotoIf("SIP/1003-0000005e", "0?continue") in new stack
-- Executing [s@macro-dial-one:10] Set("SIP/1003-0000005e", "EXTHASCW=ENABLED") in new stack
-- Executing [s@macro-dial-one:11] GotoIf("SIP/1003-0000005e", "0?next1:cwinusebusy") in new stack
-- Goto (macro-dial-one,s,23)
-- Executing [s@macro-dial-one:23] GotoIf("SIP/1003-0000005e", "1?next3:continue") in new stack
-- Goto (macro-dial-one,s,24)
-- Executing [s@macro-dial-one:24] ExecIf("SIP/1003-0000005e", "0?Set(DIALSTATUS_CW=BUSY)") in new stack
-- Executing [s@macro-dial-one:25] GotoIf("SIP/1003-0000005e", "0?nodial") in new stack
-- Executing [s@macro-dial-one:26] GosubIf("SIP/1003-0000005e", "1?dstring,1():dlocal,1()") in new stack
-- Executing [dstring@macro-dial-one:1] Set("SIP/1003-0000005e", "DSTRING=") in new stack
-- Executing [dstring@macro-dial-one:2] Set("SIP/1003-0000005e", "DEVICES=1004") in new stack
-- Executing [dstring@macro-dial-one:3] ExecIf("SIP/1003-0000005e", "0?Return()") in new stack
-- Executing [dstring@macro-dial-one:4] ExecIf("SIP/1003-0000005e", "0?Set(DEVICES=004)") in new stack
-- Executing [dstring@macro-dial-one:5] Set("SIP/1003-0000005e", "LOOPCNT=1") in new stack
-- Executing [dstring@macro-dial-one:6] Set("SIP/1003-0000005e", "ITER=1") in new stack
-- Executing [dstring@macro-dial-one:7] Set("SIP/1003-0000005e", "THISDIAL=SIP/1004") in new stack
-- Executing [dstring@macro-dial-one:8] GosubIf("SIP/1003-0000005e", "1?zap2dahdi,1()") in new stack
-- Executing [zap2dahdi@macro-dial-one:1] ExecIf("SIP/1003-0000005e", "0?Return()") in new stack
-- Executing [zap2dahdi@macro-dial-one:2] Set("SIP/1003-0000005e", "NEWDIAL=") in new stack
-- Executing [zap2dahdi@macro-dial-one:3] Set("SIP/1003-0000005e", "LOOPCNT2=1") in new stack
-- Executing [zap2dahdi@macro-dial-one:4] Set("SIP/1003-0000005e", "ITER2=1") in new stack
-- Executing [zap2dahdi@macro-dial-one:5] Set("SIP/1003-0000005e", "THISPART2=SIP/1004") in new stack
-- Executing [zap2dahdi@macro-dial-one:6] ExecIf("SIP/1003-0000005e", "0?Set(THISPART2=DAHDI/1004)") in new stack
-- Executing [zap2dahdi@macro-dial-one:7] Set("SIP/1003-0000005e", "NEWDIAL=SIP/1004&") in new stack
-- Executing [zap2dahdi@macro-dial-one:8] Set("SIP/1003-0000005e", "ITER2=2") in new stack
-- Executing [zap2dahdi@macro-dial-one:9] GotoIf("SIP/1003-0000005e", "0?begin2") in new stack
-- Executing [zap2dahdi@macro-dial-one:10] Set("SIP/1003-0000005e", "THISDIAL=SIP/1004") in new stack
-- Executing [zap2dahdi@macro-dial-one:11] Return("SIP/1003-0000005e", "") in new stack
-- Executing [dstring@macro-dial-one:9] Set("SIP/1003-0000005e", "DSTRING=SIP/1004&") in new stack
-- Executing [dstring@macro-dial-one:10] Set("SIP/1003-0000005e", "ITER=2") in new stack
-- Executing [dstring@macro-dial-one:11] GotoIf("SIP/1003-0000005e", "0?begin") in new stack
-- Executing [dstring@macro-dial-one:12] Set("SIP/1003-0000005e", "DSTRING=SIP/1004") in new stack
-- Executing [dstring@macro-dial-one:13] Return("SIP/1003-0000005e", "") in new stack
-- Executing [s@macro-dial-one:27] GotoIf("SIP/1003-0000005e", "0?nodial") in new stack
-- Executing [s@macro-dial-one:28] GotoIf("SIP/1003-0000005e", "0?skiptrace") in new stack
-- Executing [s@macro-dial-one:29] GosubIf("SIP/1003-0000005e", "1?ctset,1():ctclear,1()") in new stack
-- Executing [ctset@macro-dial-one:1] Set("SIP/1003-0000005e", "DB(CALLTRACE/1004)=1003") in new stack
-- Executing [ctset@macro-dial-one:2] Return("SIP/1003-0000005e", "") in new stack
-- Executing [s@macro-dial-one:30] Set("SIP/1003-0000005e", "D_OPTIONS=Ttr") in new stack
-- Executing [s@macro-dial-one:31] ExecIf("SIP/1003-0000005e", "0?SIPAddHeader(Alert-Info: )") in new stack
-- Executing [s@macro-dial-one:32] ExecIf("SIP/1003-0000005e", "0?SIPAddHeader()") in new stack
-- Executing [s@macro-dial-one:33] ExecIf("SIP/1003-0000005e", "0?Set(CHANNEL(musicclass)=)") in new stack
-- Executing [s@macro-dial-one:34] GosubIf("SIP/1003-0000005e", "0?qwait,1()") in new stack
-- Executing [s@macro-dial-one:35] Set("SIP/1003-0000005e", "__CWIGNORE=") in new stack
-- Executing [s@macro-dial-one:36] Set("SIP/1003-0000005e", "__KEEPCID=TRUE") in new stack
-- Executing [s@macro-dial-one:37] GotoIf("SIP/1003-0000005e", "0?usegoto,1") in new stack
-- Executing [s@macro-dial-one:38] GotoIf("SIP/1003-0000005e", "0?godial") in new stack
-- Executing [s@macro-dial-one:39] Gosub("SIP/1003-0000005e", "sub-presencestate-display,s,1(1004)") in new stack
-- Executing [s@sub-presencestate-display:1] Goto("SIP/1003-0000005e", "state-,1") in new stack
-- Goto (sub-presencestate-display,state-,1)
-- Executing [state-@sub-presencestate-display:1] Set("SIP/1003-0000005e", "PRESENCESTATE_DISPLAY=") in new stack
-- Executing [state-@sub-presencestate-display:2] Return("SIP/1003-0000005e", "") in new stack
-- Executing [s@macro-dial-one:40] Set("SIP/1003-0000005e", "CONNECTEDLINE(name,i)=fourth") in new stack
-- Executing [s@macro-dial-one:41] Set("SIP/1003-0000005e", "CONNECTEDLINE(num)=1004") in new stack
-- Executing [s@macro-dial-one:42] Set("SIP/1003-0000005e", "D_OPTIONS=TtrI") in new stack
-- Executing [s@macro-dial-one:43] Dial("SIP/1003-0000005e", "SIP/1004,,TtrI") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/1004
-- Connected line update to SIP/1003-0000005e prevented.
-- SIP/1004-0000005f is ringing
-- SIP/1004-0000005f is ringing
-- Connected line update to SIP/1003-0000005e prevented.
-- SIP/1004-0000005f answered SIP/1003-0000005e
=============================================== ==============================
SIP联系
Android上的WifiAddr->IP : 14.63.12.134:5060
Reg. Contact : sip:1000@14.63.12.134
Android on 4G LTE
Addr->IP : 223.62.202.25:58184
Reg. Contact : sip:1002@223.62.202.25:58184
看起来像Wifi上的Android无法获得正确的地址。它没有显示发送语音的特定端口。
答案 0 :(得分:1)
这就是为什么我喜欢简洁的Asterisk,你的控制台不会像这样被一次通话淹没。 :)
如果你完全确定编解码器没问题,那么音频RTP就没有到达手机。检查发送的位置,检查SIP INVITE消息(假设1003是电话不工作):
> sip show peer 1003
查找编解码器信息。如果他们很好,请查看NAT。设置
> sip set debug on
或者对于特定的同行:
> sip set debug on peer 1003
然后检查您的标题,特别是“联系人:”标题,其中说明“他们会在这里与我联系”#39;
如果创建了呼叫,意味着控制信令通过(您可以在任一电话中拨打和挂断),那么我很确定它是编解码器问题。如果控件不是100%罚款(例如你在一部手机中挂起而另一部手机不知道)那么它可能是一个网络问题。
希望它有所帮助!