La función Asterisk GoSub() no funciona

I've recently started to read about Asterisk and I really liked the idea of using the GoSub() function, but for some unknown to me reason I it seems that it is not installed:

Im using Asterisk 11.5.1

Below is my extensions.conf file:

exten => _.,1,Hangup()

exten => 101,1,Noop(Going to internal contex exten:${EXTEN})
    same => n,GoSub(sub-logger,start,1())
    same => Dial(SIP/stefan)

exten => 102,1,Noop(Going to internal contex exten:${EXTEN})
    same => n,GoSub(sub-logger,start,1())
    same => n,Dial(SIP/nasko)

exten => 103,1,Noop(Na babati fyr4iloto)

exten => _9.,1,Dial(SIP/${EXTEN:1}@planet-phone)

exten => _.,1,Hangup()

exten => _.,1,Hangup()

exten => start,1,Noop(inside the subroutine)
    ;same => n,Noop(Channel : ${CHANNEL})
    ;same => n,Noop(Context : ${CONTEXT})
    ;same => n,Noop(Extensions : ${EXTEN})
    ;same => n,Noop(Date/time call : ${DATETIME})
    same => n,Return()

When I register and try to call 101 or 102 I receive the following in the console:

== Using SIP RTP CoS mark 5
    -- Executing [101@internal:1] NoOp("SIP/nasko-00000033", "Going to internal contex exten:101") in new stack
[Sep 22 19:47:41] WARNING[18071][C-00000025]: pbx.c:4621 pbx_extension_helper:No application 'GoSub' for extension (internal, 101, 2) 
  == Spawn extension (internal, 101, 2) exited non-zero on 'SIP/nasko-00000033'
    -- Executing [h@internal:1] Hangup("SIP/nasko-00000033", "") in new stack
  == Spawn extension (internal, h, 1) exited non-zero on 'SIP/nasko-00000033'

I searched a lot on in google but I wasnt able to find any explanation for this problem. If someone has any idea please share it here! THanks!

preguntado el 22 de septiembre de 13 a las 18:09

Please do asterisk -rx "core show application gosub". If not found,load module. -

1 Respuestas

Did you load the app_stack module? Maybe you want to add autoload on in modules.conf

Respondido el 01 de Septiembre de 21 a las 00:09

Hi yes I found out about this soon after I posted the thread here. After loading the module everything worked like a charm, THank you for the response - Atanas Atanasov

I have autoload=yes in modules.conf, but nevertheless (in one of my asterisk servers only) the app_stack module is not loaded. Why could this be? - azulRápido

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.