Asterisk play sound and WaitExten for answered

the scenario I want to do with asterisk; -A sip user calls out

  • When the called phone is answered, a message is played to it
  • A bridge is created between the caller and the answerer when the answerer presses a key How can I do this, when I call, the direct bridge opens, if I use a macro, waitexten does not work.
    Thanks for answers

Macros have been deprecated for many years. I’m not particularly surprised that they don’t work well with WaitExten, given that actually causes a complete restart of the dialplan. It is not something you can use in a macro or subroutine that is expected to return.

I would say that in your answer subroutine you should use Read to get the keypress. I believe this is a common requirement, so there should be lots of examples.

You can use a GOSUB_RESULT value to abort the call, or even send it off into a telemarketer torture script. Setting it to CONTINUE will cause Dial to complete the bridge, normally, so no need for an explicit bridge.

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