作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我对 FreeSwitch 有疑问。我尝试了几个小时,将我系统上的 FreeSwitch 服务器与另一个系统上的 FreeSwitch 服务器连接起来。但是,我想要的是用用户“abc@myip”调用用户“123@buddysIp”。我尝试的是向 acl.conf.xml 添加一个新的“列表”项
<list name="buddy" default="deny">
<node type="allow" cidr="hisip/32"/>
</list>
我还尝试在 conf/dialplan/default 目录中添加一个扩展
<include>
<extension name="outbound_calls">
<condition field="destination_number" expression="^(.*)$">
<action application="bridge" data="sofia/gateway/buddy/$1"/>
</condition>
</extension>
他的网关存储在 conf/sip_profiles/buddy.xml 中,看起来像这样
<include>
<gateway name="buddy">
<param name="realm" value="hisip"/>
<param name="username" value="myuser"/>
<param name="password" value="mypw"/>
</gateway>
我希望有人能帮助我。也许我忘了什么。我们在同一个网络中。如果您需要更多信息,请告诉我,谢谢。
这是我的通话记录:
INVITE sip:666@myip SIP/2.0
Via: SIP/2.0/UDP myip:51155;rport;branch=z9hG4bKPjyv0EW.k04poUhm7kdxHae5kheAypVEBc
Max-Forwards: 70
From: "me" <sip:1001@myip>;tag=Hd47q6ldQvMGLJO5RcMsO4AJQwWmRU28
To: <sip:666@myip>
Contact: "me" <sip:1001@myip:51155;ob>
Call-ID: WW8ZDSQvHKuKTSjTJTX.hiefO6liAh7W
CSeq: 24074 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Telephone 1.1.4
Content-Type: application/sdp
Content-Length: 479
v=0
o=- 3621578544 3621578544 IN IP4 myip
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4032 RTP/AVP 103 102 104 109 3 0 8 9 101
c=IN IP4 myip
b=TIAS:64000
a=rtcp:4033 IN IP4 myip
a=sendrecv
a=rtpmap:103 speex/16000
a=rtpmap:102 speex/8000
a=rtpmap:104 speex/32000
a=rtpmap:109 iLBC/8000
a=fmtp:109 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
------------------------------------------------------------------------
send 382 bytes to udp/[myip]:51155 at 12:02:24.444389:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myip:51155;rport=51155;branch=z9hG4bKPjyv0EW.k04poUhm7kdxHae5kheAypVEBc
From: "me" <sip:1001@myip>;tag=Hd47q6ldQvMGLJO5RcMsO4AJQwWmRU28
To: <sip:666@myip>
Call-ID: WW8ZDSQvHKuKTSjTJTX.hiefO6liAh7W
CSeq: 24074 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.4.9+git~20140929T194948Z~ae069dcca7~64bit
Content-Length: 0
------------------------------------------------------------------------
2014-10-06 12:02:24.435021 [NOTICE] switch_channel.c:1055 New Channel sofia/internal/1001@myip [2b0eddac-0ad5-41b3-a9f4-eebf1a81565e]
send 884 bytes to udp/[myip]:51155 at 12:02:24.450259:
------------------------------------------------------------------------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP myip:51155;rport=51155;branch=z9hG4bKPjyv0EW.k04poUhm7kdxHae5kheAypVEBc
From: "me" <sip:1001@myip>;tag=Hd47q6ldQvMGLJO5RcMsO4AJQwWmRU28
To: <sip:666@myip>;tag=9Q0rj5B37FS7H
Call-ID: WW8ZDSQvHKuKTSjTJTX.hiefO6liAh7W
CSeq: 24074 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.4.9+git~20140929T194948Z~ae069dcca7~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="myip", nonce="72eb4930-85ce-4590-b2a2-b3420109fb4e", algorithm=MD5, qop="auth"
Content-Length: 0
------------------------------------------------------------------------
recv 345 bytes from udp/[myip]:51155 at 12:02:24.450538:
------------------------------------------------------------------------
ACK sip:666@myip SIP/2.0
Via: SIP/2.0/UDP myip:51155;rport;branch=z9hG4bKPjyv0EW.k04poUhm7kdxHae5kheAypVEBc
Max-Forwards: 70
From: "me" <sip:1001@myip>;tag=Hd47q6ldQvMGLJO5RcMsO4AJQwWmRU28
To: <sip:666@myip>;tag=9Q0rj5B37FS7H
Call-ID: WW8ZDSQvHKuKTSjTJTX.hiefO6liAh7W
CSeq: 24074 ACK
Content-Length: 0
------------------------------------------------------------------------
recv 1372 bytes from udp/[myip]:51155 at 12:02:24.450608:
------------------------------------------------------------------------
INVITE sip:666@myip SIP/2.0
Via: SIP/2.0/UDP myip:51155;rport;branch=z9hG4bKPjdQcDT3A-9MHF6CkHL-i9ocmvZjxVxGnD
Max-Forwards: 70
From: "me" <sip:1001@myip>;tag=Hd47q6ldQvMGLJO5RcMsO4AJQwWmRU28
To: <sip:666@myip>
Contact: "me" <sip:1001@myip:51155;ob>
Call-ID: WW8ZDSQvHKuKTSjTJTX.hiefO6liAh7W
CSeq: 24075 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Telephone 1.1.4
Proxy-Authorization: Digest username="1001", realm="myip", nonce="72eb4930-85ce-4590-b2a2-b3420109fb4e", uri="sip:666@myip", response="1220921ada500668b903722228634e1a", algorithm=MD5, cnonce="P1gGhwXHyrEHo1zMDrBEk3ryp1uKHbaK", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length: 479
v=0
o=- 3621578544 3621578544 IN IP4 myip
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4032 RTP/AVP 103 102 104 109 3 0 8 9 101
c=IN IP4 myip
b=TIAS:64000
a=rtcp:4033 IN IP4 myip
a=sendrecv
a=rtpmap:103 speex/16000
a=rtpmap:102 speex/8000
a=rtpmap:104 speex/32000
a=rtpmap:109 iLBC/8000
a=fmtp:109 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
------------------------------------------------------------------------
send 382 bytes to udp/[myip]:51155 at 12:02:24.450830:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myip:51155;rport=51155;branch=z9hG4bKPjdQcDT3A-9MHF6CkHL-i9ocmvZjxVxGnD
From: "me" <sip:1001@myip>;tag=Hd47q6ldQvMGLJO5RcMsO4AJQwWmRU28
To: <sip:666@myip>
Call-ID: WW8ZDSQvHKuKTSjTJTX.hiefO6liAh7W
CSeq: 24075 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.4.9+git~20140929T194948Z~ae069dcca7~64bit
Content-Length: 0
------------------------------------------------------------------------
2014-10-06 12:02:24.484827 [INFO] mod_dialplan_xml.c:558 Processing me <1001>->666 in context default
2014-10-06 12:02:24.484827 [CRIT] mod_dptools.c:1628 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
2014-10-06 12:02:24.484827 [CRIT] mod_dptools.c:1628 Open /usr/local/freeswitch/conf/vars.xml and change the default_password.
2014-10-06 12:02:24.484827 [CRIT] mod_dptools.c:1628 Once changed type 'reloadxml' at the console.
2014-10-06 12:02:24.495177 [CRIT] mod_dptools.c:1628 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
2014-10-06 12:02:34.854471 [NOTICE] switch_channel.c:1055 New Channel sofia/external/666 [3bc1a418-d55d-4dab-863b-9742ec0ae187]
send 1113 bytes to udp/[buddyip]:5060 at 12:02:34.865554:
------------------------------------------------------------------------
INVITE sip:666@buddyip SIP/2.0
Via: SIP/2.0/UDP myip:5080;rport;branch=z9hG4bK94rXNDv8U6KDg
Max-Forwards: 69
From: "Extension 1001" <sip:FreeSWITCH@buddyip>;tag=2N77KS1Ke6gpN
To: <sip:666@buddyip>
Call-ID: bc64e628-c7e2-1232-0e89-4d7ce0605bb2
CSeq: 65958813 INVITE
Contact: <sip:gw+amr@myip:5080;transport=udp;gw=amr>
User-Agent: FreeSWITCH-mod_sofia/1.4.9+git~20140929T194948Z~ae069dcca7~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 292
X-FS-Support: update_display,send_info
Remote-Party-ID: "Extension 1001" <sip:2706446@buddyip>;party=calling;screen=yes;privacy=off
v=0
o=FreeSWITCH 1412565842 1412565843 IN IP4 myip
s=FreeSWITCH
c=IN IP4 myip
t=0 0
m=audio 23912 RTP/AVP 3 0 8 9 101 13
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
------------------------------------------------------------------------
recv 363 bytes from udp/[buddyip]:5060 at 12:02:34.867644:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myip:5080;rport=5080;branch=z9hG4bK94rXNDv8U6KDg
From: "Extension 1001" <sip:FreeSWITCH@buddyip>;tag=2N77KS1Ke6gpN
To: <sip:666@buddyip>
Call-ID: bc64e628-c7e2-1232-0e89-4d7ce0605bb2
CSeq: 65958813 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.14b+git~20141001T023048Z~a39db86863~64bit
Content-Length: 0
------------------------------------------------------------------------
recv 865 bytes from udp/[buddyip]:5060 at 12:02:34.869949:
------------------------------------------------------------------------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP myip:5080;rport=5080;branch=z9hG4bK94rXNDv8U6KDg
From: "Extension 1001" <sip:FreeSWITCH@buddyip>;tag=2N77KS1Ke6gpN
To: <sip:666@buddyip>;tag=ytX68BX46p4Kp
Call-ID: bc64e628-c7e2-1232-0e89-4d7ce0605bb2
CSeq: 65958813 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.14b+git~20141001T023048Z~a39db86863~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="buddyip", nonce="56db4231-66c0-4603-bec6-7d6fb163a011", algorithm=MD5, qop="auth"
Content-Length: 0
------------------------------------------------------------------------
send 324 bytes to udp/[buddyip]:5060 at 12:02:34.870119:
------------------------------------------------------------------------
ACK sip:666@buddyip SIP/2.0
Via: SIP/2.0/UDP myip:5080;rport;branch=z9hG4bK94rXNDv8U6KDg
Max-Forwards: 69
From: "Extension 1001" <sip:FreeSWITCH@buddyip>;tag=2N77KS1Ke6gpN
To: <sip:666@buddyip>;tag=ytX68BX46p4Kp
Call-ID: bc64e628-c7e2-1232-0e89-4d7ce0605bb2
CSeq: 65958813 ACK
Content-Length: 0
------------------------------------------------------------------------
send 1389 bytes to udp/[buddyip]:5060 at 12:02:34.882192:
------------------------------------------------------------------------
INVITE sip:666@buddyip SIP/2.0
Via: SIP/2.0/UDP myip:5080;rport;branch=z9hG4bKaejpQ8ccSFa0B
Max-Forwards: 69
From: "Extension 1001" <sip:FreeSWITCH@buddyip>;tag=2N77KS1Ke6gpN
To: <sip:666@buddyip>
Call-ID: bc64e628-c7e2-1232-0e89-4d7ce0605bb2
CSeq: 65958814 INVITE
Contact: <sip:gw+amr@myip:5080;transport=udp;gw=amr>
Expires: 3600
User-Agent: FreeSWITCH-mod_sofia/1.4.9+git~20140929T194948Z~ae069dcca7~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Proxy-Authorization: Digest username="FreeSWITCH", realm="buddyip", nonce="56db4231-66c0-4603-bec6-7d6fb163a011", cnonce="vGWirMfiEjKJDk184GBbsg", algorithm=MD5, uri="sip:666@buddyip", response="9455fd51fcf3ce264eb85a35fd311f23", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 292
X-FS-Support: update_display,send_info
Remote-Party-ID: "Extension 1001" <sip:2706446@buddyip>;party=calling;screen=yes;privacy=off
v=0
o=FreeSWITCH 1412565842 1412565843 IN IP4 myip
s=FreeSWITCH
c=IN IP4 myip
t=0 0
m=audio 23912 RTP/AVP 3 0 8 9 101 13
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
------------------------------------------------------------------------
recv 363 bytes from udp/[buddyip]:5060 at 12:02:34.883681:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myip:5080;rport=5080;branch=z9hG4bKaejpQ8ccSFa0B
From: "Extension 1001" <sip:FreeSWITCH@buddyip>;tag=2N77KS1Ke6gpN
To: <sip:666@buddyip>
Call-ID: bc64e628-c7e2-1232-0e89-4d7ce0605bb2
CSeq: 65958814 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.14b+git~20141001T023048Z~a39db86863~64bit
Content-Length: 0
------------------------------------------------------------------------
recv 724 bytes from udp/[buddyip]:5060 at 12:02:34.891400:
------------------------------------------------------------------------
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP myip:5080;rport=5080;branch=z9hG4bKaejpQ8ccSFa0B
From: "Extension 1001" <sip:FreeSWITCH@buddyip>;tag=2N77KS1Ke6gpN
To: <sip:666@buddyip>;tag=Z3pZa7D83Zt6H
Call-ID: bc64e628-c7e2-1232-0e89-4d7ce0605bb2
CSeq: 65958814 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.14b+git~20141001T023048Z~a39db86863~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Length: 0
------------------------------------------------------------------------
send 324 bytes to udp/[buddyip]:5060 at 12:02:34.891596:
------------------------------------------------------------------------
ACK sip:666@buddyip SIP/2.0
Via: SIP/2.0/UDP myip:5080;rport;branch=z9hG4bKaejpQ8ccSFa0B
Max-Forwards: 69
From: "Extension 1001" <sip:FreeSWITCH@buddyip>;tag=2N77KS1Ke6gpN
To: <sip:666@buddyip>;tag=Z3pZa7D83Zt6H
Call-ID: bc64e628-c7e2-1232-0e89-4d7ce0605bb2
CSeq: 65958814 ACK
Content-Length: 0
------------------------------------------------------------------------
2014-10-06 12:02:34.884694 [NOTICE] sofia.c:7306 Hangup sofia/external/666 [CS_CONSUME_MEDIA] [CALL_REJECTED]
2014-10-06 12:02:34.899162 [INFO] mod_dptools.c:3234 Originate Failed. Cause: CALL_REJECTED
2014-10-06 12:02:34.899162 [NOTICE] switch_channel.c:4685 Hangup sofia/internal/1001@myip [CS_EXECUTE] [CALL_REJECTED]
send 888 bytes to udp/[myip]:51155 at 12:02:34.910248:
------------------------------------------------------------------------
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP myip:51155;rport=51155;branch=z9hG4bKPjdQcDT3A-9MHF6CkHL-i9ocmvZjxVxGnD
Max-Forwards: 70
From: "me" <sip:1001@myip>;tag=Hd47q6ldQvMGLJO5RcMsO4AJQwWmRU28
To: <sip:666@myip>;tag=a1SHm0v64rFtD
Call-ID: WW8ZDSQvHKuKTSjTJTX.hiefO6liAh7W
CSeq: 24075 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.4.9+git~20140929T194948Z~ae069dcca7~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Reason: Q.850;cause=21;text="CALL_REJECTED"
Content-Length: 0
Remote-Party-ID: "666" <sip:666@myip>;party=calling;privacy=off;screen=no
------------------------------------------------------------------------
recv 345 bytes from udp/[myip]:51155 at 12:02:34.910602:
------------------------------------------------------------------------
ACK sip:666@myip SIP/2.0
Via: SIP/2.0/UDP myip:51155;rport;branch=z9hG4bKPjdQcDT3A-9MHF6CkHL-i9ocmvZjxVxGnD
Max-Forwards: 70
From: "me" <sip:1001@myip>;tag=Hd47q6ldQvMGLJO5RcMsO4AJQwWmRU28
To: <sip:666@myip>;tag=a1SHm0v64rFtD
Call-ID: WW8ZDSQvHKuKTSjTJTX.hiefO6liAh7W
CSeq: 24075 ACK
Content-Length: 0
------------------------------------------------------------------------
2014-10-06 12:02:34.914727 [NOTICE] switch_core_session.c:1633 Session 28 (sofia/external/666) Ended
2014-10-06 12:02:34.914727 [NOTICE] switch_core_session.c:1637 Close Channel sofia/external/666 [CS_DESTROY]
2014-10-06 12:02:34.945164 [NOTICE] switch_core_session.c:1633 Session 27 (sofia/internal/1001@myip) Ended
2014-10-06 12:02:34.945164 [NOTICE] switch_core_session.c:1637 Close Channel sofia/internal/1001@myip [CS_DESTROY]
最佳答案
它的工作原理知道。我在 sip_profiles/external/mygateway.xml 中创建了一个网关,看起来像
<include>
<gateway name="buddygateway">
<param name="proxy" value="buddyip"/>
<param name="register" value="false"/>
<param name="caller-id-in-from" value="true"/> <!--Most gateways seem to want this-->
</gateway>
</include>
并在 dialplan/default/outbound_calls.xml 中创建了一个出站分机,如下所示:
<include>
<extension name="outbound_calls">
<condition field="destination_number" expression="^BUDDYPREFIX(\d*)$">
<action application="bridge" data="sofia/gateway/buddygateway/$1"/>
</condition>
</extension>
</include>
所以我现在调用的每个号码都以 BUDDYPREFIX 开头,调用远程服务器上的号码。
感谢您的回答 :) 希望这会对某些人有所帮助。
关于voip - 如何将 FreeSwitch 连接到 FreeSwitch?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26212822/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!