Hold a call on wait and Dial

Hi Guys

I am having trouble in configuring Extensions.conf. Here is what I need

A sends a call to me for any number

I want to hold that dialed number using WAIT() for 300 seconds and while that call is on hold I want to asterisk to dial that 1234 number using the Dial command while that number remains on wait

here is my extensions.conf

[test3]
exten => _X.,1,Progress
exten => _X.,n,Ringing
exten => _X.,n,Wait(310)
exten => _X.,n,Goto(dial,s,1)

[dial]
exten => s,1,Dial(SIP/test1/${EXTEN})

Now problem is once the call is on hold it remains on hold till 310 seconds pass. my requirement is while the dialed number remain on hold asterisk execute the Dial.

sorry for my poor english

To run multiple parallel calls you will need to use Originate.

This is not a standard usage, so you will be pretty much on your own in filling in the details,

What is the real goal behind this strange processing?

I am working for someone and here is his requirement
Nextone A = > Asterisk => Nextone A

Basically Asterisk will be acting as loop . Asterisk will take call from Nextone will keep that dialed number on hold/wait and will dial itself that dialed number while to original dialed number is still on wait

That still doesn’t explain what you are really trying to achieve, but it sounds like you need to call Originate and then Park.

actually my English sucks let me try to explain in easy way

You send me a call I want to park/hold it with me while your call is on hold/wait with me ill dial that number my self to that destination number instead of letting asterisk dial that number directly

I think you mean you just want to do a normal Dial. While the Dial() is done the calling channel is kept waiting, and any progress is relayed back (ringing, etc). You don’t need to have a Wait(310) in there…

[test3]
exten => _X.,1,Progress
exten => _X.,n,Ringing
exten => _X.,n,Wait(310) ==> I want the dialled number to stay on wait for 310 second
exten => _X.,n,Goto(dial,s,1) ==> while its on wait i want system to execute this

but problem is system down not goto next till it finish waiting Wait(310)

You have repeated the question! That usually means that you are completely failing to explain your requirement, and is generally not a useful thing to do.

Either you are trying to do something normal, in an over-complicated way, or you are doing something very unusual, in which case we really need to understand why you need to do that, in order to suggest a way of doing it.

Asterisk is doing exactly what your dial plan is telling it to do.

well what Im trying to do is not normal I know … But I guess im not able to explain it good

ill give it another try

you send a call to my asterisk to dial 111

as per my dial plan I want to put you on wait for 310 seconds

exten => _X.,n,Wait(310)

Now while you are on wait for 310 seconds I want my asterisk to execute this

exten => _X.,n,Goto(dial,s,1)

Right now problem is asterisk does execute this but once 310 seconds !

I want asterisk to execute exten => _X.,n,Goto(dial,s,1) right after leaving you on WAIT

You can’t execute multiple things at once on a channel like that. Each step is executed and then it moves on. What about using Dial() without the Wait(310) does not work for your use case?

Why do you want Asterisk to wait 310 seconds?

What do you want to do with the result of call you are making in the 310 seconds?

is there any way to execute multiple things at once ?

There are ways to do certain things at once, but you really need to answer further about why.

I have no clue why my company wants to implement this …All I know is they want me to implement this and I have no clue how to get it done

You can’t do your job is you don’t understand what they are trying to achieve! There may be cases, where military secrecy requires that the implementers don’t get told the purpose of what they are doing, but that requires extremely detailed specifications, and I’m sure that there are no need to know issues here.

Often when you know the real objective, there is a simpler and better solution. You need to go back to the person who set the task and ask them to explain what they are trying to achieve, in business terms.

See, in particular http://www.catb.org/esr/faqs/smart-questions.html#goal

(The other time we get detailed questions without the underlying goals, is when they are student coursework exercises.)

1 Like

Can you please name a few …ill do google…just need a hint

One of them being the Originate application like @david551 mentioned that creates an outgoing call and continues in the dialplan. There are ways to do things, but without some definition of what or why what exists now isn’t suitable I can’t offer anymore.