]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add sip-force-extension
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 21 Oct 2009 23:09:41 +0000 (23:09 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 21 Oct 2009 23:09:41 +0000 (23:09 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15191 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index 471837bd8ca1c5e4568d48873bfda7f0894506c9..a6f52c651e7fdf00b0b3d389fa7fc4a0605df076 100644 (file)
@@ -714,6 +714,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
        char *dup_mwi_account = NULL;
        char *mwi_user = NULL;
        char *mwi_host = NULL;
+       char *var = NULL;
        const char *from_user = NULL;
        const char *from_host = NULL;
        const char *reg_host = profile->reg_db_domain;
@@ -1008,6 +1009,11 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
        }
   reg:
 
+
+       if (v_event && *v_event && (var = switch_event_get_header(*v_event, "sip-force-extension"))) {
+               to_user = var;
+       }
+
        if (v_event && *v_event && (mwi_account = switch_event_get_header(*v_event, "mwi-account"))) {
                dup_mwi_account = strdup(mwi_account);
                switch_assert(dup_mwi_account != NULL);