Index: apps/app_dial.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v retrieving revision 1.25 diff -u -4 -p -b -r1.25 app_dial.c --- apps/app_dial.c 6 Sep 2003 19:28:52 -0000 1.25 +++ apps/app_dial.c 9 Sep 2003 22:05:42 -0000 @@ -342,8 +342,9 @@ static int dial_exec(struct ast_channel int allowdisconnect=0; int privacy=0; int resetcdr=0; int clearchannel=0; + int restrictcid=-1; char numsubst[AST_MAX_EXTENSION]; char restofit[AST_MAX_EXTENSION]; char *transfer = NULL; char *newnum; @@ -482,8 +483,12 @@ static int dial_exec(struct ast_channel else clearchannel = 0; if(strchr(transfer, 'g')) go_on=1; + if (strchr (transfer, 'h')) + restrictcid = 1; + else + restrictcid = 0; } strncpy(numsubst, number, sizeof(numsubst)-1); /* If we're dialing by extension, look at the extension to know what to dial */ if ((newnum = strstr(numsubst, "BYEXTENSION"))) { @@ -569,10 +574,15 @@ static int dial_exec(struct ast_channel if (chan->ani) tmp->chan->ani = strdup(chan->ani); else tmp->chan->ani = NULL; + /* Override hidecallerid */ + if (restrictcid == 0 || restrictcid == 1) + tmp->chan->restrictcid = restrictcid; + else { /* Pass hidecallerid setting */ tmp->chan->restrictcid = chan->restrictcid; + } /* Presense of ADSI CPE on outgoing channel follows ours */ tmp->chan->adsicpe = chan->adsicpe; /* Place the call, but don't wait on the answer */ res = ast_call(tmp->chan, numsubst, 0);