[Serusers] SDP c= field mangled

Java Rockx javarockx at gmail.com
Tue Jul 5 17:45:15 CEST 2005


Yep. IMHO it is a bug. It has something to do with the way lumps are
written. When more than one delete lump is pending both get applied
which causes this issue.

There are places in ser that need this to happen, but the way
mediaproxy does it's stuff, it causes corruption in the c= field.

I believe the fix we did was in the mediaproxy ReplaceElement()
function - but I'm not 100% positive about that.

The quick fix is to set a safety flag. The real fix would be for the
mediaproxy module to write lumps properly.

Regards,
Paul

On 7/5/05, Dave <ddx66 at yahoo.com> wrote:
> calling use_media_proxy twice was the problem. Thanks
> for pointing it out.
> 
> BTW, it still seems like a use_media_proxy bug to me
> since even if it is called twice, it should simply
> overwrite the IP and not append to it. Any thoughts?
> 
> 
> 
> 
> --- Java Rockx <javarockx at gmail.com> wrote:
> 
> > Dave,
> >
> > The problem is that probably that your ser.cfg hits
> > use_media_proxy()
> > more than one.
> >
> > Perhaps a safety flag could be set to prevent this:
> >
> > if ((isflagset(6) || isflagset(7)) && !isflagset(8))
> > {
> >   setflag(8);
> >   use_media_proxy();
> > }
> >
> > Regards,
> > Paul
> >
> > On 7/5/05, Dave <ddx66 at yahoo.com> wrote:
> > > Hi,I am experiencing a strange issue. I am
> > forwarding
> > > calls to Asterisk voicemail upon no-response. So,
> > in
> > > failure route, I simply check the status 408 or
> > 486
> > > and if true, I jump to a routing-block. In there,
> > I
> > > have the following:
> > > -----
> > > revert_uri();
> > > rewritehost(Asterisk-IP);
> > > append_branch();
> > > if (isflagset(6) || isflagset(7))
> > use_media_proxy();
> > > if (!t_relay()...)
> > > ------
> > >
> > >
> > > Now, Asterisk does receive the invite, except that
> > the
> > > SDP in the SIP invite looks like (PAY ATTENTION TO
> > c=
> > > field).
> > >
> > > -------------------------------
> > > v=0
> > > o=208500512 8000 8001 IN IP4 192.168.1.104
> > > s=SIP Call
> > > c=IN IP4 213.189.X.Y213.189.X.Y
> > > t=0 0
> > > m=audio 3532235322 RTP/AVP 0 8 4 18 3
> > > a=sendrecv
> > > a=rtpmap:0 PCMU/8000
> > > a=rtpmap:8 PCMA/8000
> > > a=rtpmap:4 G723/8000
> > > a=rtpmap:18 G729/8000
> > > a=rtpmap:3 GSM/8000
> > > a=ptime:20
> > > ------------------------------------------
> > >
> > > The c= field has the same IP twice and thus the
> > INVITE
> > > is rejected by Asterisk.
> > >
> > > Is this a bug and did someone have such an issue?
> > > Thanks
> > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> > > _______________________________________________
> > > Serusers mailing list
> > > serusers at lists.iptel.org
> > > http://lists.iptel.org/mailman/listinfo/serusers
> > >
> >
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>




More information about the sr-users mailing list