-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 10 September 2003 10:47, Florian Overkamp wrote:
> > > How do I optionally hide the caller id on outgoing calls on chan_zap?
> > > Ie. calling h323 -> asterisk -> chan_zap -> isdn provider.
> >Problem solved. I made app_dial.c take an option to change
> >hidecallerid/restrictcid flag.
> That would be something I'd care to see in my own systems too. Is the patch
> public ?

I've attached the patch.

Example:

exten => s,6,dial(zap/g1/12345678|120|rh)

The 'h' option enables restrictcid which seems to hide the callerid on 
outgoing zap calls. I haven't had the opportunity yet to test what happens on 
other channel types.

*patch disclaimed*

- -- 
Regards,
Tais M. Hansen
ComX Networks
Tel: +45-70257474
Fax: +45-70257374
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/Xu0u2TEAILET3McRAhcUAJ9/m/z0ywhK9CCgNTlSxEiUPTtTIwCcCDsd
WmGrQ0d87qUP28EWKLfOC8U=
=ljMC
-----END PGP SIGNATURE-----
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);

Reply via email to