I have 2 asterisk servers - serverA and serverC - connected via IAX2. On serverA, I have a "telemarketer hold" extension which, if I transfer a caller into it, loops around playing music & "please wait" messages, until they give up & hang up the phone. Also on serverA, I have a custom devstate, which lights a lamp on a phone connected to serverA, which tells me if someone is currently held in that loop. When they hang up, the devstate is re-set & the lamp goes out. On serverC, I have a similar devstate, and a couple of extensions - one to turn the lamp on & one to turn it off. What happens is this: 1) A call arrives @ Asterisk, and calls a phone on serverA, and a phone on serverC. 2) I answer on serverC, determine it's a telemarketer, and transfer to the "telemarketer hold" extension on serverA 3) The call enters the loop, and the devstate is set on serverA. As it enters the loop, it calls the "turn on" extension on serverC, which sets the serverC devstate, and hangs up with an "all extensions are busy" response. 4) The call, then, stays parked on serverA until the caller hangs up. 5) The "h" extension on serverA detects the hangup, and re-sets the serverA devstate. 6) Simultaneously, it calls the "turn off" extension on serverC, which re-sets the devstate & returns a "all extensions are busy" response. 7) serverA then hangs up the call 'officially' by calling Hangup() Unfortunately: Step 6 doesn't do anything on serverC... you can see it being executed on serverA, but the call never arrives at serverC. I'm guessing this is because the caller has already hung up; so, in effect, there's no call to transfer... My question, then, is how to get Asterisk to generate a "new" call, to tell serverC to switch off it's lamp? Cheers, Ade. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.17.1/1182 - Release Date: 12/12/2007 11:29
----- Original Message ----- From: "Ade Vickers" <javickers at solutionengineers.com> To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" <asterisk-users at lists.digium.com> Sent: Thursday, December 13, 2007 7:49 AM Subject: [asterisk-users] How do I do this?>I have 2 asterisk servers - serverA and serverC - connected via IAX2. > > On serverA, I have a "telemarketer hold" extension which, if I transfer a > caller into it, loops around playing music & "please wait" messages, until > they give up & hang up the phone. > > Also on serverA, I have a custom devstate, which lights a lamp on a phone > connected to serverA, which tells me if someone is currently held in that > loop. When they hang up, the devstate is re-set & the lamp goes out. > > On serverC, I have a similar devstate, and a couple of extensions - one to > turn the lamp on & one to turn it off. > > What happens is this: > > 1) A call arrives @ Asterisk, and calls a phone on serverA, and a phone on > serverC. > 2) I answer on serverC, determine it's a telemarketer, and transfer to the > "telemarketer hold" extension on serverA > 3) The call enters the loop, and the devstate is set on serverA. As it > enters the loop, it calls the "turn on" extension on serverC, which sets > the > serverC devstate, and hangs up with an "all extensions are busy" response. > 4) The call, then, stays parked on serverA until the caller hangs up. > 5) The "h" extension on serverA detects the hangup, and re-sets the > serverA > devstate. > 6) Simultaneously, it calls the "turn off" extension on serverC, which > re-sets the devstate & returns a "all extensions are busy" response. > 7) serverA then hangs up the call 'officially' by calling Hangup() > > Unfortunately: Step 6 doesn't do anything on serverC... you can see it > being > executed on serverA, but the call never arrives at serverC. > > I'm guessing this is because the caller has already hung up; so, in > effect, > there's no call to transfer... > > My question, then, is how to get Asterisk to generate a "new" call, to > tell > serverC to switch off it's lamp? > > > > Cheers, > Ade.Use the h exten? Would you mind sharing more details about your setup such as the dialplan or/or apps you are using? I guess you really hate telemarketers ;-) Thanks, Steve Totaro
Ade Vickers wrote:> I have 2 asterisk servers - serverA and serverC - connected via IAX2. > > On serverA, I have a "telemarketer hold" extension which, if I transfer a > caller into it, loops around playing music & "please wait" messages, until > they give up & hang up the phone. > > Also on serverA, I have a custom devstate, which lights a lamp on a phone > connected to serverA, which tells me if someone is currently held in that > loop. When they hang up, the devstate is re-set & the lamp goes out. > > On serverC, I have a similar devstate, and a couple of extensions - one to > turn the lamp on & one to turn it off. >I know this doesn't really answer your question, but I've achieved excellent inter-asterisk communication using PHP scripts triggered by System("wget http://remote-server/teledeath_off.php") style stuff, if it helps :) Not sure how that would work with devstate. Maybe the php file would connect to asterisk via the manager interface and dial the teledeath_off extension through the Local channel.