Hallo Leute,
ich bin dabei eine Library für VoIP zu entwickeln. Grundsätzlich funktioniert dabei nun auch schon SIP, SDP und RTP. Allerdings gibt es nun ein kleines Problem. Meine Bibliothek baut erfolgreich eine Verbindung zur Gegenstelle (INVITE, Handshake, etc.) auf und die Verbindung bleibt bestehen. Die Asterisk Telefonanlage, die dazwischen hängt, versteht nun jedoch mein ACK nicht und sendet zyklisch die 200 OK Antwort an meinen SIP Client zurück. Bis die Anzahl der Wiederholungen zu einem Abbruch der Verbindung führen. Das Gespräch ist dann beendet.
Mein ACK Sieht so aus:
Hier auch noch den kompletten Call Verlauf: (Wer das lieber in Wireshark haben möchte für den habe ich die Wireshark Dumps angehängt)
Anhang anzeigen AckNotRecognizedByAsterisk.zip
Hat jemand eine Idee woran das liegen kann? Meiner Meinung nach müssten die SIP Spezifikationen eingehalten sein und die Tags bei to und from, sowie branch und call Id sollten passen.
Viele grüße
MeisterM
ich bin dabei eine Library für VoIP zu entwickeln. Grundsätzlich funktioniert dabei nun auch schon SIP, SDP und RTP. Allerdings gibt es nun ein kleines Problem. Meine Bibliothek baut erfolgreich eine Verbindung zur Gegenstelle (INVITE, Handshake, etc.) auf und die Verbindung bleibt bestehen. Die Asterisk Telefonanlage, die dazwischen hängt, versteht nun jedoch mein ACK nicht und sendet zyklisch die 200 OK Antwort an meinen SIP Client zurück. Bis die Anzahl der Wiederholungen zu einem Abbruch der Verbindung führen. Das Gespräch ist dann beendet.
Mein ACK Sieht so aus:
Code:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bKc4c5861e01d2401
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 1 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
Hier auch noch den kompletten Call Verlauf: (Wer das lieber in Wireshark haben möchte für den habe ich die Wireshark Dumps angehängt)
Anhang anzeigen AckNotRecognizedByAsterisk.zip
Code:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bKab47103a23db444
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 1 INVITE
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 176
v=0
o=- 712283435031 712283435031 IN IP4 192.168.9.72
s=REV
c=IN IP4 192.168.9.72
t=0 0
m=audio 61038 RTP/AVP 0 8
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=sendrecv
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bKab47103a23db444;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 1 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6932af56"
Content-Length: 0
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bKc4c5861e01d2401
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 1 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bK151c84fb5a454d0
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Authorization: Digest username="11", realm="asterisk", nonce="6932af56", uri="sip:[email protected]:5060", response="e9c4ba67513fe6060998d5f1e20559fb", algorithm=MD5
Contact: <sip:[email protected]:64086>
Content-Length: 176
v=0
o=- 712283435031 712283435031 IN IP4 192.168.9.72
s=REV
c=IN IP4 192.168.9.72
t=0 0
m=audio 61038 RTP/AVP 0 8
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=sendrecv
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Length: 0
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 228
v=0
o=root 327428531 327428531 IN IP4 192.168.9.64
s=Asterisk PBX 13.4.0
c=IN IP4 192.168.9.64
t=0 0
m=audio 11680 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bKc1446fd55fa74dc
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 228
v=0
o=root 327428531 327428531 IN IP4 192.168.9.64
s=Asterisk PBX 13.4.0
c=IN IP4 192.168.9.64
t=0 0
m=audio 11680 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bK5f920cfed1fd4a8
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 228
v=0
o=root 327428531 327428531 IN IP4 192.168.9.64
s=Asterisk PBX 13.4.0
c=IN IP4 192.168.9.64
t=0 0
m=audio 11680 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bK8d212c41e1fe4d4
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 228
v=0
o=root 327428531 327428531 IN IP4 192.168.9.64
s=Asterisk PBX 13.4.0
c=IN IP4 192.168.9.64
t=0 0
m=audio 11680 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bK4651808dec3440e
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 228
v=0
o=root 327428531 327428531 IN IP4 192.168.9.64
s=Asterisk PBX 13.4.0
c=IN IP4 192.168.9.64
t=0 0
m=audio 11680 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bKb9350664298b456
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 228
v=0
o=root 327428531 327428531 IN IP4 192.168.9.64
s=Asterisk PBX 13.4.0
c=IN IP4 192.168.9.64
t=0 0
m=audio 11680 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bKf0010d097802479
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bK151c84fb5a454d0;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 INVITE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 228
v=0
o=root 327428531 327428531 IN IP4 192.168.9.64
s=Asterisk PBX 13.4.0
c=IN IP4 192.168.9.64
t=0 0
m=audio 11680 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bK01dc6842e019489
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 2 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bKe18abc253ed3494
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 3 BYE
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
SIP/2.0 481 Call leg/transaction does not exist
Via: SIP/2.0/UDP 192.168.9.72:64086;branch=z9hG4bKe18abc253ed3494;received=192.168.9.72;rport=64086
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 3 BYE
Server: Asterisk PBX 13.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.72:64086;rport;branch=z9hG4bKe18abc253ed3494
From: "REV Commander System" <sip:[email protected]:64086>;tag=fa8e6cdd2a
To: <sip:[email protected]:5060>;tag=as4e01f0ed
Call-ID: a088a650b06f487c8509765b710841f8@holgerPC
CSeq: 3 ACK
Max-Forwards: 70
User-Agent: REV SIP Library 1.2.6.0
Contact: <sip:[email protected]:64086>
Content-Length: 0
Hat jemand eine Idee woran das liegen kann? Meiner Meinung nach müssten die SIP Spezifikationen eingehalten sein und die Tags bei to und from, sowie branch und call Id sollten passen.
Viele grüße
MeisterM