fix killgw

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12716 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-03-22 20:52:41 +00:00
parent cc80c0cefb
commit 34ac34f31b
2 changed files with 3 additions and 8 deletions

View File

@ -430,6 +430,7 @@ void sofia_event_callback(nua_event_t event,
case nua_i_fork: case nua_i_fork:
case nua_r_info: case nua_r_info:
case nua_r_bye: case nua_r_bye:
case nua_r_unregister:
case nua_r_unsubscribe: case nua_r_unsubscribe:
case nua_r_publish: case nua_r_publish:
case nua_i_cancel: case nua_i_cancel:
@ -464,7 +465,6 @@ void sofia_event_callback(nua_event_t event,
sofia_handle_sip_i_notify(session, status, phrase, nua, profile, nh, sofia_private, sip, tags); sofia_handle_sip_i_notify(session, status, phrase, nua, profile, nh, sofia_private, sip, tags);
break; break;
case nua_r_register: case nua_r_register:
case nua_r_unregister:
sofia_reg_handle_sip_r_register(status, phrase, nua, profile, nh, sofia_private, sip, tags); sofia_reg_handle_sip_r_register(status, phrase, nua, profile, nh, sofia_private, sip, tags);
break; break;
case nua_i_options: case nua_i_options:

View File

@ -50,10 +50,8 @@ static void sofia_reg_new_handle(sofia_gateway_t *gateway_ptr, int attach)
gateway_ptr->nh = nua_handle(gateway_ptr->profile->nua, NULL, gateway_ptr->nh = nua_handle(gateway_ptr->profile->nua, NULL,
SIPTAG_CALL_ID_STR(gateway_ptr->uuid_str), SIPTAG_CALL_ID_STR(gateway_ptr->uuid_str),
NUTAG_URL(gateway_ptr->register_proxy),
SIPTAG_TO_STR(gateway_ptr->register_to), SIPTAG_TO_STR(gateway_ptr->register_to),
NUTAG_CALLSTATE_REF(ss_state), SIPTAG_FROM_STR(gateway_ptr->register_from), TAG_END()); NUTAG_CALLSTATE_REF(ss_state), SIPTAG_FROM_STR(gateway_ptr->register_from), TAG_END());
if (attach) { if (attach) {
if (!gateway_ptr->sofia_private) { if (!gateway_ptr->sofia_private) {
gateway_ptr->sofia_private = malloc(sizeof(*gateway_ptr->sofia_private)); gateway_ptr->sofia_private = malloc(sizeof(*gateway_ptr->sofia_private));
@ -77,12 +75,9 @@ static void sofia_reg_kill_reg(sofia_gateway_t *gateway_ptr)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "UN-Registering %s\n", gateway_ptr->name); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "UN-Registering %s\n", gateway_ptr->name);
nua_unregister(gateway_ptr->nh, nua_unregister(gateway_ptr->nh,
NUTAG_URL(gateway_ptr->register_url), NUTAG_URL(gateway_ptr->register_url),
SIPTAG_FROM_STR(gateway_ptr->register_from),
SIPTAG_TO_STR(gateway_ptr->register_from),
SIPTAG_CONTACT_STR(gateway_ptr->register_contact), SIPTAG_CONTACT_STR(gateway_ptr->register_contact),
SIPTAG_EXPIRES_STR("0"), NUTAG_REGISTRAR(gateway_ptr->register_proxy),
NUTAG_REGISTRAR(gateway_ptr->register_proxy), TAG_END());
NUTAG_OUTBOUND("no-options-keepalive"), NUTAG_OUTBOUND("no-validate"), NUTAG_KEEPALIVE(0), TAG_NULL());
} }
} }