Originate call once but call continues with one by one number

Hi,

I am using asterisk AMI to originate call.I am calling to a folder which contains phone number of customers. In current scenario, i am using xlite, from where call is originating but xlite is disconnecting every time hangup current call and we are clicking on xlite green button for sending call to next customer phone number.
What my requirement is, When i click on that folder, call should originate once and once the current call is disconnected from customer end, next call should start (not originate) for next customer number. Is there anyway to do so?

Use the g option on Dial.

Asterisk AMI Originate: Without Extension Local Ringing is possible?

Can you try and explain what you want in a different way?

You always have to have an endpoint to originate the call to.

SIP/123

IAX2/234

LOCAL/200@internal

DAHDI/G2/5551212

How would you expect to originate a call without ringing an endpoint?

Ok, Let me explain my scenario.
I have 4 numbers which are in folder (let say testFolder).(See customers name along with their number below)
Customer Name Phone Number
John 1111111111
Nic 2222222222
Mathew 3333333333
Sara 4444444444

Now i will start calling on testFolder. It will ring on my extension (extension is configured on x-lite) first and after picking the call from my x-lite, call will go to the John. Now as soon as John hangs up the call, my x-lite is also disconnect. And next call is again originating from my x-lite i.e x-lite is again ring and after picking the call, call will go to Nic’s phone number.
Here I want that once the call originates from my x-lite, call will never hangup until i am not disconnecting the call from my end and if John hangs up the call, next call for Nic will automatically ring without disconnecting my x-lite.
In summary, is it possible without disconnecting x-lite after first call and next call should go automatically?

Use the “g” option on Dial.

I don’t understand that how to use “g” option. Can you please elaborate it? It will be helpful to me for implementation.

Is it you writing a dialplan for this functionality?
Check here where in arguments you can see that,
g - Proceed with dialplan execution at the next priority in the current extension if the destination channel hangs up.

I am using originate action for calling. which is something like clientSocket.Send(Encoding.ASCII.GetBytes(“Action: Originate\r\nChannel: SIP/” + fromNumber + "\r\nExten: " + strNumber + "\r\nContext: from-internal\r\nPriority: 1\r\nCallerID: " + fromNumber + “\r\n\r\n”));. Do i need to write my own dialplan? If yes then please share some more details on it because i did never write a dialplan till now.

You need to write an extension that calls all the devices in turn.

Who wrote the dialplan that defines the from-internal context? Ask them for help.

If i am not getting your point wrong then i need to pass new number to dialplan each time or i need to write dialplan at runtime while my dialer is running in the application so how will I update dialplan each time because i need to pass new number each time from my application? Please give some input on that.

Pass all the numbers to dialplan (using Originate and Local channel) and then handle logic in dialplan to dial them one by one.

satish4asterisk: Can you please give some sample dialplan for that? It would be easier to me to understand and write my dialplan.

This is the default dialplan provided by asterisk. We have not made any changes in it. Can you please suggest, what changes we need to make to achieve our functionality.

Asterisk does not have a useful provided dialplan. The change you need to make to the dialplan is to create a complete dialplan.

FreePBX has a default dialplan, but we do not support that on this forum.