]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix killgw
authorAnthony Minessale <anthony.minessale@gmail.com>
Sun, 22 Mar 2009 20:52:41 +0000 (20:52 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sun, 22 Mar 2009 20:52:41 +0000 (20:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12716 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_reg.c

index 375ced0971b1a0f398e89878cb43e3e0f1a3866e..4b01b682c65459a5230d84dfe51370ba543ebead 100644 (file)
@@ -430,6 +430,7 @@ void sofia_event_callback(nua_event_t event,
        case nua_i_fork:
        case nua_r_info:
        case nua_r_bye:
+       case nua_r_unregister:
        case nua_r_unsubscribe:
        case nua_r_publish:
        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);
                break;
        case nua_r_register:
-       case nua_r_unregister:
                sofia_reg_handle_sip_r_register(status, phrase, nua, profile, nh, sofia_private, sip, tags);
                break;
        case nua_i_options:
index 9152dbf04999083291f63abcc0b61038d2a30f0b..b43a930ca42f0c5ea5940877576091a523f3bdf7 100644 (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,
                                                                 SIPTAG_CALL_ID_STR(gateway_ptr->uuid_str),
-                                                                NUTAG_URL(gateway_ptr->register_proxy),
                                                                 SIPTAG_TO_STR(gateway_ptr->register_to),
                                                                 NUTAG_CALLSTATE_REF(ss_state), SIPTAG_FROM_STR(gateway_ptr->register_from), TAG_END());
-
        if (attach) {
                if (!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);
                nua_unregister(gateway_ptr->nh,
                                           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_EXPIRES_STR("0"),
-                                          NUTAG_REGISTRAR(gateway_ptr->register_proxy),
-                                          NUTAG_OUTBOUND("no-options-keepalive"), NUTAG_OUTBOUND("no-validate"), NUTAG_KEEPALIVE(0), TAG_NULL());
+                                          NUTAG_REGISTRAR(gateway_ptr->register_proxy), 
+                                          TAG_END());
        }
        
 }