]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't let caller profiles init with blank caller id
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 16 Jul 2008 22:02:41 +0000 (22:02 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 16 Jul 2008 22:02:41 +0000 (22:02 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9064 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_caller.c

index ee993c467e3b6d2eb13aafda1433d7a77941be4f..e7c64f5189a04852275be08144ef7b44a673bce6 100644 (file)
@@ -56,6 +56,14 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
                context = "default";
        }
 
+       if (switch_strlen_zero(caller_id_name)) {
+               caller_id_name = "FreeSWITCH";
+       }
+
+       if (switch_strlen_zero(caller_id_number)) {
+               caller_id_number = "0000000000";
+       }
+
        profile_dup_clean(username, profile->username, pool);
        profile_dup_clean(dialplan, profile->dialplan, pool);
        profile_dup_clean(caller_id_name, profile->caller_id_name, pool);