无法获得freeswitch将呼叫redirect回kamailio

背景信息:

我试图按照这里find的教程: http : //kb.asipto.com/freeswitch : kamailio-3.3.x-freeswitch-1.2.x-sbc

基本设置如下:

  • 两部宝利通电话(192.168.1.100和192.168.1.102)
  • 一个处理注册和用户位置的Kamailio服务器(192.168.1.101)
  • 一个Freeswitch服务器(192.168.1.111),负责pipe理vmail,电话会议等

问题:

坏消息是,当我尝试从999拨打分机888或反之亦然,它不起作用。 即使两部手机都在线,我也会得到一个忙碌的信号。 (为什么这是值得的电话会议工程)

代码/configuration:

以下是默认容器/开箱即用的dialplan中为支持我的configuration而添加的部分“

<extension name="kbridge"> <condition field="destination_number" expression="^(.+)$"> <action application="set" data="proxy_media=true"/> <action application="set" data="call_timeout=50"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="sip_invite_domain=192.168.1.111"/> <action application="export" data="sip_contact_user=ufs"/> <action application="bridge" data="sofia/$${domain}/[email protected]"/> <action application="answer"/> <action application="voicemail" data="default ${domain_name} $1"/> </condition> </extension> 

这就是我的acl.conf.xml文件的一部分:(注意我已经添加了我的Kam服务器的IP地址…不知道这是我应该做什么,或者添加我的freeswitch服务器的地址)

 <list name="domains" default="deny"> <!-- domain= is special it scans the domain from the directory to build the ACL --> <node type="allow" domain="$${domain}"/> <!-- use cidr= if you wish to allow ip ranges to this domains acl. --> <node type="allow" cidr="192.168.1.101"/> <node type="allow" cidr="192.168.1.111"/> </list> 

这是公共图解(public.xml)

  <extension name="from_kamailio"> <condition field="network_addr" expression="^192\.168\.1\.101$" /> <condition field="destination_number" expression="^(.+)$"> <action application="transfer" data="$1 XML default"/> </condition> </extension> 

我到目前为止所做的/debugging信息

在我的kamailio服务器上使用tcpdump,端口5060,我可以看到这些调用确实使它成为自由开关。 但是freeswitch不会将呼叫发送回代理,然后再发送到电话。 它返回下面的SIP消息:

 SIP/2.0 480 Temporarily Unavailable Via: SIP/2.0/UDP 192.168.1.101;branch=z9hG4bK15fa.79754276.0 Via: SIP/2.0/UDP 192.168.1.102;branch=z9hG4bKb403de76A8D7964 Max-Forwards: 14 From: "999" <sip:[email protected]>;tag=C73F8AE1-87260556 To: <sip:[email protected];user=phone>;tag=KB5jNeBv3ZmaQ Call-ID: [email protected] CSeq: 1 INVITE User-Agent: FreeSWITCH-mod_sofia/1.5.12b+git~20140320T233219Z~dd242f3ba6~32bit Accept: application/sdp Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY Supported: timer, path, replaces Allow-Events: talk, hold, conference, refer Reason: Q.850;cause=16;text="NORMAL_CLEARING" Content-Length: 0 Remote-Party-ID: "888" <888>;party=calling;privacy=off;screen=no 

当我看看freeswitch客户端中的debugging数据,这是我看到重新:这个调用:(只有关键项目张贴)

 2014-03-26 17:02:31.825479 [NOTICE] switch_channel.c:1053 New Channel sofia/external/[email protected] [f284cfd6-b529-11e3-aa7f-35418c26e85f] 2014-03-26 17:02:31.825479 [DEBUG] switch_channel.c:2177 (sofia/external/[email protected]) Callstate Change DOWN -> RINGING 2014-03-26 17:02:31.825479 [DEBUG] switch_core_state_machine.c:523 (sofia/external/[email protected]) State ROUTING 2014-03-26 17:02:31.825479 [DEBUG] mod_sofia.c:123 sofia/external/[email protected] SOFIA ROUTING 2014-03-26 17:02:31.825479 [DEBUG] switch_core_state_machine.c:164 sofia/external/[email protected] Standard ROUTING 2014-03-26 17:02:31.825479 [INFO] mod_dialplan_xml.c:558 Processing 999 <999>->888 in context public Dialplan: sofia/external/[email protected] parsing [public->unloop] continue=false Dialplan: sofia/external/[email protected] Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false Dialplan: sofia/external/[email protected] Regex (PASS) [from_kamailio] network_addr(192.168.1.101) =~ /^192\.168\.1\.101$/ break=on-false Dialplan: sofia/external/[email protected] Regex (PASS) [from_kamailio] destination_number(kb-888) =~ /^(.+)$/ break=on-false Dialplan: sofia/external/[email protected] Action transfer(888 XML default) 2014-03-26 17:02:31.825479 [NOTICE] switch_ivr.c:1837 Transfer sofia/external/[email protected] to XML[888@default] 2014-03-26 17:02:31.825479 [INFO] mod_dialplan_xml.c:558 Processing 999 <999>->888 in context default 2014-03-26 17:02:31.845470 [NOTICE] switch_ivr.c:1837 Transfer sofia/external/[email protected] to enum[888@default] 2014-03-26 17:02:31.845470 [DEBUG] switch_core_state_machine.c:530 (sofia/external/[email protected]) State EXECUTE going to sleep 2014-03-26 17:02:31.845470 [DEBUG] switch_core_state_machine.c:467 (sofia/external/[email protected]) Running State Change CS_ROUTING 2014-03-26 17:02:31.845470 [DEBUG] switch_core_state_machine.c:523 (sofia/external/[email protected]) State ROUTING 2014-03-26 17:02:31.845470 [DEBUG] mod_sofia.c:123 sofia/external/[email protected] SOFIA ROUTING 2014-03-26 17:02:31.845470 [DEBUG] switch_core_state_machine.c:164 sofia/external/[email protected] Standard ROUTING 2014-03-26 17:02:31.845470 [DEBUG] mod_enum.c:642 ENUM Lookup on kb-888 2014-03-26 17:02:31.845470 [DEBUG] mod_enum.c:494 No Nameservers specified, using host default 2014-03-26 17:02:32.005525 [NOTICE] switch_core_state_machine.c:313 sofia/external/[email protected] has executed the last dialplan instruction, hanging up. 2014-03-26 17:02:32.005525 [NOTICE] switch_core_state_machine.c:315 Hangup sofia/external/[email protected] [CS_EXECUTE] [NORMAL_CLEARING] 

然后显示SIP暂时不可用的错误消息。

我试图按照教程T ..但它不工作。 任何build议,将不胜感激。 谢谢。

编辑1

我不知道为什么这种解决方法可行…但我发现改变拨号scheme像这样修复了这个问题:

 <extension name="kbridge"> <condition field="destination_number" expression="^(.+)$"> <action application="set" data="proxy_media=true"/> <action application="set" data="call_timeout=50"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="sip_invite_domain=192.168.1.111"/> <action application="export" data="sip_contact_user=ufs"/> <!--<action application="bridge" data="sofia/$${domain}/[email protected]"/>--> <action application="bridge" data="sofia/external/[email protected]"/> <action application="answer"/> <action application="voicemail" data="default ${domain_name} $1"/> </condition> </extension> 

请注意,我已经删除了variables$$ {domain}并将其硬编码为“external”。 现在我的扩展之间的电话工作。 我不知道为什么会出现这种情况,但我现在正在查找域variables的定义。