How to send updates of a call to a script?

Hi,
I want to post the call details as soon as done to a different server.
For an instance, when the external call was picked up or hangup, I need to post that to a different server. I will write a PHP or a Python script to do that. But how can I get the call detail in every hook like ANSWER, HANGUP etc.

Also, I want to avail the UNIQUEID with the status.

Can you guide me to achieve that.

Thanks in advanced.

That’s what AMI (Asterisk Manager Interface) is for.

However, UNIQUEID is not a call identifier, except in simple cases where the same channels are used through the call.

Can I use channel id for that?

The channel unique ID is only unique to the channel. Some operations can replace the channel.

Is there any way I can catch DIALSTATUS happening within from-internal via a dial plan? That can server my job.

Why is from_internal special? Remember this is not a FreePBX forum, so you are assumed to have full control of the content of your from_internal dialplan code.

When Dial sets DIALSTATUS, it sets it as a normal variable, so will generate the normal AMI events for setting that variable.

I guess I got my way to deal with.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.