Please find below two tcpdumps : one on the 192.168.4 interface, one on the 37.1.1 interface.
[code]INVITE sip:10601020304@192.168.4.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-b605349e
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 101 INVITE
Max-Forwards: 70
Contact: “Toto TOTO” sip:toto@192.168.4.107:5060
Expires: 240
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 403
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp
v=0
o=- 977196301 977196301 IN IP4 192.168.4.107
s=-
c=IN IP4 192.168.4.107
t=0 0
m=audio 16442 RTP/AVP 0 2 4 8 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-b605349e;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as2a03c0d7
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 101 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="3d985bb2"
Content-Length: 0
ACK sip:10601020304@192.168.4.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-b605349e
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as2a03c0d7
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 101 ACK
Max-Forwards: 70
Contact: “Toto TOTO” sip:toto@192.168.4.107:5060
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 0
INVITE sip:10601020304@192.168.4.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Max-Forwards: 70
Authorization: Digest username=“toto”,realm=“asterisk”,nonce=“3d985bb2”,uri="sip:10601020304@192.168.4.1",algorithm=MD5,response="81e7d96e614d4669ffe216c92d24d30f"
Contact: “Toto TOTO” sip:toto@192.168.4.107:5060
Expires: 240
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 403
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp
v=0
o=- 977196301 977196301 IN IP4 192.168.4.107
s=-
c=IN IP4 192.168.4.107
t=0 0
m=audio 16442 RTP/AVP 0 2 4 8 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:10601020304@192.168.4.1
Content-Length: 0
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:10601020304@192.168.4.1
Content-Length: 0
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:10601020304@192.168.4.1
Content-Type: application/sdp
Content-Length: 449
v=0
o=root 1435722530 1435722530 IN IP4 192.168.4.1
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.4.1
t=0 0
m=audio 11628 RTP/AVP 4 0 8 18 97 2 101
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:10601020304@192.168.4.1
Content-Type: application/sdp
Content-Length: 449
v=0
o=root 1435722530 1435722531 IN IP4 192.168.4.1
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.4.1
t=0 0
m=audio 11628 RTP/AVP 4 0 8 18 97 2 101
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
ACK sip:10601020304@192.168.4.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-58d734ed
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 ACK
Max-Forwards: 70
Authorization: Digest username=“toto”,realm=“asterisk”,nonce=“3d985bb2”,uri="sip:10601020304@192.168.4.1",algorithm=MD5,response="81e7d96e614d4669ffe216c92d24d30f"
Contact: “Toto TOTO” sip:toto@192.168.4.107:5060
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 0
BYE sip:toto@192.168.4.107:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.1:5060;branch=z9hG4bK0041d7f9;rport
Max-Forwards: 70
From: sip:10601020304@192.168.4.1;tag=as3f93f3a4
To: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 BYE
User-Agent: Asterisk PBX 1.6.2.11
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
SIP/2.0 200 OK
To: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
From: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 BYE
Via: SIP/2.0/UDP 192.168.4.1:5060;branch=z9hG4bK0041d7f9
Server: Linksys/SPA942-5.2.8
Content-Length: 0[/code]
[code]INVITE sip:0601020304@212.39.140.250 SIP/2.0
Via: SIP/2.0/UDP 37.1.1.1:5060;branch=z9hG4bK26a56ac4;rport
Max-Forwards: 70
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
To: sip:0601020304@212.39.140.250
Contact: sip:0144010203@37.1.1.1
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.11
Date: Thu, 16 Dec 2010 10:06:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 258
v=0
o=root 2013443425 2013443425 IN IP4 37.1.1.1
s=Asterisk PBX 1.6.2.11
c=IN IP4 37.1.1.1
t=0 0
m=audio 16120 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
SIP/2.0 100 Trying
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
Contact: sip:212.39.140.250:5060
CSeq: 102 INVITE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK26a56ac4
Content-Length: 0
OPTIONS sip:212.39.140.250 SIP/2.0
Via: SIP/2.0/UDP 37.1.1.1:5060;branch=z9hG4bK5285f383;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@37.1.1.1;tag=as1f6b2c1f
To: sip:212.39.140.250
Contact: sip:asterisk@37.1.1.1
Call-ID: 265a9a1d464f9c677a756b7d1665a804@37.1.1.1
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.11
Date: Thu, 16 Dec 2010 10:06:34 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
SIP/2.0 501 Not Implemented
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 265a9a1d464f9c677a756b7d1665a804@37.1.1.1
CSeq: 102 OPTIONS
From: “asterisk” sip:asterisk@37.1.1.1;tag=as1f6b2c1f
Server: Cirpack/v4.42q (gw_sip)
To: sip:212.39.140.250;tag=00-07664-09131fb5-64ec01162
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK5285f383
Content-Length: 0
SIP/2.0 180 Ringing
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
Contact: sip:212.39.140.250:5060
Content-Type: application/sdp
CSeq: 102 INVITE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK26a56ac4
Content-Length: 241
v=0
o=cp10 129249399520 129249399521 IN IP4 212.39.140.2
s=SIP Call
c=IN IP4 212.39.140.112
t=0 0
m=audio 35020 RTP/AVP 8 101
b=AS:82
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
SIP/2.0 180 Ringing
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
Contact: sip:212.39.140.250:5060
Content-Type: application/sdp
CSeq: 102 INVITE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK26a56ac4
Content-Length: 241
v=0
o=cp10 129249399520 129249399521 IN IP4 212.39.140.2
s=SIP Call
c=IN IP4 212.39.140.112
t=0 0
m=audio 35020 RTP/AVP 8 101
b=AS:82
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
SIP/2.0 200 OK
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
Contact: sip:212.39.140.250:5060
Content-Type: application/sdp
CSeq: 102 INVITE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
P-Asserted-Identity: sip:0601020304@212.39.140.250;user=phone
Privacy: id
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK26a56ac4
Content-Length: 241
v=0
o=cp10 129249399520 129249399521 IN IP4 212.39.140.2
s=SIP Call
c=IN IP4 212.39.140.112
t=0 0
m=audio 35020 RTP/AVP 8 101
b=AS:82
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
ACK sip:212.39.140.250:5060 SIP/2.0
Via: SIP/2.0/UDP 37.1.1.1:5060;branch=z9hG4bK346f7807;rport
Max-Forwards: 70
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Contact: sip:0144010203@37.1.1.1
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.11
Content-Length: 0
BYE sip:212.39.140.250:5060 SIP/2.0
Via: SIP/2.0/UDP 37.1.1.1:5060;branch=z9hG4bK5ec7f7bf;rport
Max-Forwards: 70
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
CSeq: 103 BYE
User-Agent: Asterisk PBX 1.6.2.11
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
SIP/2.0 200 OK
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
CSeq: 103 BYE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK5ec7f7bf
Content-Length: 0[/code]
Thanks.
/edit I believe this is a routing problem between the 192.168.4 network and the provider’s proxy. We should add a static route on the provider’s router. I’ll sort this out with them tomorrow.