Dial multiple extension same time with accpetation menu

Hi All, I’m new to asterisk I hope you could understand my question.
I would like to call more than one remote extensions simultaneously an bridge the caller with the first who not only answer but also press a DTMF digit of a BACKGROUND menu.
Is That possible?
I try with no result using dial with U option.

[agent-accept-menu]
exten => s,1(start),NoOp(Starting confirming agent menu)
    same => n(notfoundloop),Background(<my message>)
    same => n,WaitExten()

exten => 1,1,NoOp(1 Pressed)
    same => n,Return()

exten => i,1,Playback(option-is-invalid)
      same => n,Goto(s,notfoundloop)

exten => t,1, NoOp(Timeout)
      same => n,Goto(s,notfoundloop)

[default]
exten =>123,1,NoOp(test multple call)`
    same => n,Dial(PJSIP/<one>&PJSIP/<two> ,,U(agent-accept-menu))`

But when the first answer the other is immediately hanged up.
I hope I have been exhaustive
Thanks in advance

You mean devices, not extensions.

You can probably do this using local channels and the option on dial (might be default) to no propagate answer until the post-answer subroutine has completed.

Yes devices sorry.
I will try your suggestion thanks.

Finally i get it working, even if I can’t get which DTMF was pressed (It works with any but it’s enough for me) .
I also added a configurable timeout before call each separate number

[agent-accept-menu]

exten => s,1,NoOp(test)
    same => n,Set(TRIES=0)
    same => n(notfoundloop),Background(<my message>)       
    same => n,WaitExten(5)


exten => t,1, NoOp(Timeout)
      same => n,Set(TRIES=$[ ${TRIES} + 1 ])
      same => n,GotoIf($[ ${TRIES} < 2]?s,notfoundloop)
      same => n,Hangup();

[call-agent]
exten => _X.,1,NoOp(Call agent test)
        same => n,Set(NUM=${CUT(EXTEN,^,1)})
        same => n,Set(WAITFOR=${CUT(EXTEN,^,2)})
        same => n,Wait(${WAITFOR})
        same => n,Dial(PJSIP/${NUM},18,U(agent-accept-menu^s^1))



[default]
exten =>123,1,NoOp(test multple call)
    same => n,Dial(Local/<one>^<delay-one>&Local/<two>^<delay-two>@call-agent,30))

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