Question : Catching the extension after hangup in Asterisk

Hello experts,

In my Asterisk dialplan, I am making some action upon hangup:

exten => h,1,System (action ${EXTEN})

But the action is being taken for exten h, not the extension dialed by caller.

Do you have a solution? I am using one (exten => h) for the whole dialplan, so it's hard to assign a new variable in each dialplan extension to handle the called number.

Answer : Catching the extension after hangup in Asterisk

try this...

exten => h,1,System(action ${CDR(dst)})
-----------------------------------------------------------------------------------------------------------------

You can also set a dialednumber variable right from the start.....

exten => .X,n,Set(__DIALEDNUMBER=${EXTEN})

Then,
exten => h,1,System(action ${DIALEDNUMBER})


Random Solutions  
 
programming4us programming4us