Yesudass Moses
Yesudass Moses

Reputation: 1859

Cancel Originated Call in Asterisk

Is there any possibility to cancel the originated call by Asterisk AMI ? I can get the status of the call when they hangup, or start dialling. But, Since I dont get the channel while originating the call, I cannot send Hangup Action. I have checked this link, and it doesn't answer the question.

How to cancel call created with AMI originate

Upvotes: 1

Views: 1443

Answers (1)

arheops
arheops

Reputation: 15259

You can use Local channel and send to your app id of channel.

You can send any variable,including database id to channel/dialplan

Action: Originate
Channel: Local/12345@out
Context: default
Exten: 8135551212
Priority: 1
Callerid: 3125551212
Timeout: 30000
Variable: var1=23|var2=24|var3=25
ActionID: ABC45678901234567890

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

You can use asterisk realtime/func_odbc to read/update db.

After Originate made, you will get actionid with status. That can be catch reading events.

So if you organize dialling correctly, you can get channel name and stop it.

ps it is highly NOT recommended write dialling core for non-expert. Check vicidial.org or other dialler availible. There are alot of issues can arise while development dialler core.

Upvotes: 1

Related Questions