Originate Call and wait till extension free

Hi all,
Using AMI I want to originate a call to a external number and wait till any extension is ready (free), once the extension is free the outbound call must connected with the extension,

Appreciate any guidance

with regards
Hari Haran C

You mean called device, not extension.

Call files would probably be a better approach, as they have an extended retry mechanism.

Thanks David,

but I am write a application where there more customization, and i use Asterisk-Java to execute AMI,

  1. get phone number to dial from database,
  2. dial it thru a available trunk,
    3 ---- what to do here, ( park, or queue it ? )
  3. once the call is connected, check for any agent is free to take the call
  4. transfer the call to the agent
  5. the agent application will be connected to my application thru websockets and get the called numbers information.

It would be grateful if you could help me in this

Thanking you

With regards
Hari Haran C

That’s more complex than your first posting suggested. There was a thread on this several months ago, although I would point out again that, as a call recipient, I would not be happy being put into your queue, Also, in some countries, there are rules against making unsolicited calls and then failing to complete them at your side. I suspect those could be generalised to making them then forcing the callee to wait.

Thanks David,

I did a work around and achieved, but i don;t now the pros and cons of that will explain below

    originateAction = new OriginateAction();

the using managerConnection.sendAction(new CoreShowChannelsAction()); i got the active call in musiconhold and got the channel name

using the channel name in the variable chl i redirect to the free extension

RedirectAction redirectcall = new RedirectAction();
redirectcall.setChannel(chl); // chl is the channel name got from the CoreShowChannelEvent

is the above code is wise as it works but for 120 channel i have to create a wise code
Please advise.

With regards
Hari Haran C

Why not originate them into a queue?

1 Like

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