D
D
Denis Denisov2020-07-05 21:44:20
Asterisk
Denis Denisov, 2020-07-05 21:44:20

How to execute an AGI script if a certain internal number did not answer the call?

Please tell me how to make it so that any missed call to number 000 would run the AGI script?
At the moment, I have added the following lines to the extensions_override_freepbx.conf file:

[from-internal]
exten => 000,n,AGI(mychat-sto-no-answer.php, ${CALLERID(number)})

The script is executed but not only on number 000 and not in all cases.
Using FreePBX 14
Thanks for the help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Barbolin, 2020-07-06
@dronmaxman

If so?

exten => 000,1,Dial(-----000------)
 same => n,Set(CHANNEL(hangup_handler_push)=hdlr-message,s,1(${EXTEN}))
 same => n,Dial(SIP/${EXTEN},60,TtWw)
 same => n,HangUp()


[hdlr-message]
exten => s,1,Verbose(0, -----hdlr-Message-----)
 same => n,Set(DNUM=${ARG1})
 same => n,Noop(ANSWER_TIME = ${ANSWEREDTIME})
 same => n,GotoIf($["${ANSWEREDTIME}" < "2"]?:end_hdlr)
 same => n,AGI(mychat-sto-no-answer.php, ${CALLERID(number)})
 same => n(end_hdlr),HangUp()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question