]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6350 --resolve Parse params out of user portion of caller_id and save them to...
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 14 Mar 2014 18:13:22 +0000 (13:13 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 14 Mar 2014 18:13:22 +0000 (13:13 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index d395810616c3439df8f08cf45a4a3be75b537e94..ef8376433565ba12ce92bcec3cfe0444b04904b3 100644 (file)
@@ -8215,6 +8215,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
        const char *r_sdp = NULL;
        int is_tcp = 0, is_tls = 0;
        const char *uparams = NULL;
+       char *name_params = NULL;
 
 
        if (sip && sip->sip_contact && sip->sip_contact->m_url && sip->sip_contact->m_url->url_params) {
@@ -8682,6 +8683,11 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
 
        if (from_user) {
                check_decode(from_user, session);
+
+               if ((name_params = strchr(from_user, ';'))) {
+                       *name_params++ = '\0';
+                       switch_channel_set_variable(channel, "sip_name_params", name_params);
+               }
        }
 
        extract_header_vars(profile, sip, session, nh);