How to use Originate with Alert-Info:?

Is there a way (if not this would be a great feature request) to pass Alert-Info during an Originate API call? Ideally it would be nice to selectivly set the alert info independently for both the caller and callee.

My application for this is I am developing a click to call application and my Polycom phones will auto-answer if I send the Alert-Info tag “Ring Answer”

This would eliminate the user from having to pickup the phone or press the speaker button after clicking to dial.

I had a similar issue when using AstTapi, and solved it by going via a local context…

(You will have to change the SetVar to be appropriate to your phones, and will probably have to sort out how your click-to-call application selects the contexts).

In AstTapi I needed to configure this (assuming it’s for origination by extension 5303):

User Channel: Local/5303@click-to-call-originate-custom
Dial By Context: checked
Context: click-to-call-target-custom

And in my dialplan:

[click-to-call-originate-custom]
exten => _X.,1,NoOp(“Click to Call Originator”)
exten => _X.,2,SetVar(_ALERT_INFO=info=alert-autoanswer)
exten => _X.,3,Goto(from-internal,${EXTEN},1)

[click-to-call-target-custom]
exten => _X.,1,NoOp(“Click to Call Target”)
exten => _X.,2,Goto(from-internal,${EXTEN},1)