1
votes

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

1 Answers

0
votes

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.