PJSIP syntax error exception

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

 



This was a bug in the parser, I've just fixed this in
http://trac.pjsip.org/repos/ticket/533

Thanks for the report!

Cheers
 Benny

On Tue, May 13, 2008 at 7:51 AM, Nigel Hsiung <nigelcz at hotmail.com> wrote:
>
>  Hi Samuel,
>
> I had a somewhat similar problem parsing retry-after(with 0.8.0), if u want
> u can try this rough hack.
> Benny probably will have better ideas how to sort this.
>
> best,
> Nigel
>
> In file Sip_parser.c (pjproject-0.8.0\pjsip\src\pjsip)
>
> static pjsip_hdr* parse_hdr_retry_after(pjsip_parse_ctx *ctx)
> {
>     //first parse it as string header
>     pjsip_hdr *strhdr;
>     strhdr= parse_hdr_generic_string(ctx);
>
>     //get the integer retry value
>     char buff[64]={0};
>     pjsip_hdr_print_on(strhdr, buff, sizeof(buff));
>
>     int iCnt;
>     int retry_val = 0;
>     for(iCnt=0; iCnt<strlen(buff); iCnt++){
>         if(isdigit(buff[iCnt])){
>             char c[1]={0};
>             c[0] = buff[iCnt];
>             retry_val = (retry_val*10) + atoi(c);
>         }
>     }
>
>    //create the retry header and assign the value
>     pjsip_retry_after_hdr *hdr;
>     hdr = pjsip_retry_after_hdr_create(ctx->pool, retry_val);
>
>     return (pjsip_hdr*)hdr;
> }
>
> > Date: Tue, 13 May 2008 01:45:49 +0200
> > From: samuelv@xxxxxxxxxxx
> > To: pjsip at pjsip.org
> > Subject: PJSIP syntax error exception
>
>
> >
> > Hello,
> >
> > When I try to register the same account with few delay, I receive an
> > error message.
> > But when pjsip tries to parse it, I receive the message :
> >
> > 01:38:04.989 sip_transport. Error processing 433 bytes packet from UDP
> > ZZZ.ZZZ.ZZZ.ZZZ:5060 : PJSIP syntax error exception when parsing ''
> > header on line 5 col 16:
> > SIP/2.0 500 Registering glare condition
> > Call-ID: kinTj5x3z17obvo8zvJ2jR-3NYHVIlJA
> > CSeq: 39922 REGISTER
> > From: <sip:XXXXXXXX@xxxxxxxxxxxxxx>;tag=pUB4p023fFPlJqyABM5ayJXbPMtl3WiT
> > Retry-After: 10(Already Pending Register)
> > To: <sip:XXXXXXX at freephonie.net>;tag=00-32573-0008fb8e-0fa94e940
> > Via: SIP/2.0/UDP
> >
> 192.168.0.6:5060;received=YYY.YYY.YYY.YYY;rport=63911;branch=z9hG4bKPjTZoVgbPq56MSwZUL4H3COMH3Bfj0frNg
> > Content-Length: 0
> >
> > Is-it a problem in pjsip parser ? Or is it a problem on my SIP provider ?
> > I'm using the last svn version.
> >
> > Thanks
> >
> > Samuel
> >
> > _______________________________________________
> > 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
>
> ________________________________
> Discover the new Windows Vista Learn more!
> _______________________________________________
>  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
>
>



[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