issue with hangup extension

Discussion in 'General' started by duna, Oct 29, 2008.

  1. duna

    Oct 29, 2008
    Likes Received:
    Hi, my name is Jorge and i wrote from Chile. I 've long training on asterisk and on his features. One of my clients have Elastix (dont know what version, but came with asterisk 1.4.18)

    So everybody knows that deadagi is deprecated so i migrate a DeadAgi to Agi using hangup extension (example, exten => h,1,AGI(/var/lib/asterisk/agi-bin/program.php) to do the functions that i need like get dialstatus and answeredtime and do things with them. But, oh yeh here is the but, for one unknowing reason this version of asterisk (elastix) do not execute the AGI in hangup extension, i try using simple AGI but is does not work too... h extension only do dialplan commands...
    I know that h extension in other asterisk execute AGIs, i 've systems under production with this method (asterisk and asterisk 1.6)...but now i dont know why does not work.

    If anyone have experiencied with this i like to know

    Best Regards
  2. ziggie

    Sep 15, 2008
    Likes Received:
    Hola Jorge,

    Mi nombre es Facundo, recientemente me encontre con un problema similar. Necesitaba ejecutar un comando despues de que la extension colgara, Y Elastix ignoraba por completo la sentencia con 'h' , por lo que pude averiguar tiene que ver con una funcionalidad de Asterisk que permite cerrar el CDR antes de ejecutar la sentencia con h para que el billing no de informacion errada respecto de la duracion de la llamada. MI solucion (ignoro si sera muy util para Ud., espero que si :)) fue manejar todo desde una macro alli Elastix SI reconocio las sentencias h.
    abajo le dejo un ejemplo. Por favor hagame saber si le ha servido

    Hello George.
    I ran into a similar problem recently, The solution I came up with is to use Macros. I'm leaving an example below.

    exten => 557,1,Macro(user-callerid,)
    exten => 557,2,Macro(say-1-shutdown-after-hungup,)
    exten => s,1,Answer
    exten => s,2,Wait(1)
    exten => s,3,SayDigit(1)
    exten => h,1,System(shutdown now)
    exten => h,2,hangup
    include => app-this-is-your-extension
    exten => h,1,Hangup
  3. jgutierrez

    Feb 28, 2008
    Likes Received:
    Excellent tip!

Share This Page