Alexander Lopez
2006-Jan-30 23:06 UTC
[Asterisk-Users] dialing 2 channels at the same time withdifferent caller ID number?
> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com > [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of > Damon Estep > Sent: Tuesday, January 31, 2006 12:38 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: RE: [Asterisk-Users] dialing 2 channels at the same > time withdifferent caller ID number? > > > > -----Original Message----- > > > From: asterisk-users-bounces@lists.digium.com > > > [mailto:asterisk-users-bounces@lists.digium.com] On > Behalf Of Damon > > > Estep > > > Sent: Sunday, January 29, 2006 11:09 PM > > > To: Asterisk Users Mailing List - Non-Commercial Discussion > > > Subject: [Asterisk-Users] dialing 2 channels at the same > time with > > > differentcallerID number? > > > > > > > > > Can anyone think of a way to dial 2 different numbers at the same > > > time, but set the callerID number differently for each channel? > > > > > > The application is a simultaneous ring of an office > extension and a > > > cell phone where the user wants to know that the call to the cell > > > phone is a redirected call from the office. > > > > > > > > > Maybe the use of a "local" channel with changed caller ID > behavior > > > as the second channel dialed? > > > > > > To add additional complexity, I need to be able to pass > an argument > > > to a macro to enable/disable this "feature" > > > > > > TIA > > > > > > Damon > > > Alex Lopez says > > You can then call up the macro like this: > > > > [extensions] > > Exten => 1120,1,Macro(call-cell,SIP/120,Local/120@cellular) > > Exten -> 2120,1,Macro(call-cell,SIP/120) > > > > [macro-call-cell] > > Exten => s,1,Dial($ARG1&ARG2) > > > > [cellulars] > > Exten => 120,1,Set(CALLERID(num)=5555551212) > > Exten => 120,2,Dial(Zap/g2/8002MYCELL) > > That looks like it would work with a hard coded extension, > but it is not scalable due to the requirement of hardcoding > every cell phone number that could be used as an alternate number. > > I am looking for a solution to do this via a macro where the > alternate number is looked up in a database. > > I think this requires the ability to set/read a channel > variable that contains the originally dialed number as follows; > > [inbound] > ;calls start here > <snip> > Steps here recall the alternate number for the dialed > extension from mysql using realtime() and assign the value to > the variable ${cellphone} <snip>Snip Exten => _NXXNXXXXXX,2,Set(__ORIGCID=CALLERID(number)) Extem => _NXXNXXXXXX,2,dial(sip/${EXTEN}&local/${cellphone}@alternate1/n,r} exten =>> _NXXNXXXXXX,2,dial(sip/${EXTEN}&local/${cellphone}@alternate1/n,r} > > [alternate1]exten => _NXXNXXXXXX,1,macro(alternate-number|${__ORIGCID})> > [macro-alternate-number] > exten => s,1,set(CALLERID(number)=${ARG1}) exten => > s,2,dial(SIP/${MACRO_EXTEN}@peer) > > Any ideas on how to get the originally called number to the > context used for the local channel dial? > > The goal is to set the caller ID on the local channel dial to > the number that the inbound caller originally dialed > (${EXTEN} in the [inbound] context]), while maintaining the > original caller ID on the SIP channel dial. > > Damon > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >