]> git.ipfire.org Git - thirdparty/asterisk.git/commit
manager.c: Add new parameter 'PreDialGoSub' to Originate AMI action
authorjonatascalebe <jonatas@telnet23.com.br>
Thu, 14 Mar 2024 18:53:43 +0000 (15:53 -0300)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 9 May 2024 13:48:09 +0000 (13:48 +0000)
commit837e3df50e74fb9c08e32062e11c6bb741ab7217
tree3d19fd43170074d73da4c3090bdcface022af6e5
parente9117897e5238065a7541289c51aca81cfdee393
manager.c: Add new parameter 'PreDialGoSub' to Originate AMI action

manager.c: Add new parameter 'PreDialGoSub' to Originate AMI action

The action originate does not has the ability to run an subroutine at initial channel, like the Aplication Originate. This update give this ability for de action originate too.

For example, we can run a routine via Gosub on the channel to request an automatic answer, so the caller does not need to accept the call when using the originate command via manager, making the operation more efficient.

UserNote: When using the Originate AMI Action, we now can pass the PreDialGoSub parameter, instructing the asterisk to perform an subrouting at channel before call start. With this parameter an call initiated by AMI can request the channel to start the call automaticaly, adding a SIP header to using GoSUB, instructing to autoanswer the channel, and proceeding the outbuound extension executing. Exemple of an context to perform the previus indication:
[addautoanswer]
exten => _s,1,Set(PJSIP_HEADER(add,Call-Info)=answer-after=0)
exten => _s,n,Set(PJSIP_HEADER(add,Alert-Info)=answer-after=0)
exten => _s,n,Return()

(cherry picked from commit d4b79cb4660a4cd98ec7bd0f5e24c7e62ed6ae83)
main/manager.c