Asterisk, план набора номера, как мне повесить после ответа? - PullRequest
0 голосов
/ 02 мая 2019

Я хочу повесить звонок сразу после ответа.

exten => _3XXXXXXXXXX,1,Set(CALLERID(num)=1234567890)
same => n,MixMonitor(${UNIQUEID}.wav)
same => n,Dial(SIP/${EXTEN:1}@provider,,M(hang))
same => n,StopMixMonitor()
same => n,Hangup()

[macro-hang]
exten => s,1,Hangup()

есть идеи? Я пробовал макрос, но он не работает.

1 Ответ

1 голос
/ 03 мая 2019

из звездочки документ

 M(macro[^arg[^...]]): 
        macro - Name of the macro that should be executed.

        arg - Macro arguments
Execute the specified <macro> for the *called* channel before connecting to the
calling channel. Arguments can be specified to the Macro using '^' as a
delimiter. The macro can set the variable ${MACRO_RESULT} to specify the
following actions after the macro is finished executing:
        ${MACRO_RESULT}: If set, this action will be taken after the macro
        finished executing.
            ABORT: Hangup both legs of the call
            CONGESTION: Behave as if line congestion was encountered
            BUSY: Behave as if a busy signal was encountered
            CONTINUE: Hangup the called party and allow the calling party to
            continue dialplan execution at the next priority
            GOTO:[[<context>^]<exten>^]<priority>: Transfer the call to the
            specified destination.

И ABORT, и CONTINUE должны делать то, что вы хотите.

...