How to play prompt for 2 legs at same time

Hi,
I have make a new aplication like bellow:
1 - Answer a Call,
2 - Dial to an extension
3 - When the extension answers, system has to play 2 different prompt files to both “legs” (inbound and outbound) at same time
4 - When the play app finishes on both “legs”, system has to connect each other to start the conversation

I already made a dial plan using A(x) and L() options but, i’ve checked that asterisk plays to “outbound leg” only when the prompt for “inbound leg” finishes.

Does anyone know how to play the prompt for 2 legs at same time??

Thanks for your help

this sounds like an issue with the Dial() app that would have to be fixed in code…

Not likely. dalciotito2 need to post your dialplan to understand what exactly you are trying to accomplish. Or is this an AGI script? From your description, Dial() is just doing what it’s supposed to do.

Tnx for your reply.

I’ve made two dialplan.

exten=>900,1,Answer()
exten=>900,n,Set(LIMIT_PLAYAUDIO_CALLER=yes)
exten=>900,n,Set(LIMIT_PLAYAUDIO_CALLEE=yes)
exten=>900,n,Set(toNumber=destination)
exten=>900,n,Set(LIMIT_CONNECT_FILE=hello-world)
exten=>900,n,Dial(SIP/${toNumber},60,TtmL(10000000000000))
exten=>900,n,Hangup

exten=>901,1,Answer()
exten=>901,n,Set(LIMIT_CONNECT_FILE=hello-world_caller)
exten=>901,n,Dial(SIP/tito,60,TtmL(10000000000000)A(hello-world_called))
exten=>901,n,Hangup

The 900 extension, answer a call execute a dial() app to “${toNumber}” var. When destination answer, asterisk plays the “hello-world” prompt for Called party, when it finishes, plays the same prompt for caller party.

The 901 extension, asterisk plays different prompts for each party. But, even this way, Asterisk plays the prompt for Called party, when it finishes, plays the other prompt for caller party.

I need to play these prompts for both - called and caller - at same time. I mean, start the prompt at same time. When both prompt finishes, asterisk bridges the call.

Tnx again

Haven’t thought through entirely, but reads like that call file is your friend. (Maybe in AGI also - not sure, but call file seems more manageable to me for such purposes.) Search for asterisk dialout in voipinfo for a quick idea, but read more docs about call file can’t hurt.

There is no way to do this using AGI, is there?
In my point of view, there is no APP or function to bridge 2 channels using AGI.
Please, let me know if i’m wrong.
Btw, i have test using Management API Originate command, and still can’t play prompt on 2 legs at same time.
Again, let me know if the question is not clear.

I hadn’t thought through implications of the requirement that the messages are to be played AFTER the other party picks up - manually. Played with A() and L() flags a bit. It’s true that A() always gets played first. But can’t say how it SHOULD behave. Maybe you can simply modify Dial source to make it work in your preference. But that LIMIT_CONNECT_FILE can only be played to caller then callee does seem to be a bug - at least a limitation.

Eureka! Now, G is your friend!

[quote=“show application dial”] G(context^exten^pri) - If the call is answered, transfer the calling party to
the specified priority and the called party to the specified priority+1.
Optionally, an extension, or extension and context may be specified.
Otherwise, the current extension is used. You cannot use any additional
action post answer options in conjunction with this option.
[/quote]

With your newly found G-friend, you can manipulate the two legs whatever way you want. I haven’t tested conversation, but confirmed that you can play different files at the same time. (This is different from “announcements” during which parties could not hear one another.)

valley,

do the two legs of the call stay bridged after the G context has finished ?

Bridging was not my intention. If not, conceptually, you can still bring the two calls into one conference. This would effectively bridge them.