专注三网融合之接入网/核心网等技术,音视频信令和媒体传输相关协议 专家前辈入驻, 谈笑有鸿儒,往来无白丁,共同学习探讨IMS/IPPBX相关技术 欢迎同行加入IMS/IPPBX/VoIP/SIP QQ交流群:255404741(猛戳直接加群) Precondition说明:
本域:imsclub.com/122.112.86.102: 5060
测试分机:sip:[email protected]
外域:42.96.203.28:5060
测试分机:sip:[email protected]
目的:实现注册在imsclub.com/122.112.86.102的分机可以直接呼叫注册在42.96.203.28上的分机,例如1010拨进行直接呼叫88885000(42.96.203.28的服务器需要配置相应的sip route到imsclub.com)。
fs_cli测试
受此启发,可以写个dialplan,支持outbound sip server,并且通过oubound sip server直接呼出到其他域的分机,从而不需要以SIP Trunk的方式实现outgoing call。(当然对应的outbound sip server 要配置成接受外域对接的incoming call)
dialplan配置
conf/dialplan/default/下增加
00_ipconn_outbound_to_zhangwenge.xml
dialplan配置生效
freeswitch@internal> reloadxml
1. 确保本次测试不受SIP Trunk的干扰
除了无效的example.com 没有其他gateway:
freeswitch@internal> sofia status
Name Type Data State
=======================================================================================
122.112.86.102 alias internal ALIASED
internal-ipv6 profile sip:mod_sofia@[::1]:5060 RUNNING (0)
=======================================================================================
3 profiles 1 alias
2. 1010拨88885000直接呼叫(注意不是输入sip uri [email protected])
88885000话机接起,这样本域对接的outgoing call 成功了!抓包确认包确实是从 122.112.86.102:5060-->42.96.203.28:5060(而不是通过sip trunk 122.112.86.102:5080到达42.96.203.28:5060)
Via: SIP/2.0/UDP 122.112.86.102;rport;branch=z9hG4bKvFjNt4209Q00m
Max-Forwards: 69
From: "Extension 1010" ;tag=597445KmmcvXp
To:
Call-ID: ae7f5675-6520-1232-9784-525400a16654
CSeq: 60529533 INVITE
Contact:
User-Agent: FreeSWITCH-mod_sofia/1.2.23~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Privacy: none
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 207
P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mmtel
P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000
X-FS-Support: update_display,send_info
P-Asserted-Identity: "Extension 1010"
v=0
o=FreeSWITCH 1401709741 1401709742 IN IP4 122.112.86.102
s=FreeSWITCH
c=IN IP4 122.112.86.102
t=0 0
m=audio 21454 RTP/AVP 8 0 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
鸣谢:感谢 张文阁 前辈提供对接的sip服务器42.96.203.28
转载请注明出处 http://blog.csdn.net/xuyunzhang/article/details/28120903 谢谢。