From: Jarkko R. <jar...@gm...> - 2008-03-28 12:06:43
|
Hello! I am struggling with a problem concerning saving an event for later response. In my scenario I am receiving an PUBLISH message to which I don't want to respond until some other event occurs. I am using 'nua_save_event' function to store the publish event. However, when I receive the other event and try to send my response with 'nua_respond' using NUTAG_WITH_SAVED, I get the following error event: nua_i_error, '500 Responding to a Non-Existing Request'. I would appreciate if some of you gurus could help me. Maybe I am forgetting something important in my implementation. The following contains main parts of the code I am using: nua_saved_event_t saved[1]; void handlePublishEvent(nua_event_t event, int status, char const* phrase, nua_t* nua, nua_magic_t* magic, nua_handle_t* nh, nua_hmagic_t* hmagic, sip_t const* sip, tagi_t tags[]) { nua_save_event(nua, saved); } void handleOtherEvent(nua_event_t event, int status, char const* phrase, nua_t* nua, nua_magic_t* magic, nua_handle_t* nh, nua_hmagic_t* hmagic, sip_t const* sip, tagi_t tags[]) { nua_respond(nh, SIP_200_OK, NUTAG_WITH_SAVED(saved), TAG_END()); } -- Jarkko |