I am using AMI originate command in order to make outgoing calls.
so the action i am sending is as follows :
action : originate actionid : 13449851233 channel : SIP/Trunkname/094561321657 => the number that am calling to application : Playback data : custom/whatever async : true
i intend to originate a call and when the user answers the call then i playback a sound for user.
i got doubt how to accomplish this task .
- am i doing it in a correct way ? if not what is the correct way to accomplish this task ?
- how to get current status of a call in a real-time application ?
my major problem is when asterisk sends “OriginateResponse” event , i either get Success or Failed.
let me explain more,
if user answers the call i get Success response
if user does not answer the call i get Failed response
but if user reject the call then i get Success response too.
what is wrong ?
what is happening to other reasons like no answer, busy ?
I need a straightforward way to manage my call status and it is really important to get the status in real-time.
i don’t know how to get current status of a call such as no answer,answered and busy . these three statuses are really important for my application.
for the record if you would like to suggest me CDR for getting call status , I believe it does not fit in real-time applications.
i am looking forward to hearing from you.
thank you in advance !