[App_rpt-users] event subsystem variable use in system call

mike at midnighteng.com mike at midnighteng.com
Wed Apr 5 14:02:52 UTC 2017


Start by writing your function from asterisk CLI .
When it works, convert it to be called from shell.
But you are not going to get a asterisk var contents like you are
doing.

Linux shell does not know what ${RPT_ALINKS} is unless you
carry/import  the var from asterisk.
Your echo will always be blank.

...mike/kb8jnm

----- Original Message -----
From:
 "Users of Asterisk app_rpt" <app_rpt-users at lists.allstarlink.org>

To:
"Users of Asterisk app_rpt" <app_rpt-users at lists.allstarlink.org>
Cc:

Sent:
Wed, 5 Apr 2017 00:09:19 -0700
Subject:
Re: [App_rpt-users] event subsystem variable use in system call

Well, I was hoping that asterisk would have a way to expand asterisk
variables before the shell gets called ( by the s| syntax ). 
Apparently, asterisk is passing the command as is and the shell is
expanding the variable.  

On Tue, Apr 4, 2017 at 8:54 PM, <mike at midnighteng.com [1]>
 wrote:
I think your problem is that you are trying to execute from a linux
command and the subsystem resides at the asterisk level.

Not that you can do it from there but you must address it where it
resides.

...mike/kb8jnm

----- Original Message -----
From:
 "Users of Asterisk app_rpt" <app_rpt-users at lists.allstarlink.org [2]>

To:
<App_rpt-users at lists.allstarlink.org [3]>
Cc:

Sent:
Tue, 4 Apr 2017 16:39:51 -0700
Subject:
[App_rpt-users] event subsystem variable use in system call

I am learning about the event subsystem.

One of my events looks like this:

echo bla ${RPT_ALINKS} >> /tmp/blabla =  s|T|RPT_NUMLINKS

This executes when I connect.  The contents of /tmp/blabla is simply
bla.  I would have expected ${RPT_ALINKS} to have been expanded.  

Am I assuming functionality that doesn't exist?

Lowell

_______________________________________________
 App_rpt-users mailing list
App_rpt-users at lists.allstarlink.org [4]
http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
[5]

 To unsubscribe from this list please visit
http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
[6] and scroll down to the bottom of the page. Enter your email
address and press the "Unsubscribe or edit options button"
 You do not need a password to unsubscribe, you can do it via email
confirmation. If you have trouble unsubscribing, please send a message
to the list detailing the problem. 

 

Links:
------
[1] mailto:mike at midnighteng.com
[2] mailto:app_rpt-users at lists.allstarlink.org
[3] mailto:App_rpt-users at lists.allstarlink.org
[4] mailto:App_rpt-users at lists.allstarlink.org
[5]
http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
[6]
http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20170405/99dc2362/attachment.html>


More information about the App_rpt-users mailing list