- REGISTER sip: 124.40 . 120.188 : 5060 SIP / 2.0
- Via: SIP/ 2.0 / UDP 124.42 . 4.203 : 15500 ;branch = z9hG4bK - d8754z -1049ed261d2e643d - 1 --- d8754z -;rport
- Max - Forwards: 70
- Contact: < sip: 19988888888 @ 192.168 . 2.65 : 12344 ;rinstance =7cd1c532e92fdb0e > ;expires =
- To: " 19988888888 " < sip: 19988888888 @ 124.40 . 120.188 : 5060 >
- From: " 19988888888 " < sip: 19988888888 @ 124.40 . 120.188 : 5060 >;tag =203ba359
- Call -ID: Yzc4N2IwMzY5OWU4MTdkMzY0NWY4OWU3NjMzNmJiM2U.
- CSeq: 1 REGISTER
- Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
- User - Agent: eyeBeam release 1105a stamp 56793
- Content- Length:
2. 發(fā)送到的服務(wù)器支持rport機(jī)制,它看到請求中的rport后,將通過分析UDP包信息得到的的NAT的公網(wǎng)地址(124.42.4.203)和端口信息(15500)分別作為received和rport屬性帶給客戶端:
- SIP / 2.0 200 OK
- Via: SIP / 2.0 / UDP 124.42 . 4.203 : 15500 ;branch = z9hG4bK - d8754z -1049ed261d2e643d - 1 --- d8754z - ;rport = 15500 ;received = 124.42. 4.203
- From: " 19988888888 " < sip: 19988888888 @ 124.40 . 120.188 : 5060 >;tag = 203ba359
- To: " 19988888888 " < sip: 19988888888 @ 124.40 . 120.188 : 5060 > ;tag= 0005 - 058 - 7d6dc90516ae2e21
- Call - ID: Yzc4N2IwMzY5OWU4MTdkMzY0NWY4OWU3NjMzNmJiM2U.
- CSeq: 4 REGISTER
- Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,UPDATE,PRACK,REFER,SUBSCRIBE,NOTIFY,MESSAGE
- Contact: < sip: 124.40 . 120.188 : 5060 >
- Content - Length:
3. 客戶端在得到響應(yīng)信息后,知道了所使用的公網(wǎng)地址和端口,在之后定期重發(fā)的REGISTER信息中,Contact變換成124.42.4.203: 15500,例如新發(fā)的REGISTER信息變?yōu)椋?/div>
- REGISTER sip: 124.40 . 120.188 : 5060 SIP / 2.0
- Via: SIP / 2.0 / UDP 124.42 . 4.203 : 15500 ;branch = z9hG4bK - d8754z -1049ed261d2e643d - 1 --- d8754z - ;rport
- Max - Forwards: 70
- Contact: < sip: 19988888888 @ 124.42 . 4.203 : 15500 ;rinstance =7cd1c532e92fdb0e > ;expires =
- To: " 19988888888 " < sip: 19988888888 @ 124.40 . 120.188 : 5060 >
- From: " 19988888888 " < sip: 19988888888 @ 124.40 . 120.188 : 5060 >;tag = 203ba359
- Call - ID: Yzc4N2IwMzY5OWU4MTdkMzY0NWY4OWU3NjMzNmJiM2U.
- CSeq: 2 REGISTER
- Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
- User - Agent: eyeBeam release 1105a stamp 56793
- Content - Length:
這樣IPPBX(或者SIP Proxy)知道了怎么將消息,發(fā)送給放在Nat后面的SIP終端,實(shí)現(xiàn)了NAT穿透。
備注:
- 若使用freeswitch服務(wù)器,rport機(jī)制沒有生效時(shí),看下freeswithc的sip profile里面的NDLB-force-rport參數(shù),設(shè)為 NDLB-force-rport=safe , 重啟該profile 生效
- 若是分機(jī)的contact地址是私網(wǎng)的,導(dǎo)致無法送呼叫到分機(jī),
相關(guān)閱讀:
- ·鼎信通達(dá)UC2000融合網(wǎng)關(guān)2015-05-25 15:39:00
- ·鼎信通達(dá)UC100融合網(wǎng)關(guān)2015-05-25 15:40:22
- ·鼎信通達(dá)無線融合語音網(wǎng)關(guān) 又雙叒叕助你走出困境2016-11-01 10:36:57
- ·鼎信通達(dá)MTG3000新一代智能中繼網(wǎng)關(guān)2016-11-15 15:58:39
- ·鼎信通達(dá)主辦‘智能網(wǎng)關(guān)“發(fā)現(xiàn)”之旅2017-06-02 14:55:41
分享到:
收藏