3

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:

[default]
exten => _.,1,Hangup()

[internal]
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()

[external]
exten => _.,1,Hangup()

[sub-logger]
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!

1
  • Please do asterisk -rx "core show application gosub". If not found,load module.
    – arheops
    Sep 23, 2013 at 11:00

1 Answer 1

6

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

2
  • 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 Sep 25, 2013 at 21:46
  • 1
    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?
    – blueFast
    Sep 16, 2014 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.