[mod_sofia] add a define for custom NUA event 9999

This commit is contained in:
Jérôme Poulin 2021-02-15 09:11:59 -05:00
parent 7d0909d4a9
commit d2e2a3c9c5
No known key found for this signature in database
GPG Key ID: 5A1E98D8ECAC2717
3 changed files with 3 additions and 2 deletions

View File

@ -1539,7 +1539,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
tech_pvt->proxy_refer_uuid = (char *)msg->string_array_arg[0];
} else {
switch_mutex_unlock(tech_pvt->sofia_mutex);
sofia_wait_for_reply(tech_pvt, 9999, 10);
sofia_wait_for_reply(tech_pvt, SOFIA_CUSTOM_NUA_EVENT_REFER, 10);
switch_mutex_lock(tech_pvt->sofia_mutex);
if ((var = switch_channel_get_variable(tech_pvt->channel, "sip_refer_reply"))) {

View File

@ -107,6 +107,7 @@ typedef struct private_object private_object_t;
#define MY_EVENT_BYE_RESPONSE "sofia::bye_response"
#define MULTICAST_EVENT "multicast::event"
#define SOFIA_CUSTOM_NUA_EVENT_REFER 9999
#define SOFIA_REPLACES_HEADER "_sofia_replaces_"
#define SOFIA_CHAT_PROTO "sip"
#define SOFIA_MULTIPART_PREFIX "sip_mp_"

View File

@ -711,7 +711,7 @@ void sofia_handle_sip_i_notify(switch_core_session_t *session, int status,
if (status_val == 200) {
switch_channel_hangup(channel, SWITCH_CAUSE_BLIND_TRANSFER);
}
if ((int)tech_pvt->want_event == 9999) {
if ((int)tech_pvt->want_event == SOFIA_CUSTOM_NUA_EVENT_REFER) {
tech_pvt->want_event = 0;
}
}