Get AMI Originate action to ring caller immediately

I got AMI Originate command to work well, however I want the caller phone to ring immediately (since the action in launched) and not just only when the callee answers. Finally I want it to act just like if then caller had dialed manually the number on his phone.
How can I achieve that ?

I don’t think so, but it’s part of the Deep Magic that is controlled by the AMI/Call File interface.
Just so we’re clear, you want the phones at both ends to start ringing, as if no one initiated the call?

I foresee a lot of this:
“Can I help you?”
“I don’t know, you called me.”
“No, you called me.”
“Oh wait, maybe I did. This is so-and-so from Bill Collector’s Anonymous. Do you owe us money?”

Or worse yet:
“I’m sorry, no one is available to take you call right now. Please leave your message after the beep.”

I’m not sure which would be worse, but I’m pretty sure it’s only going to get worse as we explore the ways this can go wrong.

It depends on how you originate a call. You can call your extension first and then bridge the external number after you pick up, you can even set your extension to auto-answer the first leg.

Dicko : That can be done with AMI ? How ?

PS : Tried with EarlyMedia=true but no luck…

Yep, originate, ami and call files all enable you to construct a call as you require.

rasterisk -x 'channel originate'

Call-files are easy to construct and play with , AMI needs a running service and channel originate is a little less featured unless sending to a context (which you will likely need to do anyway) ,I suggest you start with call-files and practice with adding your ‘concept’ as a context in /etc/asterisk/extensions_custom.conf

1 Like

Dicko : I tried the CLI «channel originate» it works without the need of writing a context. And AMI provides the Command action which allows to send CLI commands, that is no need to use Telnet or SSH.
Example :

Action : Command
Command: channel originate local/XXXX extension [email protected]

This way the local phone rings, and when picking up, the call is connected to the destination (external) number. It just seems that when the local phone is not answered the local part of the call comes connected to the external destination : The callee the ears his answering machine (if double call is not allowed).

that is a good reason to have the calling extension set to autoanswer.

Hello @zebu1er,

You need to send an auto answer command to your phones through the SIP protocol. Usually we do this through the Alert-Info header. Every ip phone brand has its own syntax to accept Alert-Info commands. What is the ip phones brand being used?

Send the calls to a specific context and then you will be able to add headers and manipulate the caller id as needed before sending the calls to the extensions and to the destination.

Thank you,

Daniel Friedman
Trixton LTD.

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