aboutsummaryrefslogtreecommitdiffstats
path: root/channels/h323
diff options
context:
space:
mode:
authorjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-24 17:13:13 +0000
committerjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-24 17:13:13 +0000
commit1d5bd8dd26e6f97c247e9fd36f991396587b8d44 (patch)
tree41ff427f6d653272cc7454855ab17344970ffe0b /channels/h323
parent46099659e677859b747aff53a85f3afecdc82d20 (diff)
deal with no callerid name in all cases. really need to rethink this function
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1210 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323')
-rwxr-xr-xchannels/h323/chan_h323.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/channels/h323/chan_h323.c b/channels/h323/chan_h323.c
index de18ea6f2..8804ac51d 100755
--- a/channels/h323/chan_h323.c
+++ b/channels/h323/chan_h323.c
@@ -963,7 +963,11 @@ int setup_incoming_call(call_details_t cd)
strncpy(p->context, alias->context, sizeof(p->context)-1);
}
- sprintf(p->callerid, "%s <%s>", p->cd.call_source_aliases, p->cd.call_source_e164);
+ if (!strlen(p->cd.call_source_aliases))
+ sprintf(p->callerid, "Unknown Name <%s>", p->cd.call_source_e164);
+ else
+ sprintf(p->callerid, "%s <%s>", p->cd.call_source_aliases, p->cd.call_source_e164);
+
} else {
/* Either this call is not from the Gatekeeper
@@ -972,7 +976,10 @@ int setup_incoming_call(call_details_t cd)
user = find_user(cd.call_source_aliases);
if (!user) {
- sprintf(p->callerid, "%s <%s>", p->cd.call_source_aliases, p->cd.call_source_e164);
+ if (!strlen(p->cd.call_source_aliases))
+ sprintf(p->callerid, "Unknown Name <%s>", p->cd.call_source_e164);
+ else
+ sprintf(p->callerid, "%s <%s>", p->cd.call_source_aliases, p->cd.call_source_e164);
if (strlen(p->cd.call_dest_e164)) {
strncpy(p->exten, cd.call_dest_e164, sizeof(p->exten)-1);
} else {