Looks like my problem is described in the NUA documentation:

sending a SUBSCRIBE with Event: header and two Accept: headers:


        nua_subscribe(nh,
                      SIPTAG_EVENT_STR("presence"),
                      SIPTAG_ACCEPT(accept1),
                      SIPTAG_ACCEPT(accept2),
                      TAG_END());


fetching tag values when processing nua_r_subscribe event:


           sip_accept_t *ac = NULL;
           sip_event_t  *o  = NULL;

           tl_gets(tl,
                   SIPTAG_EVENT_REF(o),   /* _REF takes a reference! */
                   SIPTAG_ACCEPT_REF(ac),
                   TAG_END());


Problem is: o is still NULL afterwards.

This is my call to nua_subscribe:

nua_subscribe(op->op_handle,
          NUTAG_URL((url_t*)extended_uri.c_str()), // added by JVDB
          SIPTAG_FROM_STR(ssc->cose_address),
                  SIPTAG_EXPIRES(exp),
                  SIPTAG_EVENT_STR(event),
                  TAG_END());

event is set to "presence".

Jan

On 6/27/07, Jan Van den bosch <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Let's say I receive a nua_r_subscribe event. How do I know what the Event 
> header was in the SUBSCRIBE message that this event was a response to?
>
> For example, I do a nua_subscribe() with a SIPTAG_EVENT_STR("presence"). My 
> callback function is called with a nua_r_subscribe event and the operation 
> handle as parameters. How can I verify, through the handle, that the 
> SUBSCRIBE indeed had an Event: presence header?
>
> nua_get_hparams() on the operation handle and tl_print() of the tags doesn't 
> show a sip::event_str, which I was expecting.
>
> Any ideas?
>
> Thanks,
> Jan
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to