Skip to content
Snippets Groups Projects
Commit 3d40b1c0 authored by Martin Pycko's avatar Martin Pycko
Browse files

A little adjustment to the previous one (passing the clid&ani on call_forward)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent e9938554
No related branches found
No related tags found
No related merge requests found
...@@ -203,11 +203,15 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu ...@@ -203,11 +203,15 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
o->stillgoing = 0; o->stillgoing = 0;
numbusies++; numbusies++;
} else { } else {
if (in->callerid && !o->chan->callerid) { if (in->callerid) {
if (o->chan->callerid)
free(o->chan->callerid);
o->chan->callerid = malloc(strlen(in->callerid) + 1); o->chan->callerid = malloc(strlen(in->callerid) + 1);
strncpy(o->chan->callerid, in->callerid, strlen(in->callerid) + 1); strncpy(o->chan->callerid, in->callerid, strlen(in->callerid) + 1);
} }
if (in->ani && !o->chan->ani) { if (in->ani) {
if (o->chan->ani)
free(o->chan->ani);
o->chan->ani = malloc(strlen(in->ani) + 1); o->chan->ani = malloc(strlen(in->ani) + 1);
strncpy(o->chan->ani, in->ani, strlen(in->ani) + 1); strncpy(o->chan->ani, in->ani, strlen(in->ani) + 1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment