[OpenSIPS-Devel] BUG: PUA_BLA requires "Subscription-State" case sensitive !

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Oct 28 11:32:58 CET 2008


Hi Iñaki,

It is fixed on SVN trunk - after some testing, I will do a backport on 
1.4 also.

Thanks for report,
Bogdan

Iñaki Baz Castillo wrote:
> Hi, I've realized that pua_bla requires "Subscription-State" header being case 
> sensitive.
>
> A Polycom phone sends:
>   Subscription-state: active;expires=200
> instead of:
>   Subscription-State: active;expires=200
> (note the "S" of "State").
> This produces an error in pua_bla:
>
>   ERROR:pua_bla:bla_handle_notify: No Subscription-State header found
>   
>
> Of course this is a bug since SIP syntax defines header names as case 
> insensitive.
>
>
> When I send a NOTIFY with:
>   Event: dialog;sla
>   Subscription-state: active;expires=2009
>
> pua_bla says:
>   ERROR:pua_bla:bla_handle_notify: No Subscription-State header found
>
> This doesn't occur if I send "Subscription-State".
>
>
> I see in notify.c code:
>
>        while (hdr!= NULL)
>         {
>                 if(strncmp(hdr->name.s, "Subscription-State",18)==0 )
>                 {
>                         found = 1;
>                         break;
>                 }
>                 hdr = hdr->next;
>         }
>         if(found==0 )
>         {
>                 LM_ERR("No Subscription-State header found\n");
>                 goto error;
>         }
>
> AFAIK the above comparision based on "strncmp" is case sensitive so it breaks 
> SIP syntax.
>
>
>
>
>   




More information about the Devel mailing list