[Asterisk-Users] internal & external SIP

Jon Lawrence jon at lawrence.org.uk
Fri Jul 9 04:49:47 MST 2004


On Thursday 08 July 2004 23:04, Soren Rathje wrote:
>
> bindaddr = 0.0.0.0                   ; Local interface
> externip = xxx.xxx.xxx.xxx           ; Public IP address
> localnet = 192.168.0.0/255.255.0.0   ; All RFC 1918 addresses are local
> networks localnet = 10.0.0.0/255.0.0.0        ; Also RFC1918
> localnet = 172.16.0.0/12             ; Another RFC1918 with CIDR notation
> localnet = 169.254.0.0/255.255.0.0   ; Zero conf local network
>
> Also, I saw some fixes to RTP address binding in CVS today. Hard to tell
> really without a trace..
>

Okay, I've made some changes. I've moved the local phones to public IP's.
So now everything is connecting effectively from the internet to the * box.
Things are still the same as before - I can initiate calls from local phones 
to remote ones.
If a remote phone tries to initiate the call, the internal phone rings. When I 
pickup the internal phone, the call isn't completed.

I've included a trace below of an incomming call.
I don't know which bits are relevant so I've pasted it all.

Sip read:
INVITE sip:2000 at sip.lawrence.org.uk SIP/2.0
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd27e2ee695c179d0
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>
Contact: <sip:2003 at 82.145.37.29>
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7711 INVITE
User-Agent: Grandstream SIP UA 1.0.4.26
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Content-Length: 270

v=0
o=2003 8000 8000 IN IP4 82.145.37.29
s=SIP Call
c=IN IP4 82.145.37.29
t=0 0
m=audio 5004 RTP/AVP 0 8 4 18 2 15
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:15 G728/8000
a=ptime:20

12 headers, 13 lines
Using latest request as basis request
Sending to 82.145.37.29 : 5060 (non-NAT)
Found audio format UNKN
Found audio format ALAW
Found audio format ULAW
Found audio format UNKN
Found audio format GSM
Found audio format UNKN
Found description format PCMU
Found description format PCMA
Found description format G723
Found description format G729
Found description format G726-32
Found description format G728
Capabilities: us - 524302, them - 285/0, combined - 12
Non-codec capabilities: us - 1, them - 0, combined - 0
Reliably Transmitting (no NAT):
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd27e2ee695c179d0
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as584623c0
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7711 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Proxy-Authenticate: Digest realm="asterisk", nonce="7c6b65eb"
Content-Length: 0


 to 82.145.37.29:5060


Sip read:
ACK sip:2000 at 81.168.4.67 SIP/2.0
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd27e2ee695c179d0
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as584623c0
Contact: <sip:2003 at 82.145.37.29>
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7711 ACK
User-Agent: Grandstream SIP UA 1.0.4.26
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, INFO, SUBSCRIBE
Content-Length: 0


11 headers, 0 lines


Sip read:
INVITE sip:2000 at 81.168.4.67 SIP/2.0
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>
Contact: <sip:2003 at 82.145.37.29>
Proxy-Authorization: DIGEST username="2003", realm="asterisk", algorithm=MD5, 
uri="sip:2000 at 81.168.4.67", nonce="7c6b65eb", 
response="2d2400a30b257419c48ac44445dd6747"
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Grandstream SIP UA 1.0.4.26
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Content-Length: 270

v=0
o=2003 8000 8000 IN IP4 82.145.37.29
s=SIP Call
c=IN IP4 82.145.37.29
t=0 0
m=audio 5004 RTP/AVP 0 8 4 18 2 15
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:15 G728/8000
a=ptime:20

13 headers, 13 lines
Using latest request as basis request
Sending to 82.145.37.29 : 5060 (non-NAT)
Found audio format UNKN
Found audio format ALAW
Found audio format ULAW
Found audio format UNKN
Found audio format GSM
Found audio format UNKN
Found description format PCMU
Found description format PCMA
Found description format G723
Found description format G729
Found description format G726-32
Found description format G728
Capabilities: us - 524302, them - 285/0, combined - 12
Non-codec capabilities: us - 1, them - 0, combined - 0
Looking for 2000 in remote
list_route: hop: <sip:2003 at 82.145.37.29>
Transmitting (no NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Content-Length: 0


 to 82.145.37.29:5060
    -- Executing SetCallerID("SIP/2003-ce04", "2003") in new stack
    -- Executing Dial("SIP/2003-ce04", "SIP/2000|30") in new stack
We're at 81.168.4.67 port 13722
Answering with capability 2
Answering with capability 4
Answering with capability 8
12 headers, 9 lines
Reliably Transmitting:
INVITE sip:2000 at 81.168.4.69 SIP/2.0
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK201b0b71
From: "2003" <sip:2003 at 81.168.4.67>;tag=as3f8ccbff
To: <sip:2000 at 81.168.4.69>
Contact: <sip:2003 at 81.168.4.67>
Call-ID: 666e652b583d10060af59dcb11feffee at 81.168.4.67
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Fri, 09 Jul 2004 11:41:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 176

v=0
o=root 5829 5829 IN IP4 81.168.4.67
s=session
c=IN IP4 81.168.4.67
t=0 0
m=audio 13722 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
 (no NAT) to 81.168.4.69:5060
    -- Called 2000


Sip read:
SIP/2.0 100 trying
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK201b0b71
From: "2003" <sip:2003 at 81.168.4.67>;tag=as3f8ccbff
To: <sip:2000 at 81.168.4.69>
Call-ID: 666e652b583d10060af59dcb11feffee at 81.168.4.67
CSeq: 102 INVITE
User-Agent: Grandstream HT286 1.0.4.49
Content-Length: 0


8 headers, 0 lines


Sip read:
SIP/2.0 180 ringing
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK201b0b71
From: "2003" <sip:2003 at 81.168.4.67>;tag=as3f8ccbff
To: <sip:2000 at 81.168.4.69>;tag=0939785f3bc7641e
Call-ID: 666e652b583d10060af59dcb11feffee at 81.168.4.67
CSeq: 102 INVITE
User-Agent: Grandstream HT286 1.0.4.49
Content-Length: 0


8 headers, 0 lines
    -- SIP/2000-982f is ringing
Transmitting (no NAT):
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Content-Length: 0


 to 82.145.37.29:5060


Sip read:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK201b0b71
From: "2003" <sip:2003 at 81.168.4.67>;tag=as3f8ccbff
To: <sip:2000 at 81.168.4.69>;tag=0939785f3bc7641e
Call-ID: 666e652b583d10060af59dcb11feffee at 81.168.4.67
CSeq: 102 INVITE
User-Agent: Grandstream HT286 1.0.4.49
Contact: <sip:2000 at 81.168.4.69>
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Type: application/sdp
Content-Length: 141

v=0
o=2000 8000 8000 IN IP4 81.168.4.69
s=SIP Call
c=IN IP4 81.168.4.69
t=0 0
m=audio 5004 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=ptime:20

11 headers, 8 lines
Found audio format UNKN
Found description format PCMU
Capabilities: us - 524302, them - 4/0, combined - 4
Non-codec capabilities: us - 1, them - 0, combined - 0
list_route: hop: <sip:2000 at 81.168.4.69>
set_destination: Parsing <sip:2000 at 81.168.4.69> for address/port to send to
set_destination: set destination to 81.168.4.69, port 5060
Transmitting:
ACK sip:2000 at 81.168.4.69 SIP/2.0
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK201b0b71
From: "2003" <sip:2003 at 81.168.4.67>;tag=as3f8ccbff
To: <sip:2000 at 81.168.4.69>;tag=0939785f3bc7641e
Contact: <sip:2003 at 81.168.4.67>
Call-ID: 666e652b583d10060af59dcb11feffee at 81.168.4.67
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0

 (no NAT) to 81.168.4.69:5060
    -- SIP/2000-982f answered SIP/2003-ce04
We're at 81.168.4.67 port 19740
Answering with capability 2
Answering with capability 4
Answering with capability 8
Reliably Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Content-Type: application/sdp
Content-Length: 176

v=0
o=root 5829 5829 IN IP4 81.168.4.67
s=session
c=IN IP4 81.168.4.67
t=0 0
m=audio 19740 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

 to 82.145.37.29:5060
    -- Attempting native bridge of SIP/2003-ce04 and SIP/2000-982f
Retransmitting #1 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Content-Type: application/sdp
Content-Length: 176

v=0
o=root 5829 5829 IN IP4 81.168.4.67
s=session
c=IN IP4 81.168.4.67
t=0 0
m=audio 19740 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

 to 82.145.37.29:5060
Retransmitting #2 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Content-Type: application/sdp
Content-Length: 176

v=0
o=root 5829 5829 IN IP4 81.168.4.67
s=session
c=IN IP4 81.168.4.67
t=0 0
m=audio 19740 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

 to 82.145.37.29:5060
Retransmitting #3 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Content-Type: application/sdp
Content-Length: 176

v=0
o=root 5829 5829 IN IP4 81.168.4.67
s=session
c=IN IP4 81.168.4.67
t=0 0
m=audio 19740 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

 to 82.145.37.29:5060
Retransmitting #4 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Content-Type: application/sdp
Content-Length: 176

v=0
o=root 5829 5829 IN IP4 81.168.4.67
s=session
c=IN IP4 81.168.4.67
t=0 0
m=audio 19740 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

 to 82.145.37.29:5060
Retransmitting #5 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 82.145.37.29;branch=z9hG4bKd04bc72a0d281db8
From: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
To: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 7712 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2000 at 81.168.4.67>
Content-Type: application/sdp
Content-Length: 176

v=0
o=root 5829 5829 IN IP4 81.168.4.67
s=session
c=IN IP4 81.168.4.67
t=0 0
m=audio 19740 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

 to 82.145.37.29:5060
Jul  9 12:41:49 WARNING[5126]: chan_sip.c:495 retrans_pkt: Maximum retries 
exceeded on call b736bef35cf69297 at 82.145.37.29 for seqno 7712 (Response)
set_destination: Parsing <sip:2000 at 81.168.4.69> for address/port to send to
set_destination: set destination to 81.168.4.69, port 5060
Reliably Transmitting:
BYE sip:2000 at 81.168.4.69 SIP/2.0
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK201b0b71
From: "2003" <sip:2003 at 81.168.4.67>;tag=as3f8ccbff
To: <sip:2000 at 81.168.4.69>;tag=0939785f3bc7641e
Contact: <sip:2003 at 81.168.4.67>
Call-ID: 666e652b583d10060af59dcb11feffee at 81.168.4.67
CSeq: 103 BYE
User-Agent: Asterisk PBX
Content-Length: 0

 (no NAT) to 81.168.4.69:5060
  == Spawn extension (remote, 2000, 2) exited non-zero on 'SIP/2003-ce04'
set_destination: Parsing <sip:2003 at 82.145.37.29> for address/port to send to
set_destination: set destination to 82.145.37.29, port 5060
Reliably Transmitting:
BYE sip:2003 at 82.145.37.29 SIP/2.0
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK24e15695
From: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
To: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
Contact: <sip:2000 at 81.168.4.67>
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 102 BYE
User-Agent: Asterisk PBX
Content-Length: 0

 (no NAT) to 82.145.37.29:5060


Sip read:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK201b0b71
From: "2003" <sip:2003 at 81.168.4.67>;tag=as3f8ccbff
To: <sip:2000 at 81.168.4.69>;tag=0939785f3bc7641e
Call-ID: 666e652b583d10060af59dcb11feffee at 81.168.4.67
CSeq: 103 BYE
User-Agent: Grandstream HT286 1.0.4.49
Contact: <sip:2000 at 81.168.4.69>
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Length: 0


10 headers, 0 lines


Sip read:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 81.168.4.67:5060;branch=z9hG4bK24e15695
From: <sip:2000 at sip.lawrence.org.uk>;tag=as17a6c60a
To: "Pete Murphy" <sip:2003 at sip.lawrence.org.uk>;tag=2f9ab5f04daa9e4e
Call-ID: b736bef35cf69297 at 82.145.37.29
CSeq: 102 BYE
User-Agent: Grandstream SIP UA 1.0.4.26
Contact: <sip:2003 at 82.145.37.29>
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, INFO, SUBSCRIBE
Content-Length: 0


10 headers, 0 lines
Message is BYE

SIP Debugging Disabled





More information about the asterisk-users mailing list