Disconnect Event By The Caller


i am trying to create an event once incoming call is canceled by the CALLER (for example waiting a long time), then a script will run(for example sending mail for missed call)

i have tried the DIAL command and to obtain the CANCEL event - but once it is tested - no action is taken (The dial is done to external number - Call FWD)
(Noting was seen in the logs)

Anyone can advise in related?

from the logs once it was canceled:
== Spawn extension (CALLED_ID, start, 2) exited non-zero on ‘SIP/CT_1-0000055e’

from the file:

same => n,Dial(SIP/CT_1/0${Called},59)
same => n,GotoIf(["{DIALSTATUS}" = “CANCEL”]?lbl_X:)
same => n(lbl_X),System(/var/lib/asterisk/agi-bin/MailSenderVer)

Our asterisk version is :slight_smile:Asterisk 15.3.0

You are probably looking for the h extension or hangup handlers.

Hi david551,

Thanks for responding.

Can you recommend what can be done?