[Asterisk-Users] Problem parsing unusual SIP/SDP

Stewart Nelson sn at scgroup.com
Wed Mar 23 11:15:11 MST 2005


Hi,

I'm testing Asterisk with a new provider.  On calls to US
toll-free numbers, there is no audio (calls to normal numbers
are ok).

In response to a valid INVITE from Asterisk, something like
this is received:

SIP/2.0 183 Session Progress
v:SIP/2.0/UDP [my public IP]:5060;branch=z9hG4bK62d91cea
CSeq:103 INVITE
i:7a1791cf52d6f3dc2d12b208051d0a21@[provider].com
f:"Test User" <sip:[my phone number]@[provider].com>;tag=as341d210b
t:<sip:18003253535@[provider].com>;tag=b6e96dae-1dd1-11b2-a01e-b03162323164+b6e9
6dae
m:sip:18003253535 at 192.168.201.25:5075
c:application/sdp
l:170

v=0
o=- 3459442714 3459442714 IN IP4 192.168.201.25
s=SIP Call
c=IN IP4 192.168.201.11
t=0 0
m=audio 52322 RTP/AVP 0
c=IN IP4 [provider public IP]
a=rtpmap:0 PCMU/8000

The "200 OK" arrives with similar SDP.  Note that there are two
connection addresses in the SDP, one private (the provider's --
I'm not using NAT) and one public.  The problem is that
Asterisk attempts to send media to the private address; of course,
that doesn't work.

If I use the provider-supplied ATA, or a Cisco ATA, it works fine.
The SDP is similar, but the ATAs know to send media to the
correct public IP.

At first, I thought that the incoming SDP was improper, but RFC 2327
says:

   A session announcement must contain one "c=" field in each media
   description (see below) or a "c=" field at the session-level.  It may
   contain a session-level "c=" field and one additional "c=" field per
   media description, in which case the per-media values override the
   session-level settings for the relevant media.

So, it appears that Asterisk is not interpreting the SDP correctly.

I'm running Asterisk at Home (Asterisk 1.0).  Is it possible that this bug
has already been fixed in a later version (I can't find anything that
seems relevant at bugs.digium.com)?

If so, is there an easy way to upgrade Asterisk at Home from the CVS?

If not, could someone please suggest where to start looking at the code?

Thanks,

Stewart




More information about the asterisk-users mailing list