Im working on a bash shell to make some connection via rpt fun and the asterisk cli. Is there a way to insert the extension/node number that triggers the shell into said shell automatically? John Rudolph Amateur Radio Op N2YP Unadilla,NY
Like this? asterisk -rx “rpt fun 1000 *70” On Tue, Mar 20, 2018 at 5:23 PM John Rudolph- N2YP <John@n2yp.com> wrote:
Im working on a bash shell to make some connection via rpt fun and the asterisk cli. Is there a way to insert the extension/node number that triggers the shell into said shell automatically? John Rudolph Amateur Radio Op N2YP Unadilla,NY _______________________________________________ App_rpt-users mailing list App_rpt-users@lists.allstarlink.org http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users 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.
-- Skyler Fennell amsatnet.info KDØWHB electricity440@gmail.com
!#/bin/bash LOCALNODE="2000" REMOTENODE="2001" /usr/sbin/asterisk -rx "rpt fun ${LOCALNODE} *3${REMOTENODE}" Should work? On Tue, Mar 20, 2018 at 9:03 PM, Skyler F <electricity440@gmail.com> wrote:
Like this?
asterisk -rx “rpt fun 1000 *70”
On Tue, Mar 20, 2018 at 5:23 PM John Rudolph- N2YP <John@n2yp.com> wrote:
Im working on a bash shell to make some connection via rpt fun and the asterisk cli. Is there a way to insert the extension/node number that triggers the shell into said shell automatically? John Rudolph Amateur Radio Op N2YP Unadilla,NY _______________________________________________ App_rpt-users mailing list App_rpt-users@lists.allstarlink.org http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit http://lists.allstarlink.org/ cgi-bin/mailman/listinfo/app_rpt-users 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.
-- Skyler Fennell amsatnet.info KDØWHB electricity440@gmail.com
_______________________________________________ App_rpt-users mailing list App_rpt-users@lists.allstarlink.org http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit http://lists.allstarlink.org/ cgi-bin/mailman/listinfo/app_rpt-users 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.
On 3/20/2018 9:59 PM, Sam Nabkey wrote:
!#/bin/bash
LOCALNODE="2000" REMOTENODE="2001" /usr/sbin/asterisk -rx "rpt fun ${LOCALNODE} *3${REMOTENODE}"
Should work? Or, if you want to call a single script from multiple DTMF commands; for instance, a shell called connect.sh:
#! /bin/bash /usr/sbin/asterisk -rx "rpt fun $1 *3$2#" for instance, to connect, being called from the DTMF functions: dtmf1=cmd,/etc/asterisk/scripts/connect.sh node1 node2 dtmf2=cmd,/etc/asterisk/scripts/connect.sh node1 node3 where dtmf1 = some valid dtmf sequence node 1 = the node you're sending the command to node2 = the target you want to connect to etc. You could get even fancier, though I haven't tried it, where you pass both the node numbers AND the command to the script: #! /bin/bash /usr/sbin/asterisk -rx "rpt fun $1 $2$3#" in rpt.conf: dtmf1=cmd,/etc/asterisk/scripts/command.sh node1 command node2 such that dtmf1 = some valid dtmf sequence node1 = node you're sending the command to command = the app_rpt command node2 = the target You won't break anything...so experimentation is fun... Bryan WB0YLE/W2FUV Morrisville PA
On 3/21/2018 11:12 AM, Bryan D. Boyle wrote: CORRECTION:
You could get even fancier, though I haven't tried it, where you pass both the node numbers AND the command to the script:
***deletia***
/usr/sbin/asterisk -rx "rpt fun $1 $2$3#"
Should be /usr/sbin/asterisk -rx "rpt fun $1 *$2$3#" which makes the command line (for instance, to connect): dtmf1=cmd,/etc/asterisk/scripts/command.sh 12345 3 56789 to connect node 12345 to node 56789 to disconnect... dtmf2=cmd,/etc/asterisk/scripts/command.sh 12345 1 56789 One shell. Multiple uses. Cleans out the cruft in all our local script directories (if we have them...and you should...) note...you need the first node and the command...if you leave off the second node, it drops through and executes the command on the node1. I'm sure it could be juiced up a bit with some error checking and logging and such...(which I'll do to send stuff to my local QRadar instance here looking at my home network), but, you get the drift. EXPERIMENT folks...you won't break anything. Bryan WB0YLE/W2FUV Morrisville PA
On 3/21/2018 11:23 AM, Bryan D. Boyle wrote:
Should be /usr/sbin/asterisk -rx "rpt fun $1 *$2$3#"
which makes the command line (for instance, to connect): dtmf1=cmd,/etc/asterisk/scripts/command.sh 12345 3 56789 to connect node 12345 to node 56789
to disconnect... dtmf2=cmd,/etc/asterisk/scripts/command.sh 12345 1 56789
One shell. Multiple uses. Cleans out the cruft in all our local script directories (if we have them...and you should...) And, you can chain commands...calling existing scripts... 84=cmd,/etc/asterisk/scripts/command.sh 12345 86 calls... 86=cmd,/etc/asterisk/scripts/forecast.sh
I know, kind of bogus (I've tried it and it works...), but one of those "I wonder..." Using the event management subsystem to, for instance (I don't know if you can do this...but...would be interesting to hack at it...), write the incoming node number to a temp file, read in that temp file as node1 and do something with it. Point being, combining the power of asterisk with the almost unlimited utilities in the underlying OS...haven't even begun (after all this time) to tap what is possible. Bryan WB0YLE/W2FUV Morrisville (snowy) PA
Hello everyone, I want to have my LOGS with the .CVS file I created a CDR.CONF file in etc/asterisk ------------------------------------------------------------------- [general] enable = yes loggingsfeshutdown = yes [CSV] usegmtime = yes; log date / time in GMT. Default is "no" loguniqueid = yes; log uniqueid. Default is "no" loguserfield = yes; log user field. Default is "no" ------------------------------------------------------------------------- and with PUTTY in "11 - Run asterisk CLI Client" I put in the command line "module load cdr_csv.so" and I have an error message ------------------------------------------------------------------------ raspberry * CLI> module load cdr_cvs.so [Mar 21 17:35:55] WARNING [8179]: loader.c: 361 load_dynamic_module: Error loading 'cdr_cvs.so' module: /usr/local/hamvoip-asterisk/lib/asterisk/modules/cdr_cvs.so: can not open shared object file: No such file or directory [Mar 21 17:35:55] WARNING [8179]: loader.c: 655 load_resource: Module 'cdr_cvs.so' could not be loaded. raspberry * CLI> ----------------------------------------------------------------------------- I even created in modules.conf load = cdr_cvs.so ; ; Asterisk configuration file ; ; Loader configuration file module ; [Modules] autoload = yes noload = chan_oss.so noload = chan_alsa.so noload = chan_phone.so ; ---------------------- --- Make by LUC --- load = cdr_cvs.so ; ----------------------- noload = func_moh.so noload = res_musiconhold.so noload = res_speech.so ; Noload = res_crypto.so noload = res_odbc.so noload = res_smdi.so noload = res_config_odbc.so ---------------------------------------------------------------------------- For what it does not work and where I will find my .CVS file Thank you for your help Luc
Try: module load cdr_csv.so NOT: module load cdr_cvs.so 73, David KB4FXC On Wed, 21 Mar 2018, Luc Drolet wrote:
Hello everyone,
I want to have my LOGS with the .CVS file I created a CDR.CONF file in etc/asterisk ------------------------------------------------------------------- [general] enable = yes loggingsfeshutdown = yes
[CSV] usegmtime = yes; log date / time in GMT. Default is "no" loguniqueid = yes; log uniqueid. Default is "no" loguserfield = yes; log user field. Default is "no" ------------------------------------------------------------------------- and with PUTTY in "11 - Run asterisk CLI Client" I put in the command line "module load cdr_csv.so" and I have an error message ------------------------------------------------------------------------ raspberry * CLI> module load cdr_cvs.so [Mar 21 17:35:55] WARNING [8179]: loader.c: 361 load_dynamic_module: Error loading 'cdr_cvs.so' module: /usr/local/hamvoip-asterisk/lib/asterisk/modules/cdr_cvs.so: can not open shared object file: No such file or directory [Mar 21 17:35:55] WARNING [8179]: loader.c: 655 load_resource: Module 'cdr_cvs.so' could not be loaded. raspberry * CLI> ----------------------------------------------------------------------------- I even created in modules.conf load = cdr_cvs.so ; ; Asterisk configuration file ; ; Loader configuration file module ;
[Modules] autoload = yes noload = chan_oss.so noload = chan_alsa.so noload = chan_phone.so
; ---------------------- --- Make by LUC --- load = cdr_cvs.so ; -----------------------
noload = func_moh.so noload = res_musiconhold.so noload = res_speech.so ; Noload = res_crypto.so noload = res_odbc.so noload = res_smdi.so noload = res_config_odbc.so ---------------------------------------------------------------------------- For what it does not work and where I will find my .CVS file
Thank you for your help
Luc
OK I made the correction and he says there is now ------------------------ raspberry * CLI> module load cdr_csv.so [Mar 21 19:13:26] WARNING [9425]: loader.c: 645 load_resource: Module 'cdr_csv.so' already exists. -------------------------------------------------- - but where are I going to find my files? can you help me Thank you Luc VE2LUQ
Le 21 mars 2018 à 18:06, David McGough <kb4fxc@inttek.net> a écrit :
Try: module load cdr_csv.so
NOT: module load cdr_cvs.so
73, David KB4FXC
On Wed, 21 Mar 2018, Luc Drolet wrote:
Hello everyone,
I want to have my LOGS with the .CVS file I created a CDR.CONF file in etc/asterisk ------------------------------------------------------------------- [general] enable = yes loggingsfeshutdown = yes
[CSV] usegmtime = yes; log date / time in GMT. Default is "no" loguniqueid = yes; log uniqueid. Default is "no" loguserfield = yes; log user field. Default is "no" ------------------------------------------------------------------------- and with PUTTY in "11 - Run asterisk CLI Client" I put in the command line "module load cdr_csv.so" and I have an error message ------------------------------------------------------------------------ raspberry * CLI> module load cdr_cvs.so [Mar 21 17:35:55] WARNING [8179]: loader.c: 361 load_dynamic_module: Error loading 'cdr_cvs.so' module: /usr/local/hamvoip-asterisk/lib/asterisk/modules/cdr_cvs.so: can not open shared object file: No such file or directory [Mar 21 17:35:55] WARNING [8179]: loader.c: 655 load_resource: Module 'cdr_cvs.so' could not be loaded. raspberry * CLI> ----------------------------------------------------------------------------- I even created in modules.conf load = cdr_cvs.so ; ; Asterisk configuration file ; ; Loader configuration file module ;
[Modules] autoload = yes noload = chan_oss.so noload = chan_alsa.so noload = chan_phone.so
; ---------------------- --- Make by LUC --- load = cdr_cvs.so ; -----------------------
noload = func_moh.so noload = res_musiconhold.so noload = res_speech.so ; Noload = res_crypto.so noload = res_odbc.so noload = res_smdi.so noload = res_config_odbc.so ---------------------------------------------------------------------------- For what it does not work and where I will find my .CVS file
Thank you for your help
Luc
_______________________________________________ App_rpt-users mailing list App_rpt-users@lists.allstarlink.org http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users 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.
Hi, I believe you can find the CSV data files in this folder: /var/log/asterisk/cdr-csv 73, David KB4FXC On Wed, 21 Mar 2018, Luc Drolet wrote:
OK I made the correction and he says there is now
raspberry * CLI> module load cdr_csv.so [Mar 21 19:13:26] WARNING [9425]: loader.c: 645 load_resource: Module 'cdr_csv.so' already exists. -------------------------------------------------- - but where are I going to find my files? can you help me Thank you Luc VE2LUQ
Le 21 mars 2018 à 18:06, David McGough <kb4fxc@inttek.net> a écrit :
Try: module load cdr_csv.so
NOT: module load cdr_cvs.so
73, David KB4FXC
On Wed, 21 Mar 2018, Luc Drolet wrote:
Hello everyone,
I want to have my LOGS with the .CVS file I created a CDR.CONF file in etc/asterisk ------------------------------------------------------------------- [general] enable = yes loggingsfeshutdown = yes
[CSV] usegmtime = yes; log date / time in GMT. Default is "no" loguniqueid = yes; log uniqueid. Default is "no" loguserfield = yes; log user field. Default is "no" ------------------------------------------------------------------------- and with PUTTY in "11 - Run asterisk CLI Client" I put in the command line "module load cdr_csv.so" and I have an error message ------------------------------------------------------------------------ raspberry * CLI> module load cdr_cvs.so [Mar 21 17:35:55] WARNING [8179]: loader.c: 361 load_dynamic_module: Error loading 'cdr_cvs.so' module: /usr/local/hamvoip-asterisk/lib/asterisk/modules/cdr_cvs.so: can not open shared object file: No such file or directory [Mar 21 17:35:55] WARNING [8179]: loader.c: 655 load_resource: Module 'cdr_cvs.so' could not be loaded. raspberry * CLI> ----------------------------------------------------------------------------- I even created in modules.conf load = cdr_cvs.so ; ; Asterisk configuration file ; ; Loader configuration file module ;
[Modules] autoload = yes noload = chan_oss.so noload = chan_alsa.so noload = chan_phone.so
; ---------------------- --- Make by LUC --- load = cdr_cvs.so ; -----------------------
noload = func_moh.so noload = res_musiconhold.so noload = res_speech.so ; Noload = res_crypto.so noload = res_odbc.so noload = res_smdi.so noload = res_config_odbc.so ---------------------------------------------------------------------------- For what it does not work and where I will find my .CVS file
Thank you for your help
Luc
_______________________________________________ App_rpt-users mailing list App_rpt-users@lists.allstarlink.org http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users 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.
_______________________________________________ App_rpt-users mailing list App_rpt-users@lists.allstarlink.org http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users To unsubscribe from this list please visit http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users 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.
On 3/20/18 7:23 PM, John Rudolph- N2YP wrote:
Im working on a bash shell to make some connection via rpt fun and the asterisk cli. Is there a way to insert the extension/node number that triggers the shell into said shell automatically?
I think what you're asking here is can you export a variable to it from within app_rpt? http://docs.allstarlink.org/drupal/node/94 Look at: Get a detailed directory listing of the '/tmp' directory, and put its output into the file '/tmp/example.txt' every time node 2001 is connected to, and stops indicating keying towards our node (not that anyone would ever really want to do that... its just an example). TEMPVAR = v|e|${RPT_ALINKS} =~ "\",2001[TRC]K\"" ls -l /tmp > /tmp/example.txt = s|f|TEMPVAR Basically you can define an action to take when a VAR is set and then pass that var to the action on the command line. -- Bryan Fields 727-409-1194 - Voice http://bryanfields.net
participants (7)
-
Bryan D. Boyle -
Bryan Fields -
David McGough -
John Rudolph- N2YP -
Luc Drolet -
Sam Nabkey -
Skyler F