3
votes

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

1 Answers

6
votes

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

Regards Martin http://www.usn-it.de