@My_Second_Nickname

Как выделить событие Asterisk?

Здравствуйте. Интересует одна вещь. Как сделать чтобы определённо событие (а именно вызов PHP-скрипта) срабатывал при начале разговора? Как это можно в экстеншенах оформить? То есть идёт дозвон, как только трубку взяли - срабатывает срипт.

Вообще нужно срабатывание на несколько событий - поступление звонка (когда только пришёл, и ещё не отправлен в какую-то очередь), "ожидание" (когда уже направлен в очередь и идёт вызов абонентам очереди), начало разговора, конец разговора.
  • Вопрос задан
  • 207 просмотров
Пригласить эксперта
Ответы на вопрос 1
Rsa97
@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.
...
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы