这是一个海康存在内网穿透时的国标取流样本,其中有个小细节
| INFO3 | 150951346 <jcallback.c: 1490> cb_snd123456xx (id=76086)
| INFO4 | 150951346 <osip_transaction.c: 373> sipevent evt: method called!
| INFO2 | 150951495 <osip_transaction.c: 136> allocating transaction resource 76087 1379186844
| INFO2 | 150951495 <ict.c: 32> allocating ICT context
| INFO4 | 150951495 <osip.c: 1456> 1 Pending event already in transaction !
| INFO4 | 150951495 <osip_transaction.c: 349> sipevent tr->transactionid: 76087
| INFO4 | 150951495 <osip_transaction.c: 350> sipevent tr->state: 0
| INFO4 | 150951496 <osip_transaction.c: 351> sipevent evt->type: 16
| INFO4 | 150951496 <osip_transaction.c: 352> sipevent evt->sip: e81c6700
| INFO2 | 150951496 <eXutils.c: 755> DNS resolution with 171.88.46.73:63201
| INFO2 | 150951496 <eXutils.c: 779> getaddrinfo returned: 171.88.46.73 port 63201
| INFO1 | 150951496 <eXtl_udp.c: 779> Message sent: (to dest=171.88.46.73:63201)
INVITE sip:34020000001320000074@171.88.46.73:63201 SIP/2.0
Via: SIP/2.0/UDP 192.168.200.2:5066;rport;branch=z9hG4bK1814584796
From: <sip:34020000002000000065@112.33.56.65:5066>;tag=106804793
To: <sip:34020000001320000074@171.88.46.73:63201>
Call-ID: 1379186844
CSeq: 1375 INVITE
Contact: <sip:34020000002000000065@112.33.56.65:5066>
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: JUNTAI SIP UAS/1.0
Subject: 34020000001320000074:1,34020000002000000065:1
Content-Length: 204
v=0
o=34020000002000000065 0 0 IN IP4 112.33.56.65
s=Play
c=IN IP4 112.33.56.65
t=0 0
m=video 36557 TCP/RTP/AVP 96
a=recvonly
a=rtpmap:96 PS/90000
a=setup:passive
a=connection:new
y=0200003353
| INFO3 | 150951561 <udp.c: 1426> MESSAGE REC. CALLID:1379186844
| INFO4 | 150951561 <osip.c: 1456> 1 Pending event already in transaction !
| INFO4 | 150951561 <osip_transaction.c: 349> sipevent tr->transactionid: 76087
| INFO4 | 150951561 <osip_transaction.c: 350> sipevent tr->state: 1
| INFO4 | 150951561 <osip_transaction.c: 351> sipevent evt->type: 13
| INFO4 | 150951561 <osip_transaction.c: 352> sipevent evt->sip: fc10ad60
| INFO3 | 150951561 <jcallback.c: 511> cb_rcv1xx (id=76087)
| INFO4 | 150951561 <osip_transaction.c: 373> sipevent evt: method called!
| INFO1 | 150951571 <eXtl_udp.c: 452> Message received from: 171.88.46.73:63201
| INFO1 | 150951571 <udp.c: 1408> Received message len=679 from 171.88.46.73:63201:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.200.2:5066;rport=5066;branch=z9hG4bK1814584796;received=112.33.56.65
From: <sip:34020000002000000065@112.33.56.65:5066>;tag=106804793
To: <sip:34020000001320000074@171.88.46.73:63201>;tag=1863489378
Call-ID: 1379186844
CSeq: 1375 INVITE
Contact: <sip:34020000001320000074@171.88.46.73:63201>
Content-Type: application/sdp
User-Agent: IP Camera
Content-Length: 261
v=0
o=34020000001320000074 2926 2926 IN IP4 192.168.3.74
s=Play
c=IN IP4 192.168.3.74
t=0 0
m=video 15060 TCP/RTP/AVP 96
a=setup:active
a=sendonly
a=rtpmap:96 PS/90000
a=username:34020000001320000074
a=password:123456
a=filesize:0
y=0200003353
f=
这里的Contact: <sip:34020000001320000074@171.88.46.73:63201>是外网地址了,当然,这是海康比较新的设备会这样,在老的设备上还是标注的是内网的信息哈!!!!这里对了在ack和bye时才能正确找到应该返回的地址
| INFO3 | 150951571 <udp.c: 1426> MESSAGE REC. CALLID:1379186844
| INFO4 | 150951571 <osip.c: 1456> 1 Pending event already in transaction !
| INFO4 | 150951572 <osip_transaction.c: 349> sipevent tr->transactionid: 76087
| INFO4 | 150951572 <osip_transaction.c: 350> sipevent tr->state: 2
| INFO4 | 150951572 <osip_transaction.c: 351> sipevent evt->type: 14
| INFO4 | 150951572 <osip_transaction.c: 352> sipevent evt->sip: fc081190
| INFO3 | 150951572 <jcallback.c: 930> cb_rcv2xx (id=76087)
| INFO1 | 150951572 <jcallback.c: 217> cb_nict_kill_transaction (id=76087)
| INFO4 | 150951572 <osip_transaction.c: 373> sipevent evt: method called!
| INFO4 | 150951572 <sdp_message.c: 1481> The rfc2327 says there should be at least an email or a phone header!- anyway, we don't mind about it.
| INFO2 | 150951573 <eXutils.c: 755> DNS resolution with 171.88.46.73:63201
| INFO2 | 150951573 <eXutils.c: 779> getaddrinfo returned: 171.88.46.73 port 63201
| INFO1 | 150951573 <eXtl_udp.c: 779> Message sent: (to dest=171.88.46.73:63201)
ACK sip:34020000001320000074@171.88.46.73:63201 SIP/2.0
Via: SIP/2.0/UDP 192.168.200.2:5066;rport;branch=z9hG4bK1918144127
From: <sip:34020000002000000065@112.33.56.65:5066>;tag=106804793
To: <sip:34020000001320000074@171.88.46.73:63201>;tag=1863489378
Call-ID: 1379186844
CSeq: 1375 ACK
Contact: <sip:34020000002000000065@112.33.56.65:5066>
Max-Forwards: 70
User-Agent: JUNTAI SIP UAS/1.0
Content-Length: 0
| INFO3 | 150953100 <jcallback.c: 447> cb_sndbye (id=76091)
| INFO4 | 150953100 <osip_transaction.c: 373> sipevent evt: method called!
| INFO1 | 150953159 <eXtl_udp.c: 452> Message received from: 171.88.46.73:63201
| INFO1 | 150953159 <udp.c: 1408> Received message len=323 from 171.88.46.73:63201:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.200.2:5066;rport=5066;branch=z9hG4bK710963391;received=112.33.56.65
From: <sip:34020000002000000065@112.33.56.65:5066>;tag=106804793
To: <sip:34020000001320000074@171.88.46.73:63201>;tag=1863489378
Call-ID: 1379186844
CSeq: 1376 BYE
User-Agent: IP Camera
Content-Length: 0