PJSIP Strange issue with message content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 1, 2008 at 7:36 AM, manoj manoj
<manoj_karakkat at rediffmail.com>wrote:

>  Hi,
>
> From the packet capture of the SIP messages, it looks like some network
> entity (SIP ALG?) is modifying the message and adding an extra CRLF (in
> addition to the blank CRLF required as per ABNF) between message headers and
> the body.
>
Ah okay. Yet another case for evil SIP ALG.


> This is causing the PJSIP parser to read the body less by two octets.
>
I suspect that it's more like the ALG is *sending* the message with
truncated body. Can you check this with Wireshark?

Has anyone faced this issue before?  How can this situation be handled in
> PJSIP? Any help in resolving this issue will be greatly appreciated.
>
> If the message is sent truncated by the ALG, then I don't think there's
anything the receiver can do to recover it. The best way is to ditch the ALG
if you can, or as has been discussed recently on this list, you can probably
fool the ALG to stop messing about with the SIP message by not using port
5060.

Cheers
 Benny


Thanks,
> Manoj
>
>
>
> On Fri, 01 Aug 2008 manoj  manoj wrote :
>
> >Hi,
> >
> >Please see the log snippet of the issue below. And you can see that the
> last two characters of the xml is lost.
> >
> >Please help us regarding this.
> >
> >
> >--end msg--
> >  15:30:19.401    tsx0C57776C State changed from Trying to Completed,
> event=TX_MSG
> >  15:30:19.401    dlg0C54ABAC Transaction tsx0C57776C state changed to
> Completed
> >  15:30:19.401  evsub0C54B154 Subscription state changed ACCEPTED -->
> ACTIVE
> >  15:30:19.401  pjsua_pres.c Presence subscription to sip:demo3 at test1.com<sip%3Ademo3 at test1.com>is ACTIVE
> >  15:30:19.417 sip_endpoint.c Processing incoming message: Request msg
> NOTIFY/cseq=1 (rdata046875EC)
> >  15:30:19.417  pjsua_core.c RX 1114 bytes Request msg NOTIFY/cseq=1
> (rdata046875EC) from UDP ww.xx.yyy.zzz:5060:
> >NOTIFY sip:demo2 at 192.168.1.4:50634;transport=UDP SIP/2.0
> >Via: SIP/2.0/UDP
> ww.xx.yyy.zzz:5060;branch=z9hG4bKfa61cdb771d9bc2c8d0418fbf43eabc8
> >CSeq: 1 NOTIFY
> > From: <sip:demo1@xxxxxxxxx <sip%3Ademo1 at test1.com>>;tag=c417b7b8
> >To: <sip:demo2 at test1.com <sip%3Ademo2 at test1.com>
> >;tag=2d32c127b59a42aaadbdebe8ee429a8c
> >Call-ID: fb989bfd554640cca2495f116464f826
> >Expires: 3600
> >Contact: <sip:ww.xx.yyy.zzz:5060;transport=udp>
> >Event: presence
> >Max-Forwards: 70
> >Subscription-State: active;expires=3600
> >Content-Type: application/pidf+xml
> >Content-Length: 608
> >
> >
> ><?xml version="1.0" encoding="UTF-8" standalone="yes"?><presence entity="
> sip:demo1 at test1.com <sip%3Ademo1 at test1.com>"
> xmlns:ns9="urn:oma:xml:prs:pres-rules"
> xmlns:ns4="urn:ietf:params:xml:ns:conference-info"
> xmlns:ns7="urn:ietf:params:xml:ns:xcap-diff"
> xmlns:ns3="urn:ietf:params:xml:ns:pidf:data-model"
> xmlns:ns5="urn:ietf:params:xml:ns:common-policy"
> xmlns:ns2="urn:ietf:params:xml:ns:pidf:rpid"
> xmlns:ns6="urn:ietf:params:xml:ns:pres-rules"
> xmlns:ns8="urn:ietf:params:xml:ns:resource-lists"
> xmlns="urn:ietf:params:xml:ns:pidf"><tuple
> id="fd66433fc23e4db19a753edb3686d4ce"><status><basic>closed</basic></status></tuple></presenc
>
> >--end msg--
> >
> >
> >Regards
> >Manoj
> >
> >
> >On Fri, 01 Aug 2008 Benny Prijono wrote :
> > >On Thu, Jul 31, 2008 at 8:03 PM, Joy Sebastian <reachjoy at gmail.com>
> wrote:
> > >
> > > >  Hi,
> > > >
> > > > We are facing a strange issue with pjsip.
> > > >
> > > > The problem is when we are sending text messages , the last two
> characters
> > > > of the message gets truncated at the receiving end. When we check the
> log
> > > > file, it is found that an extra CRLF is added after the
> "content-length"
> > > > field.
> > > >
> > > > This same thing is happening for the presence subscription also. In
> that
> > > > case pidf xml is corrupted, because of the above mentioned issue.
> > > >
> > > >
> > >
> > >I don't see the issue with it. There is an extra CRLF after the CRLF of
> the
> > >last header (Content-Length normally), and this is the correct ABNF as
> far
> > >as I know.
> > >
> > >Cheers
> > >  Benny
> > >_______________________________________________
> > >Visit our blog: http://blog.pjsip.org
> > >
> > >pjsip mailing list
> > >pjsip at lists.pjsip.org
> > >http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> >
> >
> >_______________________________________________
> >Visit our blog: http://blog.pjsip.org
> >
> >pjsip mailing list
> >pjsip at lists.pjsip.org
> >http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080801/7c01916e/attachment-0001.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux