I’ve created a C interface into the asterisk manager to place calls. I rely on Asterisk to perform the work using a variable to send the text to speech information so that it can play the message. This all works great.
However, I want to know more information if the call hasn’t made it through. If I get a busy signal the message
"Response: Error
Message: Originate Failed"
appears but this could also be due to line issues among other things. I need to know if it was busy or not vs. just knowing the call didn’t go through.
Is there anyway to set asterisk to reply back with the actual cause of failing to place the call?
I have jumped through some hoops to make this work properly on my system. I dial using Local/ channels into a context which does utilizes the SendEvent() application to send custom events with the actual dial result.
If you already have the framework in place for the manager events, it shouldn’t be terribly difficult. Here is a quick example that would work for you:
Your Originate (pseudo code) would contain something like:
Is there a “BUSY” tag as well? I supposed I could write an AGI program to fire from the dialplan if there is one. So instead of monitoring the feedback from my C app through sockets, you are saying I could use a dialplan to finalize the call?