[asterisk-users] Modifying cid.cid_name in app_parkandannounce.c

Stefan Schmidt sst at sil.at
Mon Oct 11 03:11:18 CDT 2010


Am 10.10.10 15:46, schrieb dotnetdub:
> Hi List,
> 
> I need to modify the callerID name of the call coming back when a parked
> call returns to the extension that parked it when it times out.
> 
> Looking at app_parkandannounce.c
> 
> /* Now place the call to the extention */
> 
>         snprintf(buf, sizeof(buf), "%d", lot);
>         memset(&oh, 0, sizeof(oh));
>         oh.parent_channel = chan;
>         oh.vars = ast_variable_new("_PARKEDAT", buf);
>         dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR,
> dialstr,30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
> 
> I assume (I hope not incorrectly) that I have to modify the
> variable chan->cid.cid_name
> 
> 
> Could one of the Asterisk gurus point me in the right direction as to how to
> do this?
> 
> Thanks in advance
> Brian
> 
> 
Hello brian,

this depends on your asterisk version. below 1.8 you would be fine with
chan->cid.cid_name but to be honest use the buildin CALLERID(name)
function would be much easier than changing this by yourself. Or just
have a look how this function sets a calleridname.

with 1.8 or trunk it would be chan->caller.id.name.

there is also a asterisk-dev list to ask specially this questions which
depends on asterisk code itself ;)

best regards

stefan



More information about the asterisk-users mailing list