Hi,
Asterisk 1.2.4
Gentoo + iptables (shorewall)
I’ve spent all my day on this issue, but I not able to solve it alone.
Something which worked for several weeks and doesn’t work anymore, and I can’t see why. I don’t know if it is du to asterisk version, I tried 1.2.1 but same problem.
When I place a sip call (eg : 613@fwd.pulver.com), or receive a sip call on my dyndns domain, I have no incoming sound.
Asterisk is not behind a firewall, it is on the firewall (same machine).
I use x-lite for my tests, but I’ve tried with others.
It seems that my private server ip isn’t replaced by my public IP anymore.
And sometimes in logs I can see my internal IP in place of fwd.pulver.com.
The call to 613@fwd.pulver.com is just a example, I have the problem with all sip calls, incoming and outgoing.
192.168.0.101 is my serveur private IP
80.8.XXX.XXX is my public dynamic IP
192.168.0.1 is my client (x-lite) IP
’*sip:’ is just a prefix to place sip calls. It always worked like that, but I’ve tried with :
extensions_custom.conf:exten => 98,1,Dial(SIP/613@fwd.pulver.com)
extensions_custom.conf:exten => 98,2,Hangup
too.
my sip.conf :
[general]
port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
disallow=all
allow=alaw
allow=ulaw
allow=gsm
allow=ilbc
allow=g729
context=from-sip-external ; Send unknown SIP callers to this context
callerid=Unknown
language=fr
realm=mydomain.homedns.org
videosupport=yes
callevents=yes
externip = mydomain.homedns.org
externhost = mydomain.homedns.org
localnet = 192.168.0.0/255.255.0.0
I’ve tried with my public IP (not a real solution, but just for tests) in externip, with nat=yes (but I think I don’t need it), without videosupport, realm, calevents, with srvlookup …
Extension 200 has nat=yes, qualify=200, host=dynamic,canreinvite=no.
The log with sip debug, during a test call :
[code]—
12 headers, 0 lines
Reliably Transmitting (no NAT) to 192.168.0.1:5060:
OPTIONS sip:200@80.8.XXX.XXX:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK5574f22b;rport
From: “Unknown” sip:Unknown@192.168.0.101;tag=as72621db2
To: sip:200@80.8.XXX.XXX:5060
Contact: sip:Unknown@192.168.0.101
Call-ID: 374f18731720a9da479424634eb440b5@192.168.0.101
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 26 Feb 2006 21:20:25 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0
serveur1*CLI>
<-- SIP read from 192.168.0.1:5060:
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK5574f22b;rport
From: “Unknown” sip:Unknown@192.168.0.101;tag=as72621db2
To: sip:200@80.8.XXX.XXX:5060;tag=497400235
Contact: sip:200@80.8.XXX.XXX:5060
Call-ID: 374f18731720a9da479424634eb440b5@192.168.0.101
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,NOTIFY
CSeq: 102 OPTIONS
Server: X-Lite release 1105d
Content-Length: 0
— (9 headers 0 lines)—
Scheduling destruction of call ‘12eb434306bbab5b13b000211fa2c956@192.168.0.101’ in 32000 ms
serveur1*CLI>
<-- SIP read from 198.65.166.131:5060:
— (0 headers 0 lines) Nat keepalive —
serveur1*CLI>
<-- SIP read from 192.168.0.1:5060:
INVITE sip:*sip:613@fwd.pulver.com SIP/2.0
Via: SIP/2.0/UDP 80.8.XXX.XXX:5060;rport;branch=z9hG4bK41CA9B22EDC4A0B9064429499AD49A86
From: My Name sip:200@mydomain.homedns.org;tag=1359252080
To: sip:*sip:613@fwd.pulver.com
Contact: sip:200@80.8.XXX.XXX:5060
Call-ID: 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
CSeq: 27164 INVITE
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-Lite release 1105d
Content-Length: 256
v=0
o=200 2822497393 2822497621 IN IP4 80.8.XXX.XXX
s=X-Lite
c=IN IP4 80.8.XXX.XXX
t=0 0
m=audio 8000 RTP/AVP 3 98 97 101
a=rtpmap:3 gsm/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
— (11 headers 12 lines)—
Using INVITE request as basis request - 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
Sending to 80.8.XXX.XXX : 5060 (NAT)
Reliably Transmitting (NAT) to 192.168.0.1:5060:
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 80.8.XXX.XXX:5060;branch=z9hG4bK41CA9B22EDC4A0B9064429499AD49A86;received=192.168.0.1;rport=5060
From: My Name sip:200@mydomain.homedns.org;tag=1359252080
To: sip:*sip:613@fwd.pulver.com;tag=as731de939
Call-ID: 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
CSeq: 27164 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:*sip:613@192.168.0.101
Proxy-Authenticate: Digest realm=“mydomain.homedns.org”, nonce="0ac83ac7"
Content-Length: 0
Scheduling destruction of call ‘0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1’ in 15000 ms
Found user '200’
serveur1*CLI>
<-- SIP read from 192.168.0.1:5060:
ACK sip:*sip:613@fwd.pulver.com SIP/2.0
Via: SIP/2.0/UDP 80.8.XXX.XXX:5060;rport;branch=z9hG4bK41CA9B22EDC4A0B9064429499AD49A86
From: My Name sip:200@mydomain.homedns.org;tag=1359252080
To: sip:*sip:613@fwd.pulver.com;tag=as731de939
Contact: sip:200@80.8.XXX.XXX:5060
Call-ID: 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
CSeq: 27164 ACK
Max-Forwards: 70
Content-Length: 0
— (9 headers 0 lines)—
<-- SIP read from 192.168.0.1:5060:
INVITE sip:*sip:613@fwd.pulver.com SIP/2.0
Via: SIP/2.0/UDP 80.8.XXX.XXX:5060;rport;branch=z9hG4bK01E56B13ACA169272282F08A2B1EA52E
From: My Name sip:200@mydomain.homedns.org;tag=1359252080
To: sip:*sip:613@fwd.pulver.com
Contact: sip:200@80.8.XXX.XXX:5060
Call-ID: 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
CSeq: 27165 INVITE
Proxy-Authorization: Digest username=“200”,realm=“mydomain.homedns.org”,nonce=“0ac83ac7”,response=“a195ffe5643d84dd449e0872aad67247”,uri="sip:*sip:613@fwd.pulver.com"
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-Lite release 1105d
Content-Length: 256
v=0
o=200 2822497393 2822497621 IN IP4 80.8.XXX.XXX
s=X-Lite
c=IN IP4 80.8.XXX.XXX
t=0 0
m=audio 8000 RTP/AVP 3 98 97 101
a=rtpmap:3 gsm/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
— (12 headers 12 lines)—
Using INVITE request as basis request - 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
Sending to 80.8.XXX.XXX : 5060 (NAT)
Found user '200’
Found RTP audio format 3
Found RTP audio format 98
Found RTP audio format 97
Found RTP audio format 101
Peer audio RTP is at port 80.8.XXX.XXX:8000
Peer video RTP is at port 80.8.XXX.XXX:65535
Found description format gsm
Found description format iLBC
Found description format speex
Found description format telephone-event
Capabilities: us - 0x50e (gsm|ulaw|alaw|g729|ilbc), peer - audio=0x602 (gsm|speex|ilbc)/video=0x0 (nothing), combined - 0x402 (gsm|ilbc)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Looking for *sip:613 in from-internal (domain fwd.pulver.com)
list_route: hop: sip:200@80.8.XXX.XXX:5060
Transmitting (NAT) to 192.168.0.1:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 80.8.XXX.XXX:5060;branch=z9hG4bK01E56B13ACA169272282F08A2B1EA52E;received=192.168.0.1;rport=5060
From: My Name sip:200@mydomain.homedns.org;tag=1359252080
To: sip:*sip:613@fwd.pulver.com
Call-ID: 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
CSeq: 27165 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:*sip:613@192.168.0.101
Content-Length: 0
-- Executing Dial("SIP/200-c952", "SIP/613@fwd.pulver.com|30|r") in new stack
We’re at 192.168.0.101 port 10070
Video is at 192.168.0.101 port 10104
Adding codec 0x2 (gsm) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x400 (ilbc) to SDP
Adding codec 0x100 (g729) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
13 headers, 15 lines
Reliably Transmitting (no NAT) to 69.90.155.70:5060:
INVITE sip:613@fwd.pulver.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK1523431a;rport
From: “device” sip:200@192.168.0.101;tag=as63619957
To: sip:613@fwd.pulver.com
Contact: sip:200@192.168.0.101
Call-ID: 15208c6b0a16fe83103e3ee4320d5f8f@192.168.0.101
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 26 Feb 2006 21:20:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 336
v=0
o=root 7450 7450 IN IP4 192.168.0.101
s=session
c=IN IP4 192.168.0.101
t=0 0
m=audio 10070 RTP/AVP 3 8 0 97 18 101
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
-- Called 613@fwd.pulver.com
Transmitting (NAT) to 192.168.0.1:5060:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 80.8.XXX.XXX:5060;branch=z9hG4bK01E56B13ACA169272282F08A2B1EA52E;received=192.168.0.1;rport=5060
From: My Name sip:200@mydomain.homedns.org;tag=1359252080
To: sip:*sip:613@fwd.pulver.com;tag=as20a61ff2
Call-ID: 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
CSeq: 27165 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:*sip:613@192.168.0.101
Content-Length: 0
serveur1*CLI>
<-- SIP read from 69.90.155.70:5060:
SIP/2.0 100 trying – your call is important to us
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK1523431a;rport=5060;received=80.8.XXX.XXX
From: “device” sip:200@192.168.0.101;tag=as63619957
To: sip:613@fwd.pulver.com
Call-ID: 15208c6b0a16fe83103e3ee4320d5f8f@192.168.0.101
CSeq: 102 INVITE
Server: Sip EXpress router (0.8.14-6 (i386/linux))
Content-Length: 0
— (8 headers 0 lines)—
serveur1*CLI>
<-- SIP read from 69.90.155.70:5060:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.101:5060;received=80.8.XXX.XXX;branch=z9hG4bK1523431a;rport=5060
From: “device” sip:200@192.168.0.101;tag=as63619957
To: sip:613@fwd.pulver.com;tag=as4f086262
Call-ID: 15208c6b0a16fe83103e3ee4320d5f8f@192.168.0.101
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: sip:613@69.90.168.13:5028
Content-Length: 0
— (10 headers 0 lines)—
– SIP/fwd.pulver.com-9548 is ringing
serveur1*CLI>
<-- SIP read from 69.90.155.70:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.101:5060;received=80.8.XXX.XXX;branch=z9hG4bK1523431a;rport=5060
Record-Route: sip:613@69.90.155.70;ftag=as63619957;lr=on
From: “device” sip:200@192.168.0.101;tag=as63619957
To: sip:613@fwd.pulver.com;tag=as4f086262
Call-ID: 15208c6b0a16fe83103e3ee4320d5f8f@192.168.0.101
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: sip:613@69.90.168.13:5028
Content-Type: application/sdp
Content-Length: 263
v=0
o=root 8841 8841 IN IP4 69.90.168.13
s=session
c=IN IP4 69.90.168.13
t=0 0
m=audio 18440 RTP/AVP 0 3 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
— (12 headers 12 lines)—
Found RTP audio format 0
Found RTP audio format 3
Found RTP audio format 97
Found RTP audio format 101
Peer audio RTP is at port 69.90.168.13:18440
Peer video RTP is at port 69.90.168.13:65535
Found description format PCMU
Found description format GSM
Found description format iLBC
Found description format telephone-event
Capabilities: us - 0x50e (gsm|ulaw|alaw|g729|ilbc), peer - audio=0x406 (gsm|ulaw|ilbc)/video=0x0 (nothing), combined - 0x406 (gsm|ulaw|ilbc)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
list_route: hop: sip:613@69.90.155.70;ftag=as63619957;lr=on
set_destination: Parsing sip:613@69.90.155.70;ftag=as63619957;lr=on for address/port to send to
set_destination: set destination to 69.90.155.70, port 5060
Transmitting (no NAT) to 69.90.155.70:5060:
ACK sip:613@69.90.168.13:5028 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK28ef6ae1;rport
Route: sip:613@69.90.155.70;ftag=as63619957;lr=on
From: “device” sip:200@192.168.0.101;tag=as63619957
To: sip:613@fwd.pulver.com;tag=as4f086262
Contact: sip:200@192.168.0.101
Call-ID: 15208c6b0a16fe83103e3ee4320d5f8f@192.168.0.101
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0
-- SIP/fwd.pulver.com-9548 answered SIP/200-c952
We’re at 192.168.0.101 port 10138
Video is at 192.168.0.101 port 10056
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x400 (ilbc) to SDP
Adding codec 0x100 (g729) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 192.168.0.1:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 80.8.XXX.XXX:5060;branch=z9hG4bK01E56B13ACA169272282F08A2B1EA52E;received=192.168.0.1;rport=5060
From: My Name sip:200@mydomain.homedns.org;tag=1359252080
To: sip:*sip:613@fwd.pulver.com;tag=as20a61ff2
Call-ID: 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
CSeq: 27165 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:*sip:613@192.168.0.101
Content-Type: application/sdp
Content-Length: 336
v=0
o=root 7450 7450 IN IP4 192.168.0.101
s=session
c=IN IP4 192.168.0.101
t=0 0
m=audio 10138 RTP/AVP 8 0 3 98 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
-- Attempting native bridge of SIP/200-c952 and SIP/fwd.pulver.com-9548
serveur1*CLI>
<-- SIP read from 192.168.0.1:5060:
ACK sip:*sip:613@192.168.0.101 SIP/2.0
Via: SIP/2.0/UDP 80.8.XXX.XXX:5060;rport;branch=z9hG4bK6AB1B73FBBD0F198615289EB7DA790AB
From: My Name sip:200@mydomain.homedns.org;tag=1359252080
To: sip:*sip:613@fwd.pulver.com;tag=as20a61ff2
Contact: sip:200@80.8.XXX.XXX:5060
Call-ID: 0FA71426-D39A-3D4A-614B-82F3896BCF35@192.168.0.1
CSeq: 27165 ACK
Max-Forwards: 70
Content-Length: 0
— (9 headers 0 lines)—
serveur1*CLI> sip no debug
SIP Debugging Disabled
== Spawn extension (from-internal, *sip:613, 1) exited non-zero on ‘SIP/200-c952’
– Executing Macro(“SIP/200-c952”, “hangupcall”) in new stack
– Executing ResetCDR(“SIP/200-c952”, “w”) in new stack
– Executing NoCDR(“SIP/200-c952”, “”) in new stack
– Executing Wait(“SIP/200-c952”, “2”) in new stack
== Spawn extension (macro-hangupcall, s, 5) exited non-zero on ‘SIP/200-c952’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/200-c952’[/code]
I’ll appreciate all help, I don’t know what to try…
Thanks a lot.