问题
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