If you initiate an Originate and specify an outbound carrier/channel/technology as the 'Channel', the execution will be punted into the Exten, Priority and Context you specify when the call is answered on the far-end -- e.g. a SIP 200 OK.
For example, here's how I Rickroll people: Action: Originate Channel: SIP/5551...@my_termination_carrier Context: rickroll Exten: 1 Priority: 1 Callerid: xxxxxxxxxx Timeout: 30000 [rickroll] exten => 1,1,Wait(1) exten => 1,n,Playback(never-gonna-give-you-up) exten => 1,n,Hangup Their phone rings, they pick up, and about a second later, Rick croons at them. -- Alex Mueller, Alexander wrote: > Hello, I try to initiate an outbound call via "ORIGINATE" (AMI interface), > and I need to bring the phone that calls outbound to auto-answer, so that the > user just has to press a button on the computer, not on the phone. > > Problem: I have no chance to do anything inside the dialplan, the call is > initiated without jumping into the dialplan as far as I can see in the logs. > So for example "SIPAddHeader(Call-Info: answer-after=0)", which works perfect > for Redirected calls, doesn't work. There seems to be nothing like > SIPAddHeader in the AMI. I tried this, without success: > > Action: Originate > Channel: SIP/2000 > Exten: 001763802268 > Priority: 1 > CallerID: 2000 > Variable: _ALERT_INFO=info=alert-autoanswer > ActionID: ORIGINATE_464 > > ... with and without the underscore before "ALERT_INFO", didn't work. In the > log I saw that the "VarSet" - Events are triggered AFTER the phone starts to > ring, even after the user has pressed "acknowledge call" or "cancel". I also > tried other variables, but as I said, the settings apply after the phone is > in the state it may not be in. > > What to do ? Best thing would be to come into the dialplan somehow, or to > call an AMI statement for setting a variable. Both things I couldn't manage. > > Is there any chance to make a combined ORIGINATE which makes use of REDIRECT > ? REDIRECT leads me into the dialplan, but needs one channel in use as much > as I know. There's no "Dial" command in AMI as far as I can see. > > The phone is a Snom 300, the Asterisk a 1.2 (productive) and 1.6 (test > system), the solution should be applicable for both Asterisks and several > phones, if possible. Thanks. > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-biz mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-biz -- Alex Balashov - Principal Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 _______________________________________________ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-biz mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-biz