[asterisk-biz] auto-answering an originated call, dialplan / manager interface problem

Mueller, Alexander am at a-m-i.de
Thu Nov 26 08:05:36 CST 2009


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.



More information about the asterisk-biz mailing list