Alternative To Local Channel

Home » Asterisk Users » Alternative To Local Channel
Asterisk Users 6 Comments

I used to use the local channel to create a global variable

(dialplan)

[default]

exten => s,1,Set(GLOBAL(LSESSION)=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})

to that end, I modified cli.conf

[startup_commands]

originate local/s extension s@default = yes

But now I upgraded to Asterisk18 and there is no longer a local channels

Does anybody have any idea of a workaround?

6 thoughts on - Alternative To Local Channel

  • Yes that are, but how do I use them to execute a part of the dialplan, once, when Asterisk starts up. module show like originate Module Description Use Count Status Support Level app_originate.so Originate call 0 Running core res_clioriginate.so Call origination and redirection from th 0 Running core
    2 modules loaded

    —–Original Message—–
    From: asterisk-users Are app_originate.so and res_clioriginate.so loaded?


    Thanks in advance,
    ————————————————————————-
    Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
    https://www.linkedin.com/in/steve-edwards-4244281

  • Systemd provides “ExecStartPost=” option to run more commands eg. cp /usr/local/src/asterisk/sample.call /var/spool/asterisk/outgoing/

  • It’s a great idea but it doesn’t work. Maybe this should be the way that works.

    —–Original Message—–
    From: Eric Wieling
    Sent: Thursday, August 17, 2023 3:43 PM
    To: Asterisk Users Mailing List – Non-Commercial Discussion ; Federico
    Subject: Re: [asterisk-users] Alternative to Local channel

    You can’t set the variable in globals? I don’t know if functions work in globals, but it is worth a try.

    [globals]
    LSESSION=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}


    http://help.nyigc.net/

  • I just did it with stock sample configs aside from adding the variable to globals and it worked perfectly fine. Any modules which contain any referenced dialplan functions need to load before pbx_config. This can explicitly be done using modules.conf