Hi all, I'm wondering what the syntax is to call a shell script from a DTMF command in app_rpt - or even if this is possible? What I'm trying to do is a variation on the method described by Steve earlier to inhibit incoming calls. What I intend to to is this: When the user keys a specific DTMF code, have a script run which renames IRLP.conf as somethingelse.conf ad then restart asterisk, so effectively disabling IRLP part of the node. I will do the same with Echolink but with a different code..... I've tried using the dialplan to call some announcements just to see if it worked - it didnt! Here is what I put in my dialplan ( I tried under Default and also Radio-secure stanzas ) exten => *990,1,Answer exten => *990,n,Wait 1 exten => *990,n,Playback,rpt/connected exten => *990,n,Playback,rpt/functioncomplete exten => *990,n,Hangup So, I wonder what I'm doing wrong here - I thought I'd try and get this working before going on to use the *990,n,system(script_directory/script) method. Is it possible to call a system command from rpt.conf instead? Thanks for all your patience! Matt G4RKY
Matt Beasant wrote:
Hi all, I'm wondering what the syntax is to call a shell script from a DTMF command in app_rpt - or even if this is possible?
What I'm trying to do is a variation on the method described by Steve earlier to inhibit incoming calls.
What I intend to to is this:
When the user keys a specific DTMF code, have a script run which renames IRLP.conf as somethingelse.conf ad then restart asterisk, so effectively disabling IRLP part of the node. I will do the same with Echolink but with a different code.....
I've tried using the dialplan to call some announcements just to see if it worked - it didnt!
Here is what I put in my dialplan ( I tried under Default and also Radio-secure stanzas )
exten => *990,1,Answer exten => *990,n,Wait 1 exten => *990,n,Playback,rpt/connected exten => *990,n,Playback,rpt/functioncomplete exten => *990,n,Hangup
So, I wonder what I'm doing wrong here - I thought I'd try and get this working before going on to use the *990,n,system(script_directory/script) method.
Is it possible to call a system command from rpt.conf instead?
Thanks for all your patience!
Matt G4RKY
------------------------------------------------------------------------
_______________________________________________ App_rpt-users mailing list App_rpt-users@qrvc.com http://qrvc.com/mailman/listinfo/app_rpt-users
app_rpt functions can't be added in extensions.conf! Set up an autopatch to access a specific context in extensions.conf using context=yourcontext and farenddisconnect=1 on the function entry in the function stanza. Once your context executes in extensions.conf you can execute programs using Asterisk extension logic. (You'll need to do some reading in the asterisk book or on voip-info.org if you don't know what extension logic is) You can use one or two digit extension numbers within the context in extensions.confto allow several different things to be done in extensions.conf. Function table in rpt.conf: *97,autopatchup,context=mycontext,farenddisconnect=1 Context in extensions.conf: [mycontext] exten => 1,1,Answer exten => 1,n,Wait 1 ... Do something like set global variable. exten => 1,n,Hangup exten => 2,1,Answer exten => 2,n,Wait 1 ... Do something like reset a global variable. exten => 2,n,Hangup So you would dial *971 or *972 to access the individual functions. Steve WA6ZFT
Top notch Steve, I have this working a treat now, thanks! I have a further question, if for example I wanted to disable IRLP and/or Echolink in a similar manner ( by swapping over files with lines commented out ) would this work too? I have a feeling that the presence or absence of IRLP.conf or Echolink.conf is only read when app_rpt starts up. Is that right? If this is the case, is there any other way of temporarily disabling IRLP and /or Echolink without having to restart Asterisk to read in the chnages? Thanks again, Matt G4RKY 2009/6/10 Stephen Rodgers <sales@qrvc.com>
Matt Beasant wrote:
Hi all, I'm wondering what the syntax is to call a shell script from a DTMF command in app_rpt - or even if this is possible?
What I'm trying to do is a variation on the method described by Steve earlier to inhibit incoming calls.
What I intend to to is this:
When the user keys a specific DTMF code, have a script run which renames IRLP.conf as somethingelse.conf ad then restart asterisk, so effectively disabling IRLP part of the node. I will do the same with Echolink but with a different code.....
I've tried using the dialplan to call some announcements just to see if it worked - it didnt!
Here is what I put in my dialplan ( I tried under Default and also Radio-secure stanzas )
exten => *990,1,Answer exten => *990,n,Wait 1 exten => *990,n,Playback,rpt/connected exten => *990,n,Playback,rpt/functioncomplete exten => *990,n,Hangup
So, I wonder what I'm doing wrong here - I thought I'd try and get this working before going on to use the *990,n,system(script_directory/script) method.
Is it possible to call a system command from rpt.conf instead?
Thanks for all your patience!
Matt G4RKY
------------------------------------------------------------------------
_______________________________________________ App_rpt-users mailing list App_rpt-users@qrvc.com http://qrvc.com/mailman/listinfo/app_rpt-users
app_rpt functions can't be added in extensions.conf!
Set up an autopatch to access a specific context in extensions.conf using context=yourcontext and farenddisconnect=1 on the function entry in the function stanza. Once your context executes in extensions.conf you can execute programs using Asterisk extension logic. (You'll need to do some reading in the asterisk book or on voip-info.org if you don't know what extension logic is) You can use one or two digit extension numbers within the context in extensions.confto allow several different things to be done in extensions.conf.
Function table in rpt.conf:
*97,autopatchup,context=mycontext,farenddisconnect=1
Context in extensions.conf:
[mycontext] exten => 1,1,Answer exten => 1,n,Wait 1 ... Do something like set global variable. exten => 1,n,Hangup exten => 2,1,Answer exten => 2,n,Wait 1 ... Do something like reset a global variable. exten => 2,n,Hangup
So you would dial *971 or *972 to access the individual functions.
Steve WA6ZFT
_______________________________________________ App_rpt-users mailing list App_rpt-users@qrvc.com http://qrvc.com/mailman/listinfo/app_rpt-users
Matt Beasant wrote:
Top notch Steve, I have this working a treat now, thanks! I have a further question, if for example I wanted to disable IRLP and/or Echolink in a similar manner ( by swapping over files with lines commented out ) would this work too?
I have a feeling that the presence or absence of IRLP.conf or Echolink.conf is only read when app_rpt starts up. Is that right?
If this is the case, is there any other way of temporarily disabling IRLP and /or Echolink without having to restart Asterisk to read in the chnages?
Thanks again,
Matt G4RKY
2009/6/10 Stephen Rodgers <sales@qrvc.com>
Matt Beasant wrote:
Hi all, I'm wondering what the syntax is to call a shell script from a DTMF command in app_rpt - or even if this is possible?
What I'm trying to do is a variation on the method described by Steve earlier to inhibit incoming calls.
What I intend to to is this:
When the user keys a specific DTMF code, have a script run which renames IRLP.conf as somethingelse.conf ad then restart asterisk, so effectively disabling IRLP part of the node. I will do the same with Echolink but with a different code.....
I've tried using the dialplan to call some announcements just to see if it worked - it didnt!
Here is what I put in my dialplan ( I tried under Default and also Radio-secure stanzas )
exten => *990,1,Answer exten => *990,n,Wait 1 exten => *990,n,Playback,rpt/connected exten => *990,n,Playback,rpt/functioncomplete exten => *990,n,Hangup
So, I wonder what I'm doing wrong here - I thought I'd try and get this working before going on to use the *990,n,system(script_directory/script) method.
Is it possible to call a system command from rpt.conf instead?
Thanks for all your patience!
Matt G4RKY
------------------------------------------------------------------------
_______________________________________________ App_rpt-users mailing list App_rpt-users@qrvc.com http://qrvc.com/mailman/listinfo/app_rpt-users app_rpt functions can't be added in extensions.conf!
Set up an autopatch to access a specific context in extensions.conf using context=yourcontext and farenddisconnect=1 on the function entry in the function stanza. Once your context executes in extensions.conf you can execute programs using Asterisk extension logic. (You'll need to do some reading in the asterisk book or on voip-info.org if you don't know what extension logic is) You can use one or two digit extension numbers within the context in extensions.confto allow several different things to be done in extensions.conf.
Function table in rpt.conf:
*97,autopatchup,context=mycontext,farenddisconnect=1
Context in extensions.conf:
[mycontext] exten => 1,1,Answer exten => 1,n,Wait 1 ... Do something like set global variable. exten => 1,n,Hangup exten => 2,1,Answer exten => 2,n,Wait 1 ... Do something like reset a global variable. exten => 2,n,Hangup
So you would dial *971 or *972 to access the individual functions.
Steve WA6ZFT
_______________________________________________ App_rpt-users mailing list App_rpt-users@qrvc.com http://qrvc.com/mailman/listinfo/app_rpt-users
------------------------------------------------------------------------
_______________________________________________ App_rpt-users mailing list App_rpt-users@qrvc.com http://qrvc.com/mailman/listinfo/app_rpt-users
There's no easy way to do this without making a mess of it. So I added two new COP functions to app_rpt.c to disable incoming connections and enable incoming connections. cop,49 disables Allstar, IRLP and Echolink connections, and cop,50 enables them. You must have app_rpt.c version 0.188 or later for this to work. App_rpt.c version 0.188 will show up on the public SVN server shortly. Steve WA6ZFT
If you have link set with (ilink,13) up and issue a cop,49 will whatever was linked stay up? I think quite a few of us run into the "we want to link to X and X only.Keep it up, but don't allow anyone else to connect via any method" ie our local NWS or *WX_TALK* via echolink, or maybe an IRLP reflector. Also can the list be fixed so when you reply, it goes back to the list not the sender? Don W9DRR
There's no easy way to do this without making a mess of it. So I added two new COP functions to app_rpt.c to disable incoming connections and enable incoming connections. cop,49 disables Allstar, IRLP and Echolink connections, and cop,50 enables them. You must have app_rpt.c version 0.188 or later for this to work. App_rpt.c version 0.188 will show up on the public SVN server shortly.
Steve WA6ZFT
_________________________________________________________________ Lauren found her dream laptop. Find the PC that’s right for you. http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
Don Russell wrote:
If you have link set with (ilink,13) up and issue a cop,49 will whatever was linked stay up? I think quite a few of us run into the "we want to link to X and X only.Keep it up, but don't allow anyone else to connect via any method" ie our local NWS or *WX_TALK* via echolink, or maybe an IRLP reflector.
Also can the list be fixed so when you reply, it goes back to the list not the sender?
Don W9DRR
There's no easy way to do this without making a mess of it. So I added two new COP functions to app_rpt.c to disable incoming connections and enable incoming connections. cop,49 disables Allstar, IRLP and Echolink connections, and cop,50 enables them. You must have app_rpt.c version 0.188 or later for this to work. App_rpt.c version 0.188 will show up on the public SVN server shortly.
Steve WA6ZFT
_________________________________________________________________ Lauren found her dream laptop. Find the PC that’s right for you. http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
------------------------------------------------------------------------
_______________________________________________ App_rpt-users mailing list App_rpt-users@qrvc.com http://qrvc.com/mailman/listinfo/app_rpt-users
No. This is a simple fix and is not that elaborate. If a node is already linked, then the connection will stay up as long as the network path is there, and the calling node does not disconnect. cop,49 prevents new incoming connections from nodes but does not disconnect established connections. To do what you want to do, please consider using extension logic, and switch in filtering statements using the caller ID mechanism when you only want a selected number of nodes to connect. P.S. Please bottom post as the thread posts are then in ascending post time order. Steve WA6ZFT
participants (3)
-
Don Russell -
Matt Beasant -
Stephen Rodgers