[asterisk-app-dev] Stasis STASISSTATUS Variable

Andrew Nagy anagy at sangoma.com
Tue Mar 15 12:43:46 CDT 2016


All,

I was just reviewing
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Stasis.
I noticed there is a handy variable named ${STASISSTATUS} returned when
Stasis is finished (OR fails). However if I never register my stasis
application and dial into the context where stasis is at once Asterisk
hits stasis and realizes it can¹t talk to said app Asterisk just hangs up
on the channel.

Quick Dialplan (Ignore the freepbxy partsŠ I work for Sangoma! :) ):

[ari-trunk]
exten => 45,1,Noop(Attempting to join test ari)
exten => 45,n,Macro(user-callerid,)
exten => 45,n,Stasis(test,45)
exten => 45,n,GotoIf($[${STASISSTATUS} = "FAILED"]?from-did-direct,1000,1)
exten => 45,n,GotoIf($[${STASISSTATUS} = "SUCCESS"]?app-blackhole,busy,1)
exten => 45,n,Answer
exten => 45,hint,Stasis:45


CLI (Ignore the freepbxy partsŠ I work for Sangoma! :) ):

    -- Executing [45 at from-internal:3] Stasis("PJSIP/1003-00000001",
³test,45") in new stack
  == Spawn extension (from-internal, 45, 3) exited non-zero on
'PJSIP/1003-00000001¹ <=== Cant communicate
    -- Executing [h at from-internal:1] Macro("PJSIP/1003-00000001",
"hangupcall") in new stack  <===Hangs up?







More information about the asterisk-app-dev mailing list