SDP with IPv6 address accepted

Hi,

I do have the following problem here: I hava Nokia N95 WLAN SIP phone registered at my Asterisk Server v1.2.12.1 (Ubuntu Edgy default package).

When I call the phone, it sends back a SDP in the “200 OK” which includes an IPv6 address. This can happen, as the phone gets via DHCP both IPv4 and IPv6 addresses.

The SDP is ACKed by the Server and the call is established (from the signalling point of view). Obviously, this cannot work as Asterisk is currently IPv4-only.

Media packets are sent from the phone to the server, but not the other way round (as Asterisk does not know where to send it to).

My question is, is it really the right way to ACK this call setup with an invalid contact address and proceed with a non-working call, or should Asterisk reject this session somehow (non-ACKing the OK?!) ?

SIP DEBUG trace:


  == ISDN1: Incoming call 'xxx' -> 'yyy'
     -- Executing Dial("CAPI/ISDN1/yyy-0", "SIP/n95|90") in new stack
 We're at 192.168.42.1 port 7076
 Adding codec 0x8 (alaw) to SDP
 Adding codec 0x2 (gsm) to SDP
 Adding codec 0x4 (ulaw) to SDP
 Adding non-codec 0x1 (telephone-event) to SDP
 13 headers, 12 lines
 Reliably Transmitting (no NAT) to 192.168.42.101:5060:
INVITE sip:n95@192.168.42.101 SIP/2.0
Via: SIP/2.0/UDP 192.168.42.1:5060;branch=z9hG4bK33cf6987;rport
From: "xxx" <sip:xxx@192.168.42.1>;tag=as6dbb1fbf
To: <sip:n95@192.168.42.101>
Contact: <sip:xxx@192.168.42.1>
Call-ID: 5f93cbbd1d63a4d37c9a1757501b151c@192.168.42.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 11 Jul 2007 20:20:51 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 262

v=0
o=root 30928 30928 IN IP4 192.168.42.1
s=session
c=IN IP4 192.168.42.1
t=0 0
m=audio 7076 RTP/AVP 8 3 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

---
     -- Called n95
 Jul 11 22:20:51 WARNING[31220]: channel.c:1639 ast_waitfor_nandfds:  Thread -1226646624 Blocking 'CAPI/ISDN1/yyy-0', already blocked by thread 0 in procedure (null)
 

<-- SIP read from 192.168.42.101:5060: 
SIP/2.0 100 Trying

Via: SIP/2.0/UDP 192.168.42.1:5060;branch=z9hG4bK33cf6987;rport=5060;received=192.168.42.1
To: <sip:n95@192.168.42.101>
From: "xxx" <sip:xxx@192.168.42.1>;tag=as6dbb1fbf
Call-ID: 5f93cbbd1d63a4d37c9a1757501b151c@192.168.42.1
CSeq: 102 INVITE
Content-Length: 0

--- (7 headers 0 lines)---

<-- SIP read from 192.168.42.101:5060: 
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.42.1:5060;branch=z9hG4bK33cf6987;rport=5060;received=192.168.42.1
From: "xxx" <sip:xxx@192.168.42.1>;tag=as6dbb1fbf
To: <sip:n95@192.168.42.101>;tag=pnj4st4oeh5nt81j3k4mqsj2
Contact: <sip:n95@192.168.42.101>
Call-ID: 5f93cbbd1d63a4d37c9a1757501b151c@192.168.42.1
CSeq: 102 INVITE
Content-Length: 0
 
--- (8 headers 0 lines)---
     -- SIP/n95-0819cf20 is ringing

<-- SIP read from 192.168.42.101:5060: 
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.42.1:5060;branch=z9hG4bK33cf6987;rport=5060;received=192.168.42.1
To: <sip:n95@192.168.42.101>;tag=pnj4st4oeh5nt81j3k4mqsj2
Contact: <sip:n95@192.168.42.101>
From: "xxx" <sip:xxx@192.168.42.1>;tag=as6dbb1fbf
Call-ID: 5f93cbbd1d63a4d37c9a1757501b151c@192.168.42.1
CSeq: 102 INVITE
Allow: INVITE,ACK,BYE,CANCEL,REFER,NOTIFY,OPTIONS,PRACK
Content-Type: application/sdp
Accept: application/sdp
Content-Length: 284

v=0
o=Nokia-SIPUA 30929 30929 IN IP6 2001:6f8:958:42:218:8dff:fe00:2067
s=session
c=IN IP6 2001:6f8:958:42:218:8dff:fe00:2067
t=0 0
m=audio 49152 RTP/AVP 8 101
a=sendrecv
a=ptime:20
a=maxptime:200
a=fmtp:101 0-15
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000/1
 
--- (11 headers 12 lines)---
 Jul 11 22:20:55 WARNING[30941]: chan_sip.c:3560 process_sdp:  Invalid host in c= line, 'IN IP6 2001:6f8:958:42:218:8dff:fe00:2067'
 list_route: hop: <sip:n95@192.168.42.101>
 set_destination: Parsing <sip:n95@192.168.42.101> for address/port to send to
 set_destination: set destination to 192.168.42.101, port 5060
 Transmitting (no NAT) to 192.168.42.101:5060:
ACK sip:n95@192.168.42.101 SIP/2.0
Via: SIP/2.0/UDP 192.168.42.1:5060;branch=z9hG4bK73e892fa;rport
From: "xxx" <sip:xxx@192.168.42.1>;tag=as6dbb1fbf
To: <sip:n95@192.168.42.101>;tag=pnj4st4oeh5nt81j3k4mqsj2
Contact: <sip:xxx@192.168.42.1>
Call-ID: 5f93cbbd1d63a4d37c9a1757501b151c@192.168.42.1
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0

---
     -- SIP/n95-0819cf20 answered CAPI/ISDN1/yyy-0
   == ISDN1: Answering for yyy
 
<-- SIP read from 192.168.42.101:5060: 
BYE sip:xxx@192.168.42.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.42.101:5060;branch=z9hG4bK7cghq2bah9hc61fghegbra1;rport
To: "xxx" <sip:xxx@192.168.42.1>;tag=as6dbb1fbf
From: <sip:n95@192.168.42.101>;tag=pnj4st4oeh5nt81j3k4mqsj2
Call-ID: 5f93cbbd1d63a4d37c9a1757501b151c@192.168.42.1
CSeq: 1 BYE
Max-Forwards: 70
Content-Length: 0
 
--- (8 headers 0 lines)---
 Sending to 192.168.42.101 : 5060 (NAT)
 Transmitting (NAT) to 192.168.42.101:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.42.101:5060;branch=z9hG4bK7cghq2bah9hc61fghegbra1;received=192.168.42.101;rport=5060
From: <sip:n95@192.168.42.101>;tag=pnj4st4oeh5nt81j3k4mqsj2
To: "xxx" <sip:xxx@192.168.42.1>;tag=as6dbb1fbf
Call-ID: 5f93cbbd1d63a4d37c9a1757501b151c@192.168.42.1
CSeq: 1 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:xxx@192.168.42.1>
Content-Length: 0
X-Asterisk-HangupCause: Normal Clearing

---
   == Spawn extension (capi-in, yyy, 1) exited non-zero on 'CAPI/ISDN1/yyy-0'
 
  == ISDN1: CAPI Hangingup
 
Destroying call '5f93cbbd1d63a4d37c9a1757501b151c@192.168.42.1'
 
12 headers, 0 lines

Note: Some headers are anonymized

Bernhard