Skip to content
Snippets Groups Projects
Commit 4aacf51f authored by Jeremy McNamara's avatar Jeremy McNamara
Browse files

deal with no callerid name in all cases. really need to rethink this function

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 9f7b1269
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment