]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
honor effective_caller_id_number for CID override
authorRupa Schomaker <rupa@rupa.com>
Thu, 4 Jun 2009 13:56:28 +0000 (13:56 +0000)
committerRupa Schomaker <rupa@rupa.com>
Thu, 4 Jun 2009 13:56:28 +0000 (13:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13611 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_lcr/mod_lcr.c

index 92ac2e5a7f27e72c787bab81e1f50b45b91aa05f..523559a0101dd10aac1ebce2ac7234d1a1524d30 100644 (file)
@@ -1086,7 +1086,10 @@ SWITCH_STANDARD_APP(lcr_app_function)
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "LCR Lookup on %s using profile %s\n", dest, lcr_profile);
                routes.lookup_number = dest;
                if (caller_profile) {
-                       routes.cid = (char *) caller_profile->caller_id_number;
+                       routes.cid = (char *) switch_channel_get_variable(channel, "effective_caller_id_number");
+                       if (!routes.cid) {
+                               routes.cid = (char *) caller_profile->caller_id_number;
+                       }
                }
        
                if (!(routes.profile = locate_profile(lcr_profile))) {