twilio - VOIP 通信中正确形成的 200 ACK 响应的格式
问题描述
我们有一个 Grandstream UCM6204 PBX 通过 Twilio 连接到注册的 SIP 弹性中继。我们的中继发起呼叫在大约 60 秒后掉线。Twilio 责备Grandstream,但Grandstream 责备Twilio。每个人都说另一个人没有正确格式化或没有正确读取数据包。导出了带有单个 200 ACK 数据包的 Pcap 日志。
根据 Twilio 的说法,数据包应该有这样的确认:ACK sip:172.18.23.153:5060 SIP/2.0 Grandstream 说他们(他们的单位)不会将其发送到私有 IP 地址,应该发送到记录-路由IP地址,它将根据标头信息转发到私有IP。我在这里太新手了,不知道什么是对的,什么是错的,所以任何建议都会很棒。
No. Time Source Destination Protocol Length Info
3 0.119432 96.10.11.12 54.172.60.2 SIP/SDP 1217 Status: 200 OK |
Frame 3: 1217 bytes on wire (9736 bits), 1217 bytes captured (9736 bits)
Encapsulation type: Linux cooked-mode capture (25)
Arrival Time: Dec 19, 2018 13:51:32.749232000 Eastern Standard Time
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1545245492.749232000 seconds
[Time delta from previous captured frame: 0.050481000 seconds]
[Time delta from previous displayed frame: 0.050481000 seconds]
[Time since reference or first frame: 0.119432000 seconds]
Frame Number: 3
Frame Length: 1217 bytes (9736 bits)
Capture Length: 1217 bytes (9736 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: sll:ethertype:ip:udp:sip:sdp]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Linux cooked capture
Packet type: Unicast to us (0)
Link-layer address type: 1
Link-layer address length: 6
Source: 0e:d7:c3:5c:55:24 (0e:d7:c3:5c:55:24)
Unused: 0000
Protocol: IPv4 (0x0800)
Internet Protocol Version 4, Src: 96.10.11.12, Dst: 54.172.60.2
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 1201
Identification: 0x0000 (0)
Flags: 0x4000, Don't fragment
0... .... .... .... = Reserved bit: Not set
.1.. .... .... .... = Don't fragment: Set
..0. .... .... .... = More fragments: Not set
...0 0000 0000 0000 = Fragment offset: 0
Time to live: 39
Protocol: UDP (17)
Header checksum: 0x3257 [validation disabled]
[Header checksum status: Unverified]
Source: 96.10.11.12
Destination: 54.172.60.2
User Datagram Protocol, Src Port: 5060, Dst Port: 5060
Source Port: 5060
Destination Port: 5060
Length: 1181
Checksum: 0xfa57 [unverified]
[Checksum Status: Unverified]
[Stream index: 0]
Session Initiation Protocol (200)
Status-Line: SIP/2.0 200 OK
Status-Code: 200
[Resent Packet: False]
[Request Frame: 1]
[Response Time (ms): 119]
Message Header
Via: SIP/2.0/UDP 54.172.60.2:5060;rport=5060;received=54.172.60.2;branch=z9hG4bK0d03.870e90c7.0
Transport: UDP
Sent-by Address: 54.172.60.2
Sent-by port: 5060
RPort: 5060
Received: 54.172.60.2
Branch: z9hG4bK0d03.870e90c7.0
Via: SIP/2.0/UDP 172.18.15.132:5060;rport=5060;received=172.18.15.132;branch=z9hG4bK5d21b0af-3104-4e32-96a7-7e89edd39a93_6772d868_310-9499633517006747707
Transport: UDP
Sent-by Address: 172.18.15.132
Sent-by port: 5060
RPort: 5060
Received: 172.18.15.132
Branch: z9hG4bK5d21b0af-3104-4e32-96a7-7e89edd39a93_6772d868_310-9499633517006747707
Record-Route: <sip:54.172.60.2:5060;lr;ftag=90419967_6772d868_5d21b0af-3104-4e32-96a7-7e89edd39a93>
Record-Route URI: sip:54.172.60.2:5060;lr;ftag=90419967_6772d868_5d21b0af-3104-4e32-96a7-7e89edd39a93
Record-Route Host Part: 54.172.60.2
Record-Route Host Port: 5060
Record-Route URI parameter: lr
Record-Route URI parameter: ftag=90419967_6772d868_5d21b0af-3104-4e32-96a7-7e89edd39a93
Call-ID: 937861cfda42d874af27d391663108b1@0.0.0.0
From: <sip:+12485551212@somebody.pstn.twilio.com>;tag=90419967_6772d868_5d21b0af-3104-4e32-96a7-7e89edd39a93
SIP from address: sip:+12485551212@somebody.pstn.twilio.com
SIP from address User Part: +12485551212
E.164 number (MSISDN): 12485551212
Country Code: Americas (1)
SIP from address Host Part: somebody.pstn.twilio.com
SIP from tag: 90419967_6772d868_5d21b0af-3104-4e32-96a7-7e89edd39a93
To: <sip:+12486661212@96.10.11.12>;tag=68625bc3-5cb5-4bd4-a255-ce12744a3514
SIP to address: sip:+12486661212@96.10.11.12
SIP to address User Part: +12486661212
E.164 number (MSISDN): 12486661212
Country Code: Americas (1)
SIP to address Host Part: 96.10.11.12
SIP to tag: 68625bc3-5cb5-4bd4-a255-ce12744a3514
CSeq: 28344 INVITE
Sequence Number: 28344
Method: INVITE
Server: Grandstream UCM6204V1.5A 1.0.18.12
Contact: <sip:+12485551212@192.168.4.10:5060>
Contact URI: sip:+12485551212@192.168.4.10:5060
Contact URI User Part: +12485551212
E.164 number (MSISDN): 12485551212
Country Code: Americas (1)
Contact URI Host Part: 192.168.4.10
Contact URI Host Port: 5060
Allow: OPTIONS, INFO, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE, REGISTER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 237
Message Body
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): - 1796373137 1796373139 IN IP4 192.168.4.10
Owner Username: -
Session ID: 1796373137
Session Version: 1796373139
Owner Network Type: IN
Owner Address Type: IP4
Owner Address: 192.168.4.10
Session Name (s): Asterisk
Connection Information (c): IN IP4 192.168.4.10
Connection Network Type: IN
Connection Address Type: IP4
Connection Address: 192.168.4.10
Time Description, active time (t): 0 0
Session Start Time: 0
Session Stop Time: 0
Media Description, name and address (m): audio 13894 RTP/AVP 0 101
Media Type: audio
Media Port: 13894
Media Protocol: RTP/AVP
Media Format: ITU-T G.711 PCMU
Media Format: DynamicRTP-Type-101
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute Fieldname: rtpmap
Media Format: 0
MIME Type: PCMU
Sample Rate: 8000
Media Attribute (a): rtpmap:101 telephone-event/8000
Media Attribute Fieldname: rtpmap
Media Format: 101
MIME Type: telephone-event
Sample Rate: 8000
Media Attribute (a): fmtp:101 0-16
Media Attribute Fieldname: fmtp
Media Format: 101 [telephone-event]
Media format specific parameters: 0-16
Media Attribute (a): ptime:20
Media Attribute Fieldname: ptime
Media Attribute Value: 20
Media Attribute (a): maxptime:150
Media Attribute Fieldname: maxptime
Media Attribute Value: 150
Media Attribute (a): sendrecv
解决方案
推荐阅读
- python - Pandas 在同一个条形图上绘制多个具有不同变量的 df
- php - 右导航栏错误,未在 Laravel 中进行身份验证
- sql - 使用 1 个查询在一个列中显示 COUNT(Items) 和 COUNT(相同的项目,但在另一列中具有特定值)
- lua - Lua在表中找到随机键匹配
- java - 当我在使用电子邮件/密码创建用户帐户时遇到此异常 (com.google.firebase.FirebaseException),我应该怎么做?
- ios - 有人可以帮我解决这个 uibutton 错误吗?
- javascript - 在匿名函数中按索引读取列表在javascript中不起作用
- r - 如何更改使用“precintcon”R 包绘制的洛伦兹曲线的标题?
- javascript - 函数式编程将 Monad 数组转换为单个 Monad 数组
- javascript - jquery ajax中下拉的onchange函数