Index: apps/app_dial.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v retrieving revision 1.143 diff -u -r1.143 app_dial.c --- apps/app_dial.c 17 Mar 2005 22:39:04 -0000 1.143 +++ apps/app_dial.c 25 Mar 2005 19:09:26 -0000 @@ -72,8 +72,7 @@ " making/redirecting the outgoing call. For example, some PSTNs\n" " don't allow callerids from other extensions then the ones\n" " that are assigned to you.\n" -" 'o' -- Original (inbound) Caller*ID should be placed on the outbound leg of the call\n" -" instead of using the destination extension (old style asterisk behavior)\n" +" 'c' -- Change the Caller*ID to be the destination extension\n" " 'r' -- indicate ringing to the calling party, pass no audio until answered.\n" " 'm[(class)]' -- provide hold music to the calling party until answered (optionally\n" " with the specified class.\n" @@ -137,20 +136,20 @@ use it not only for keeping track of what is in use but also for keeping track of who we're dialing. */ -#define DIAL_STILLGOING (1 << 0) +#define DIAL_STILLGOING (1 << 0) #define DIAL_ALLOWREDIRECT_IN (1 << 1) #define DIAL_ALLOWREDIRECT_OUT (1 << 2) #define DIAL_ALLOWDISCONNECT_IN (1 << 3) #define DIAL_ALLOWDISCONNECT_OUT (1 << 4) -#define DIAL_RINGBACKONLY (1 << 5) -#define DIAL_MUSICONHOLD (1 << 6) -#define DIAL_FORCECALLERID (1 << 7) -#define DIAL_MONITOR_IN (1 << 8) -#define DIAL_MONITOR_OUT (1 << 9) -#define DIAL_GO_ON (1 << 10) -#define DIAL_HALT_ON_DTMF (1 << 11) -#define DIAL_PRESERVE_CALLERID (1 << 12) -#define DIAL_NOFORWARDHTML (1 << 13) +#define DIAL_RINGBACKONLY (1 << 5) +#define DIAL_MUSICONHOLD (1 << 6) +#define DIAL_FORCECALLERID (1 << 7) +#define DIAL_MONITOR_IN (1 << 8) +#define DIAL_MONITOR_OUT (1 << 9) +#define DIAL_GO_ON (1 << 10) +#define DIAL_HALT_ON_DTMF (1 << 11) +#define DIAL_DEST_CALLERID (1 << 12) +#define DIAL_NOFORWARDHTML (1 << 13) struct localuser { struct ast_channel *chan; @@ -424,7 +423,7 @@ } else { senddialevent(in, o->chan); /* After calling, set callerid to extension */ - if (!ast_test_flag(peerflags, DIAL_PRESERVE_CALLERID)) + if (ast_test_flag(peerflags, DIAL_DEST_CALLERID)) ast_set_callerid(o->chan, ast_strlen_zero(in->macroexten) ? in->exten : in->macroexten, get_cid_name(cidname, sizeof(cidname), in), NULL); } } @@ -943,7 +942,7 @@ ast_set2_flag(peerflags, strchr(transfer, 'W'), DIAL_MONITOR_OUT); ast_set2_flag(peerflags, strchr(transfer, 'd'), DIAL_HALT_ON_DTMF); ast_set2_flag(peerflags, strchr(transfer, 'g'), DIAL_GO_ON); - ast_set2_flag(peerflags, strchr(transfer, 'o'), DIAL_PRESERVE_CALLERID); + ast_set2_flag(peerflags, strchr(transfer, 'c'), DIAL_DEST_CALLERID); } strncpy(numsubst, number, sizeof(numsubst)-1); /* If we're dialing by extension, look at the extension to know what to dial */ @@ -1068,7 +1067,7 @@ senddialevent(chan, tmp->chan); if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Called %s\n", numsubst); - if (!ast_test_flag(peerflags, DIAL_PRESERVE_CALLERID)) + if (ast_test_flag(peerflags, DIAL_DEST_CALLERID)) ast_set_callerid(tmp->chan, ast_strlen_zero(chan->macroexten) ? chan->exten : chan->macroexten, get_cid_name(cidname, sizeof(cidname), chan), NULL); } /* Put them in the list of outgoing thingies... We're ready now.