How to cancel call created with AMI originate

六眼飞鱼酱① 提交于 2020-01-16 06:49:13

问题


I am wondering if there is an easy way to hangup a channel created with Originate?

What I do is following:

  • Call in dialplan triggers Agi;

  • Agi starts AMI: Originate with Channel "SIP/201".

  • Now the extension rings. At answer I can bridge the channels. But, if the calling party leaves the call before the call is answered, I would like to stop the outgoing call. When I send AMI Hangup with Channel "SIP/201", It can't hangup originated call.

  • I can stop that call using 'hangup request channelname' using CLI

  • but how to hangup call using program.

please help me. how to hangup originated call


回答1:


If calling party leave call,it will be auto-hanguped with CANCEL cause.

You also can use AMI action Hangup

http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Hangup

BTW, very likly you just doing it wrong way.



来源:https://stackoverflow.com/questions/22860843/how-to-cancel-call-created-with-ami-originate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!