I'm using the VoIP provider Messagenet and I see that it sends this INVITE to my client:
INVITE sip:me#my.ip.address;transport=udp SIP/2.0
Record-Route: <sip:212.97.59.76:5061;r2=on;lr=on;ftag=as2a6c9e96;rpp=np>
Record-Route: <sip:212.97.59.76;r2=on;lr=on;ftag=as2a6c9e96;rpp=np>
Via: SIP/2.0/UDP 212.97.59.76:5061;branch=z9hG4bKb812.a8e25f17.0
Via: SIP/2.0/UDP 193.227.104.21:5060;branch=z9hG4bK1966d0a8
Max-Forwards: 69
From: "fromname" <sip:fromnumber#sip.messagenet.it>;tag=as2a6c9e96
To: <sip:mynumber#212.97.59.76>
Contact: <sip:fromnumber#193.227.104.21:5060>
Call-ID: 46cee45e062a30e3372663265a0be595#sip.messagenet.it
CSeq: 102 INVITE
User-Agent: whisky
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-Mnet-InLeg: whisky:1530689207.16483286;NH9HCiZ0TqZGK1ACkkhlvh67g1ig7LPEf+W5lblauyjqYqxgm1B2stIr6Mog/CC6
Content-Type: application/sdp
Content-Length: 377
v=0
o=root 60186075 60186075 IN IP4 193.227.104.23
s=whisky
c=IN IP4 193.227.104.23
t=0 0
m=audio 50216 RTP/AVP 18 8 3 0 97 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
My question is: what do the parameters r2 and rpp mean in the Record-Route headers?
Record-Route: <sip:212.97.59.76:5061;r2=on;lr=on;ftag=as2a6c9e96;rpp=np>
Record-Route: <sip:212.97.59.76;r2=on;lr=on;ftag=as2a6c9e96;rpp=np>
I'm looking for some documentations about this, but I have found nothing until now.
Related
I use the open source sip library liblinphone to make a outgoing call in Swift:
func inviteCall(lc: COpaquePointer){
let identity = "sip:07XXXXXX#XXX.XXX.XXX.XX:5060"
let callee = linphone_address_new(identity)
var call: COpaquePointer = linphone_core_invite_address(lc, callee)
for _ in 1...20{
linphone_core_iterate(lc); /* first iterate initiates registration */
ms_usleep(1000 * 1000);
}
}
I got the following eror meesage from SIP Server:
2016-06-09 10:38:01:490 ortp-message-channel [0x7ffe73845000]: received [315] new bytes from [UDP://1.1.1.1:5060]:
SIP/2.0 403 Phone Check Failed
Via: SIP/2.0/UDP 172.20.10.2:5060;branch=z9hG4bK.wT4sI9IJA;rport=61355;received=180.217.232.152
From: <sip:XXXXXX#1.1.1.1>;tag=q6lu03sDI
To: sip:XXXXXX#1.1.1.1;tag=00ddf5d9798df559a35d085b6da2ca8e.8b81
CSeq: 21 INVITE
Call-ID: al9nF3pfWh
Content-Length: 0
I googled about 403 Phone Check Failed, but not mucn information available. Any idea how to troubleshoot it ? Thanks.
PS: Account/IP information are masked
This was the invite message sent to SIP Server
INVITE sip:XXXXXXX216#XXX.XXX.XXX.XXX:5060 SIP/2.0
Via: SIP/2.0/UDP 172.20.10.2:5060;branch=z9hG4bK.wT4sI9IJA;rport
From: <sip:XXXXXXX2519#XXX.XXX.XXX.XXX>;tag=q6lu03sDI
To: sip:XXXXXXX216#XXX.XXX.XXX.XXX
CSeq: 21 INVITE
Call-ID: al9nF3pfWh
Max-Forwards: 70
Supported: replaces, outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE
Content-Type: application/sdp
Content-Length: 473
Contact: <sip:XXXXXXX2519#180.217.232.152:61355>;+sip.instance="<urn:uuid:5b5a5dd0-5447-4066-9a3a-b652eb4db075>"
User-Agent: (belle-sip/1.4.2)
Proxy-Authorization: Digest realm="XXX.XXX.XXX.XXX", nonce="5758d7b1e9287b8975df56f3b8a5e9f3f455b585", username="XXXXXXX2519", uri="sip:XXXXXXX216#XXX.XXX.XXX.XXX:5060", response="cf978e8e12c032aafa9a03e5d9450e9f", cnonce="7fb0fe3c", nc=00000001, qop=auth
v=0
o=XXXXXXX2519 238 1151 IN IP4 172.20.10.2
s=Talk
c=IN IP4 172.20.10.2
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
m=audio 7078 RTP/AVP 96 97 98 0 8 101 99 100
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:97 speex/16000
a=fmtp:97 vbr=on
a=rtpmap:98 speex/8000
a=fmtp:98 vbr=on
a=rtpmap:101 telephone-event/48000
a=rtpmap:99 telephone-event/16000
a=rtpmap:100 telephone-event/8000
a=rtcp-fb:* trr-int 5000
I found the problem. We can't do register and invite sip command in the same time. I think this caused the issue.
We are sending a sip call to one of our partner. They are sending us “Record-Route” and “Contact” headers within 200 OK message. Our side is sending ACK to the IP address mentioned in the Record-Route but it is replacing the “Contact” header with “Route” header and other side is not honoring our ACK and sending us repeated 200 OK which results into call disconnection.
I am not sure if we are violating any SIP RFC by changing "Contact" header to "Route" while maintaining the contents of the header. Can anyone shed a light on it?
Here is the 200 OK from partner side:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
Here is our ACK to 200 OK message:
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
Here is the Entire SIP dialog:
INVITE sip:+200#200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
Contact: +100<sip:+100#100.100.100.100:5060>
User-Agent: Excel_CSP/84.11.34
Supported: timer
Session-Expires: 3660
Min-SE: 300
CSeq: 1 INVITE
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 144
v=0
o=sip 0 0 IN IP4 100.100.100.100
s=SIP_Call
c=IN IP4 100.100.100.230
t=0 0
m=audio 46750 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
To: +200<sip:+200#200.200.200.2:5060>
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Server: YATE/3.0.0
Content-Length: 0
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Server: YATE/3.0.0
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
BYE sip:+100#100.100.100.100:5060 SIP/2.0
Via: SIP/2.0/UDP 200.200.200.2:5060;branch=z9hG4bK-524287-1---baf0e608a3be462e3d9534147efb1150;rport
Via: SIP/2.0/UDP 10.10.10.135:7654;rport=7654;branch=z9hG4bK962836463;received=10.10.10.135
Max-Forwards: 69
Record-Route: <sip:200.200.200.2:5060;lr>
To: <sip:+100#100.100.100.100:5060>;tag=4244235125227
From: <sip:+200#200.200.200.2:5060>;tag=784054843
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 95618 BYE
Allow: ACK, INVITE, BYE, CANCEL
User-Agent: YATE/3.0.0
Reason: SIP;cause=408;text="Request Timeout"
Content-Length: 0
SIP/2.0 200 OK
To: <sip:+100#100.100.100.100:5060>;tag=4244235125227
From: <sip:+200#200.200.200.2:5060>;tag=784054843
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 95618 BYE
Record-Route: <sip:200.200.200.2:5060;lr>
Via: SIP/2.0/UDP 200.200.200.2:5060;branch=z9hG4bK-524287-1---baf0e608a3be462e3d9534147efb1150;rport
Via: SIP/2.0/UDP 10.10.10.135:7654;rport=7654;branch=z9hG4bK962836463;received=10.10.10.135
User-Agent: Excel_CSP/84.11.34
Content-Length: 0
IP addresses and SIP TO/FROM information has been manually updated to conceal the original identity.
I have gone through RFC 3261 I found following on page # 161. I am not sure, how to read the following table. Does it mean that Contact header is not applicable in ACK to 2xx messages?
Header field where proxy ACK BYE CAN INV OPT REG
___________________________________________________________
Contact 2xx - - - m o o
The 200 Ok contains:
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
Your application doesn't look to understand the meaning of "lr" parameter: the "loose routing" parameter introduced in rfc3261. It's not even compatible with the initial rfc2543.
If your app was only compatible with rfc2543, the ACK would contains the exact message you have, but with the additionnal "lr" parameter. This would indicate to the server that the order is rfc2543, and in theory, the server would understand and re-order: (rfc3261, Section 16.6, Step 6. Postprocess routing information)
ACK sip:200.200.200.2:5060;lr SIP/2.0
Route: <sip:+100#10.10.10.135:7654>
However, a correct message should be compliant with latest rfc3261, and thus your app has to generate the following SIP message:
ACK sip:+100#10.10.10.135:7654 SIP/2.0
Route: <sip:200.200.200.2:5060;lr>
The whole issue is about wrong handling of the "lr" parameter in your application! The solution is to fix the missing "lr" and make sure the order is accurate according to rfc3261.
I'm guessing you've stripped out some parts of the SIP headers when you posted your question. Most of the Via headers are missing the mandatory branches parameter which is particularly crucial in INVITE transaction processing.
Aside from the problem AymericM hash highlighted with regards the Contact and Route headers you "could" also have another problem with regards the Via header branch parameter in your ACK request. Specifically you should take a look at Chapters 13.2.2.4 2xx Responses and 17.1.1.3 Construction of the ACK Request for details on how ACK requests should be constructed.
The key is that the ACK request must start a NEW transaction when acknowledging a non 2xx failure response. When acknowledging a 2xx response the ACK request must be an in-transaction request and use the same header fields, including the Via header branch parameter, as the original INVITE request.
Construction of ACK requests is one of the biggest gotchas in SIP.
I've installed Asterisk 11, and two wifi phones are fine to talk through asterisk server. However, a wifi phone and LTE(4G) phone can't deliver sounds.
Asterisk sip.conf
[general]
context=default ; Default context for incoming calls
bindport=5060 ; bindport is the local UDP port that Asterisk will listen on
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=alaw
register => 12121111111:1234:11111111#sipauth.deltathree.com/1000
srvlookup=no
directrtpsetup=yes
trustpid=yes
sendrpid=no
qualify=yes
callevents=yes
insecure=invite
pedantic=no
videosupport=yes
canreinvite=yes
nat=yes
externip=XXX.XXX.91.12
localnet=10.7.21.4/255.255.255.0
qualify=yes
directmedia=yes
Sip settings
Global Settings:
----------------
UDP Bindaddress: 0.0.0.0:5060
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: Yes
User Agent: Asterisk PBX 11.8.1
SDP Session Name: Asterisk PBX 11.8.1
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: asterisk
From: Domain:
Record SIP history: Off
Call Events: On
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: -1
SIP realtime: Enabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No
Network QoS Settings:
---------------------------
IP ToS SIP: CS0
IP ToS RTP audio: CS0
IP ToS RTP video: CS0
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No
Network Settings:
---------------------------
SIP address remapping: Enabled using externhost
Externhost: XXX.52.91.12:0
Externaddr: XXX.52.91.12:0
Externrefresh: 600
Localnet: XX.7.21.0/255.255.255.0
XX.7.21.0/255.255.255.0
Global Signalling Settings:
---------------------------
Codecs: (ulaw|alaw)
Codec Order: ulaw:20,alaw:20
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 0 (Disabled)
RTP Hold Timeout: 0 (Disabled)
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: No
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:0
Notify ringing state: Yes
Include CID: No
Notify hold state: No
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy: <not set>
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70
Default Settings:
-----------------
Allowed transports: UDP
Outbound transport: UDP
Context: default
Record on feature: automon
Record off feature: automon
Force rport: Yes
DTMF: rfc2833
Qualify: 2000
Keepalive: 0
Use ClientCode: No
Progress inband: Never
Language:
Tone zone: <Not set>
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: asterisk
Realtime SIP Settings:
----------------------
Realtime Peers: Yes
Realtime Regs: No
Cache Friends: No
Update: Yes
Ignore Reg. Expire: No
Save sys. name: No
Auto Clear: 120 (Disabled)
sip logs
When I look at sip logs, it looks like fine. I just see one more "invite" from server to wifi-phone.
interface: eth0 (10.7.21.0/255.255.255.0)
filter: ( port 5060 ) and (ip or ip6)
#
U 2014/04/16 22:46:28.514023 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
INVITE sip:2000#asterisk-sip-domain.com SIP/2.0.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;branch=z9hG4bK.FuKwv3ZMW;rport.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>.
CSeq: 20 INVITE.
Call-ID: Z6lXHBKOyd.
Max-Forwards: 70.
Supported: replaces, outbound.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE.
Content-Type: application/sdp.
Content-Length: 372.
Contact: <sip:1000#//WIFI-PUBLIC-IP//:1495>;+sip.instance="<urn:uuid:41bf1699-9e9a-4817-8b8c-e51f7b4ae2dc>".
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
.
v=0.
o=1000 2350 2859 IN IP4 //WIFI-PRIVATE-IP//.
s=Talk.
c=IN IP4 //WIFI-PRIVATE-IP//.
b=AS:380.
t=0 0.
m=audio 7076 RTP/AVP 124 120 111 110 0 8 101.
a=rtpmap:124 opus/48000.
a=fmtp:124 useinbandfec=1; usedtx=1.
a=rtpmap:120 SILK/16000.
a=rtpmap:111 speex/16000.
a=fmtp:111 vbr=on.
a=rtpmap:110 speex/8000.
a=fmtp:110 vbr=on.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
#
U 2014/04/16 22:46:28.517399 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;branch=z9hG4bK.FuKwv3ZMW;received=//WIFI-PUBLIC-IP//;rport=1495.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>.
Call-ID: Z6lXHBKOyd.
CSeq: 20 INVITE.
Server: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Content-Length: 0.
.
#
U 2014/04/16 22:46:28.522887 //AMAZON-EC2-PRIVATE-IP//:5060 -> //LTE-PHONE-PUBLIC-IP//:63968
INVITE sip:2000#//LTE-PHONE-PUBLIC-IP//:63968 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
Max-Forwards: 70.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>.
Contact: <sip:1000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 11.8.1.
Date: Wed, 16 Apr 2014 13:46:28 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 258.
.
v=0.
o=root 1526682879 1526682879 IN IP4 //WIFI-PRIVATE-IP//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //WIFI-PRIVATE-IP//.
t=0 0.
m=audio 7076 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:29.022450 //AMAZON-EC2-PRIVATE-IP//:5060 -> //LTE-PHONE-PUBLIC-IP//:63968
INVITE sip:2000#//LTE-PHONE-PUBLIC-IP//:63968 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
Max-Forwards: 70.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>.
Contact: <sip:1000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 11.8.1.
Date: Wed, 16 Apr 2014 13:46:28 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 258.
.
v=0.
o=root 1526682879 1526682879 IN IP4 //WIFI-PRIVATE-IP//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //WIFI-PRIVATE-IP//.
t=0 0.
m=audio 7076 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:29.113047 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: sip:2000#//LTE-PHONE-PUBLIC-IP//:63968.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
.
#
U 2014/04/16 22:46:29.426139 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;tag=zZBSo25.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
.
#
U 2014/04/16 22:46:29.426158 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;tag=zZBSo25.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
.
#
U 2014/04/16 22:46:29.427976 f:5060 -> //WIFI-PUBLIC-IP//:1495
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;branch=z9hG4bK.FuKwv3ZMW;received=//WIFI-PUBLIC-IP//;rport=1495.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
Call-ID: Z6lXHBKOyd.
CSeq: 20 INVITE.
Server: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Content-Length: 0.
.
** (WHY IT MAKES ONE MORE INVITE FROM SERVER TO WIFI-PHONE???)**
#
U 2014/04/16 22:46:30.307448 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:48504
INVITE sip:1000#//WIFI-PUBLIC-IP//:48504 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK451726cf;rport.
Max-Forwards: 70.
From: <sip:2000#//AMAZON-EC2-SERVER//>;tag=as30b8a8a5.
To: <sip:1000#//WIFI-PUBLIC-IP//:48504>.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: 1c2fd2cd6a4ac372408845e8077ba2b5#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 11.8.1.
Date: Wed, 16 Apr 2014 13:46:14 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 259.
.
v=0.
o=root 741350827 741350827 IN IP4 //LTE-PHONE-PUBLIC-IP//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //LTE-PHONE-PUBLIC-IP//.
t=0 0.
m=audio 30390 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:30.816230 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;tag=zZBSo25.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE.
Contact: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;+sip.instance="<urn:uuid:8afceca3-368f-4f57-a586-6056d3492371>".
Content-Type: application/sdp.
Content-Length: 183.
.
v=0.
o=2000 2310 1562 IN IP4 //LTE-PHONE-PUBLIC-IP//.
s=Talk.
c=IN IP4 //LTE-PHONE-PUBLIC-IP//.
b=AS:380.
t=0 0.
m=audio 30390 RTP/AVP 0 8 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
#
U 2014/04/16 22:46:30.816888 //AMAZON-EC2-PRIVATE-IP//:5060 -> //LTE-PHONE-PUBLIC-IP//:63968
ACK sip:2000#//LTE-PHONE-PUBLIC-IP//:63968 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK680dd0d2;rport.
Max-Forwards: 70.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;tag=zZBSo25.
Contact: <sip:1000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 ACK.
User-Agent: Asterisk PBX 11.8.1.
Content-Length: 0.
.
#
U 2014/04/16 22:46:30.817278 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
SIP/2.0 200 OK.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;branch=z9hG4bK.FuKwv3ZMW;received=//WIFI-PUBLIC-IP//;rport=1495.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
Call-ID: Z6lXHBKOyd.
CSeq: 20 INVITE.
Server: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Content-Type: application/sdp.
Content-Length: 261.
.
v=0.
o=root 1551912347 1551912347 IN IP4 //LTE-PHONE-PUBLIC-IP//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //LTE-PHONE-PUBLIC-IP//.
t=0 0.
m=audio 30390 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:30.925455 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
ACK sip:2000#//AMAZON-EC2-SERVER//:5060 SIP/2.0.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;rport;branch=z9hG4bK.qV8rz6rI4.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
CSeq: 20 ACK.
Call-ID: Z6lXHBKOyd.
Max-Forwards: 70.
.
#
U 2014/04/16 22:46:35.277987 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
BYE sip:1000#//AMAZON-EC2-SERVER//:5060 SIP/2.0.
Via: SIP/2.0/UDP //LTE-PHONE-PUBLIC-IP//:63968;branch=z9hG4bK.Jfn1vpiLT;rport.
From: <sip:2000#//LTE-PHONE-PUBLIC-IP//>;tag=zZBSo25.
To: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
CSeq: 111 BYE.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
Max-Forwards: 70.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
.
#
U 2014/04/16 22:46:35.278525 //AMAZON-EC2-PRIVATE-IP//:5060 -> //LTE-PHONE-PUBLIC-IP//:63968
SIP/2.0 200 OK.
Via: SIP/2.0/UDP //LTE-PHONE-PUBLIC-IP//:63968;branch=z9hG4bK.Jfn1vpiLT;received=//LTE-PHONE-PUBLIC-IP//;rport=63968.
From: <sip:2000#//LTE-PHONE-PUBLIC-IP//>;tag=zZBSo25.
To: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 111 BYE.
Server: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Length: 0.
.
#
U 2014/04/16 22:46:35.278797 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
INVITE sip:1000#//WIFI-PUBLIC-IP//:1495 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK1930727f;rport.
Max-Forwards: 70.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: Z6lXHBKOyd.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 259.
.
v=0.
o=root 1551912347 1551912348 IN IP4 //AMAZON-EC2-SERVER//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //AMAZON-EC2-SERVER//.
t=0 0.
m=audio 19500 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:35.418765 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK1930727f;rport.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Call-ID: Z6lXHBKOyd.
CSeq: 102 INVITE.
.
#
U 2014/04/16 22:46:35.441248 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK1930727f;rport.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Call-ID: Z6lXHBKOyd.
CSeq: 102 INVITE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE.
Contact: <sip:1000#//WIFI-PUBLIC-IP//:1495>;+sip.instance="<urn:uuid:41bf1699-9e9a-4817-8b8c-e51f7b4ae2dc>".
Content-Type: application/sdp.
Content-Length: 180.
.
v=0.
o=1000 2350 2861 IN IP4 //WIFI-PRIVATE-IP//.
s=Talk.
c=IN IP4 //WIFI-PRIVATE-IP//.
b=AS:380.
t=0 0.
m=audio 7076 RTP/AVP 0 8 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
#
U 2014/04/16 22:46:35.441661 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
ACK sip:1000#//WIFI-PUBLIC-IP//:1495 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK7dd12d7d;rport.
Max-Forwards: 70.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: Z6lXHBKOyd.
CSeq: 102 ACK.
User-Agent: Asterisk PBX 11.8.1.
Content-Length: 0.
.
#
U 2014/04/16 22:46:35.441754 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
BYE sip:1000#//WIFI-PUBLIC-IP//:1495 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK48ef4999;rport.
Max-Forwards: 70.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Call-ID: Z6lXHBKOyd.
CSeq: 103 BYE.
User-Agent: Asterisk PBX 11.8.1.
X-Asterisk-HangupCause: Normal Clearing.
X-Asterisk-HangupCauseCode: 16.
Content-Length: 0.
.
#
U 2014/04/16 22:46:35.474403 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK48ef4999;rport.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Call-ID: Z6lXHBKOyd.
CSeq: 103 BYE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
.
exit
21 received, 0 dropped
Do you see why it failed to deliver sound when a device is on LTE(4G) network?
I changed below code in sip.conf and user's conf.
canreinvite = yes
It all worked fine. However, it delivers sound through Asterisk Server, which means the server has to take care of voice traffic.
i try to send INVITE to SIP server:
GCDAsyncSocket *outgoingCallSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:socketOutgoingCallQueue];
BOOL result = [outgoingCallSocket connectToHost:currentSoftswitch.ip onPort:5060 error:&error];
inside
- (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag
and then, when socket connected:
- (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port;
{
NSLog(#"Connected socket to %#:%hu", host, port);
[sock writeData:finalData withTimeout:-1 tag:OUTGOING_CALL];
NSLog(#"\n===================SEND START TO currentSoftswitch.ip->%#:5060 =================\n%#\n===================SEND FINISH=================\n",host,[[NSString alloc] initWithData:finalData encoding:NSUTF8StringEncoding]);
here is result:
> ===================SEND START TO currentSoftswitch.ip->195.26.84.147:5060 ================= INVITE
> sip:380442399740#91.224.223.42;transport=tcp;lr SIP/2.0 Via:
> SIP/2.0/TCP 195.26.84.147:5060;rport;lr SIP/2.0 Max-Forwards: 70 From:
> "alex#ixc.ua"
> <sip:897542#91.224.223.42>;tag=Ztr3.0MabqPlVkNJHHVdvAdeNGUXsz8E To:
> sip:380442399740#195.26.84.147 Contact: "alex#ixc.ua"
> <sip:897542#10.129.244.143:5060;transport=TCP;ob> Call-ID:
> zu.MBTPcv87dylX2i-BsA.b551Kyflic CSeq: 25575 INVITE Route:
> <sip:195.26.84.147;transport=tcp;lr> Route: <sip:195.26.84.147;lr>
> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY,
> REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub
> Session-Expires: 1800 Min-SE: 90 User-Agent: CallsFreeCalls
> SSContent-Type: application/sdp Content-Length: 480
>
> v=0 o=- 3566574154 3566574154 IN IP4 46.211.183.202 s=pjmedia c=IN IP4
> 46.211.183.202 b=AS:84 t=0 0 a=X-nat:6 m=audio 40000 RTP/AVP 104 18 108 3 8 0 96 c=IN IP4 46.211.183.202 b=TIAS:64000 a=rtcp:40001 IN IP4
> 46.211.183.204 a=sendrecv a=rtpmap:104 SILK/8000 a=fmtp:104 useinbandfec=0 a=rtpmap:18 G729/8000 a=rtpmap:108 iLBC/8000 a=fmtp:108
> mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000
> a=rtpmap:96 telephone-event/8000
>
> ===================SEND FINISH=================
but when i check in whireshark, a packet don't detect like SIP. where i'm wrong?
SIMPLE ANSWER - wrong content-lenght!
I'm developing a SIP provider application.I use transport UDP.And I have a Questions,
I sending a Invite message SIP Server.
INVITE sip:102#192.168.1.33 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.33:5001;branch=z9hG4bK9232c352-a28c-4467-988e-8027e0031209;rport
To: <sip:102#192.168.1.33>
From: "101"<sip:101#192.168.1.33:5060>;tag=rkktjbvq
CSeq: 1 INVITE
Call-ID: lrfnpvlvrbojabxnuldgejvncshccjpwsfxsobpcpmjrnsvkeh
Max-Forwards: 70
Contact: <sip:101#192.168.1.33:5001>
User-Agent: Iconium
Content-Type: application/sdp
Content-Length: 849
v=0
o=101 940412967 940412967 IN IP4 192.168.1.33
s=Ozeki VoIP SIP SDK
c=IN IP4 192.168.1.33
t=0 0
m=audio 5003 RTP/AVP 8 0 101 98 9 3 100 97 103 15 4 104 105 106 107 18
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=30
a=rtpmap:9 G722/8000
a=fmtp:9 bitrate=64000
a=rtpmap:3 GSM/8000
a=rtpmap:100 SPEEX/16000
a=rtpmap:97 SPEEX/8000
a=rtpmap:103 L16/8000
a=rtpmap:15 G728/8000
a=rtpmap:4 G723/8000
a=rtpmap:104 G726-16/8000
a=rtpmap:105 G726-24/8000
a=rtpmap:106 G726-32/8000
a=rtpmap:107 G726-40/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=sendrecv
m=video 5005 RTP/AVP 102 99 34
a=rtpmap:102 H263-1998/90000
a=fmtp:102 QCIF=1;CIF=1
a=rtpmap:99 H264/90000
a=fmtp:99 packetization-mode=1
a=rtpmap:34 H263/90000
a=fmtp:34 QCIF=1;CIF=1
a=sendrecv
Everything is okay.And SIP Server response with Proxy-Authenticate
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.1.33:5001;branch=z9hG4bK9232c352-a28c-4467-988e-8027e0031209;rport=5001
Proxy-Authenticate:Digest nonce="414d535c05ab5fd821:79225947c170510b155be0828d92e7e4", algorithm=MD5, realm="3CXPhoneSystem"
To: <sip:102#192.168.1.33>;tag=d92fe85a
From: "101"<sip:101#192.168.1.33:5060>;tag=rkktjbvq
Call-ID: lrfnpvlvrbojabxnuldgejvncshccjpwsfxsobpcpmjrnsvkeh
CSeq: 1 INVITE
User-Agent: 3CXPhoneSystem 10.0.23053.0
Content-Length: 0
And I send Authanticate with ACK;
INVITE sip:102#192.168.1.33 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.33:5001;branch=z9hG4bKaaf896d5-bd08-48f2-8e3d-0cf043e8324e;rport
To: <sip:102#192.168.1.33>
From: "101"<sip:101#192.168.1.33:5060>;tag=rkktjbvq
CSeq: 2 INVITE
Call-ID: lrfnpvlvrbojabxnuldgejvncshccjpwsfxsobpcpmjrnsvkeh
Max-Forwards: 70
Contact: <sip:101#192.168.1.33:5001>
User-Agent: Iconium
Content-Type: application/sdp
Proxy-Authorization:Digest username="101", realm="3CXPhoneSystem", nonce="414d535c05ab5fd821:79225947c170510b155be0828d92e7e4", response="8592afb1b7f3440afd9607dc3db588cb", uri="sip:102#192.168.1.33", algorithm=MD5
Content-Length: 849
v=0
o=101 940412967 940412967 IN IP4 192.168.1.33
s=Ozeki VoIP SIP SDK
c=IN IP4 192.168.1.33
t=0 0
m=audio 5003 RTP/AVP 8 0 101 98 9 3 100 97 103 15 4 104 105 106 107 18
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=30
a=rtpmap:9 G722/8000
a=fmtp:9 bitrate=64000
a=rtpmap:3 GSM/8000
a=rtpmap:100 SPEEX/16000
a=rtpmap:97 SPEEX/8000
a=rtpmap:103 L16/8000
a=rtpmap:15 G728/8000
a=rtpmap:4 G723/8000
a=rtpmap:104 G726-16/8000
a=rtpmap:105 G726-24/8000
a=rtpmap:106 G726-32/8000
a=rtpmap:107 G726-40/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=sendrecv
m=video 5005 RTP/AVP 102 99 34
a=rtpmap:102 H263-1998/90000
a=fmtp:102 QCIF=1;CIF=1
a=rtpmap:99 H264/90000
a=fmtp:99 packetization-mode=1
a=rtpmap:34 H263/90000
a=fmtp:34 QCIF=1;CIF=1
a=sendrecv
And Sıp server response with
SIP 2.0/400 Bad Content-Length(larger than datagram)
But in Ozeki Voip SDK ,
while content-length=851 everything is okay.(using UDP transport)
How can I do for this?Where is the my problem?
Edit:
My UDP client:
private void SendSIPMessage(string mesaj, bool korumalı)
{
IPEndPoint remotendpoint = new IPEndPoint(IPAddress.Any, port);
UdpClient udpClient = new UdpClient();
try
{
udpClient.Connect("192.168.1.33", 5060);
Byte[] sendBytes = Encoding.ASCII.GetBytes(mesaj);
udpClient.Send(sendBytes, sendBytes.Length);
string receivedMessage = string.Empty;
Byte[] receiveBytes = udpClient.Receive(ref remotendpoint);
receivedMessage = Encoding.ASCII.GetString(receiveBytes);
label1.Text += receivedMessage + "\n";
}
It might be because your UDP SIP packet is over MTU or 1300 bytes.
RFC 3261 - 18.1.1 Sending Requests
If a request is within 200 bytes of the path MTU, or if it is larger
than 1300 bytes and the path MTU is unknown, the request MUST be sent
using an RFC 2914 [43] congestion controlled transport protocol, such
as TCP.
Simply the server might have a setting to reject too large UDP packets.
I would suggest to remove some codecs from your software. Your list is too large and I don't think that it has any reason.
Most SIP proxies would accept that size of message over UDP no problem. You might want to try a different SIP server. In production systems, it is fairly normal for the SIP message to get larger than a single MTU but this still work when the UDP packets gets fragmented into two parts.