[asterisk-biz] auto-answering an originated call, dialplan / manager interface problem
Mueller, Alexander
am at a-m-i.de
Sun Nov 29 13:32:36 CST 2009
OK, as promised, here are the details of the solution.
The local phone which shall dial out is SIP/2000, and the external number to be called is 0123456789. The SIP/2000 will auto-answer, so that the user (having a headset on) will be able to make an outbound call without using the phone hardware.
The Action to be called from the AMI is:
Action: Originate
Channel: Local/*2000 at originating
Context: originating
Exten: 00123456789
Priority: 1
CallerID: 2000
ActionID: ORIGINATE_464
The "*" is only a marker for the distinction inside the dialplan, to distinguish internal and external phone numbers.
The dialplan goes:
<...>
; Originating Calls
[originating]
exten => _0X.,1,Dial(SIP/${EXTEN:1}@sipgate-out)
exten => _*X.,1,Set(NST=${EXTEN:1})
exten => _*X.,n,SIPAddHeader(Call-Info: sip:\;answer-after=0)
exten => _*X.,n,Dial(SIP/${NST})
<...>
Where you can see the "*" to distinguish internal and external. I use "sipgate-out" as context for outbound calls.
This solution has no checking if SIP/2000 is busy or not, but when a user who "owns" the phone presses the button (and triggers the originate command), I think he knows why something went wrong if the phone is not ready.
Thanks everybody for the hints !
Alex
More information about the asterisk-biz
mailing list