[Kamailio-Devel] [OpenSIPS-Devel] Problem with presence, if event header has id.

anca at voice-sistem.ro anca at voice-sistem.ro
Wed Oct 15 10:03:56 CEST 2008


Hi,

You are right. I have now looked through the RFC's and it seems that even
presence event might contain an id parameter.
The mistake came from bad interpretation of RFC3856 which says:

The SIP event framework allows event packages to define additional
   parameters carried in the Event header field.  This package,
   presence, does not define any additional parameters.

However, RFC3265 says:
   Subscribers MUST include exactly one "Event" header in SUBSCRIBE
   requests, indicating to which event or class of events they are
   subscribing.  The "Event" header will contain a token which indicates
   the type of state for which a subscription is being requested.  This
   token will be registered with the IANA and will correspond to an
   event package which further describes the semantics of the event or
   event class.  The "Event" header MAY also contain an "id" parameter.
   This "id" parameter, if present, contains an opaque token which
   identifies the specific subscription within a dialog.  An "id"
   parameter is only valid within the scope of a single dialog.

I will fix this.

Thanks,
Anca



> All,
>
> I discovered a problem with clients sending an ID in the Event header tag:
>
> "Event: presence" is accepted, whilst Event: presence;id=value" is
> refused. I cheched the source already, hopefully it took some of your work
> and it helps you find the problem - if you agree there is one.
>
> I think the implementation takes already care about parameters, if I am
> not wrong here might be the issue:
> File: modules/presence/event_list.c
>
> 331                         if(search_event_params(event, pres_ev->evp)<
> 0) {
> 332                         LM_INFO("search params event in ev\n");
> 333                                 goto cont;
> 334                                 }
> 335
> 336                         /* search all parameters in ev in event */
> 337                         if(search_event_params(pres_ev->evp, event)<
> 0){
> 338                         LM_INFO("search params ev in event\n");
> 339                                 goto cont;
>
> If I comment the first part, line 331 to 334 it works fine. I would kindly
> ask you to check it. Checking the code and following it till here, the
> commented part does not make fully sense for me. Maybe you can enlighten
> me.
>
> Thanks a lot!
>
> Sebastian
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>





More information about the Devel mailing list