From 61f3d6798b7ea384f5ae0ceea97d16f65e0c3220 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 16 Jul 2008 22:02:41 +0000 Subject: [PATCH] don't let caller profiles init with blank caller id git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9064 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_caller.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/switch_caller.c b/src/switch_caller.c index ee993c467e..e7c64f5189 100644 --- a/src/switch_caller.c +++ b/src/switch_caller.c @@ -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);