M
M
My_Second_Nickname2021-07-26 13:58:14
Asterisk
My_Second_Nickname, 2021-07-26 13:58:14

How to highlight an Asterisk event?

Hello. Interested in one thing. How to make a certain event (namely, a call to a PHP script) fire when a conversation starts? How can this be done in extensions? That is, there is a dial-up, as soon as the phone is picked up, the script is triggered.

In general, you need to trigger on several events - a call arrives (when it just arrived and has not yet been sent to some queue), "waiting" (when it has already been directed to the queue and there is a call to queue subscribers), the beginning of a conversation, the end of a conversation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2021-07-26
@Rsa97

CLI> core show application Queue
...
Queue(queuename[,options[,URL[,announceoverride[,timeout[,AGI[,macro[,gosub[,rule[,position]]]]]]]]])
...
macro
    Will run a macro on the called party's channel (the queue member) once the
    parties are connected.
gosub
    Will run a gosub on the called party's channel (the queue member) once the
    parties are connected.
...
CLI> core show application Dial
...
    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:
...
    U(x[^arg[^...]]): 
        x - Name of the subroutine to execute via 'Gosub'
        arg - Arguments for the 'Gosub' routine
Execute via 'Gosub' the routine <x> for the *called* channel before connecting
to the calling channel. Arguments can be specified to the 'Gosub' using '^' as
a delimiter. The 'Gosub' routine can set the variable ${GOSUB_RESULT} to
specify the following actions after the 'Gosub' returns.
...
CLI> core show application System
...
Executes a command  by  using  system(). If the command fails, the console
should report a fallthrough.
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question