Macro Help

Im still a bit confused on how to use macros. So lets say I want to execute a command when the DTMF is dialed, lets say just a simple localplay

How would I implement that command into a DTMF sequence so I could save it as part of my macro.

Lets say I wanted to create a macro to connect to the node 28298 and play the audio file. How would I implement the localplay command in the macros?

[mymacros]

1= (localplaycommandHere) *328298

73

···


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com

First of all there is a way to do that automatically. Put a sound file in
/var/lib/asterisk/sounds/rpt/nodenames/
such as 27225.ulaw
That file would play when you connected to node 27225.
There are already some sample files in there and some groups like the WAN system have file sets you can install for many of their nodes.
To just play a sound file locally when you type a DTMF sequence do the following…
In the functions section of your rpt.conf file add the DTMF sequence. Note the DTMF sequence must not conflict with any other commands.
985=localplay,/tmp/some-sound-file
This would play the file when you DTMF 985. Note that you do NOT put the extent on the sound file name. No ulaw, gsm etc. and the file must comply with the requirements for playing - sample rate, etc.
Another way to execute macro commands and a way I usually employ because it is much more flexible is to use bash scripts in the system and call them to do things. The scripts could also be called from a system cron job setup using crontab.
985=cmd,/tmp/some-script.sh
The script could be
#! /bin/bash
/usr/sbin/asterisk -rx “rpt fun node *327133”
/usr/sbin/asterisk -rx “rpt localplay node some-sound-file”
Replace node with your node number
This would connect your node to node 27133 and play the specified sound file locally.
These scripts could go anywhere on the system but I recommend creating a directory under /etc/asterisk - call it local or your call letters or whatever you want and put your local files there. Then if you backup the asterisk directory your local files will be backed up also.
Remember you have to make a script you create executable for it to work - chmod 750 filename
73 Doug
WA3DSP
http://www.crompton.com/hamradio

···

Date: Mon, 7 Jul 2014 16:14:58 -0600
From: electricity440@gmail.com
To: app_rpt-users@ohnosec.org
Subject: [App_rpt-users] Macro Help

Im still a bit confused on how to use macros. So lets say I want to execute a command when the DTMF is dialed, lets say just a simple localplay

How would I implement that command into a DTMF sequence so I could save it as part of my macro.

Lets say I wanted to create a macro to connect to the node 28298 and play the audio file. How would I implement the localplay command in the macros?

[mymacros]

1= (localplaycommandHere) *328298

73


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com


App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit http://ohnosec.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.

set duplex=1 in rpt.conf
73 Doug
WA3DSP
WA3DSP Amateur Radio Resources

···

Date: Tue, 8 Jul 2014 06:58:27 -0600
Subject: Re: [App_rpt-users] Macro Help
From: electricity440@gmail.com
To: doug@crompton.com

I just realized that no audio will play when Duplex=0. Telemetry works, but any system audio does not work. Is there a way to fix this?

On Mon, Jul 7, 2014 at 10:43 PM, Doug Crompton doug@crompton.com wrote:

First of all there is a way to do that automatically. Put a sound file in
/var/lib/asterisk/sounds/rpt/nodenames/
such as 27225.ulaw
That file would play when you connected to node 27225.
There are already some sample files in there and some groups like the WAN system have file sets you can install for many of their nodes.
To just play a sound file locally when you type a DTMF sequence do the following…
In the functions section of your rpt.conf file add the DTMF sequence. Note the DTMF sequence must not conflict with any other commands.
985=localplay,/tmp/some-sound-file
This would play the file when you DTMF 985. Note that you do NOT put the extent on the sound file name. No ulaw, gsm etc. and the file must comply with the requirements for playing - sample rate, etc.
Another way to execute macro commands and a way I usually employ because it is much more flexible is to use bash scripts in the system and call them to do things. The scripts could also be called from a system cron job setup using crontab.
985=cmd,/tmp/some-script.sh
The script could be
#! /bin/bash
/usr/sbin/asterisk -rx “rpt fun node *327133”
/usr/sbin/asterisk -rx “rpt localplay node some-sound-file”
Replace node with your node number
This would connect your node to node 27133 and play the specified sound file locally.
These scripts could go anywhere on the system but I recommend creating a directory under /etc/asterisk - call it local or your call letters or whatever you want and put your local files there. Then if you backup the asterisk directory your local files will be backed up also.
Remember you have to make a script you create executable for it to work - chmod 750 filename
73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Mon, 7 Jul 2014 16:14:58 -0600

From: electricity440@gmail.com
To: app_rpt-users@ohnosec.org
Subject: [App_rpt-users] Macro Help

Im still a bit confused on how to use macros. So lets say I want to execute a command when the DTMF is dialed, lets say just a simple localplay

How would I implement that command into a DTMF sequence so I could save it as part of my macro.

Lets say I wanted to create a macro to connect to the node 28298 and play the audio file. How would I implement the localplay command in the macros?

[mymacros]

1= (localplaycommandHere) *328298

73


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com


App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.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

This goes back to what I was dealing with before, my link to the remote repeater (via input frequency) requires me to use duplex=0 so I don’t have to deal with it ID’ing over the repeater etc.

If I were to use duplex=1, there would be 3 constraints I would need to solve

#1- NO voice prompt comes in when I enable or disable TX PL on Input ONLY , I can’t have it saying “T” “X” “P” “L” “E” “N” “A” every time I have a dtmf or macro enabling and disabling it.

#2- After I unkey, it does this [Wait , Courtesy beep , Wait] , I don’t know what the first wait is, I know the second one is hang time. I need to delete both waits.

#3- I think pretty easy I saw some other threads on it, run macros when connected to any node, and run a macros when disconnected.

If those three constraints are solved, I can then turn duplex=0 to 1. Else, I have to stay there.

73 Skyler KDØWHB

···

On Tue, Jul 8, 2014 at 8:11 AM, Doug Crompton doug@crompton.com wrote:

set duplex=1 in rpt.conf

73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Tue, 8 Jul 2014 06:58:27 -0600
Subject: Re: [App_rpt-users] Macro Help
From: electricity440@gmail.com
To: doug@crompton.com

I just realized that no audio will play when Duplex=0. Telemetry works, but any system audio does not work. Is there a way to fix this?

On Mon, Jul 7, 2014 at 10:43 PM, Doug Crompton doug@crompton.com wrote:

First of all there is a way to do that automatically. Put a sound file in
/var/lib/asterisk/sounds/rpt/nodenames/
such as 27225.ulaw
That file would play when you connected to node 27225.
There are already some sample files in there and some groups like the WAN system have file sets you can install for many of their nodes.
To just play a sound file locally when you type a DTMF sequence do the following…
In the functions section of your rpt.conf file add the DTMF sequence. Note the DTMF sequence must not conflict with any other commands.
985=localplay,/tmp/some-sound-file
This would play the file when you DTMF 985. Note that you do NOT put the extent on the sound file name. No ulaw, gsm etc. and the file must comply with the requirements for playing - sample rate, etc.
Another way to execute macro commands and a way I usually employ because it is much more flexible is to use bash scripts in the system and call them to do things. The scripts could also be called from a system cron job setup using crontab.
985=cmd,/tmp/some-script.sh
The script could be
#! /bin/bash
/usr/sbin/asterisk -rx “rpt fun node *327133”
/usr/sbin/asterisk -rx “rpt localplay node some-sound-file”
Replace node with your node number
This would connect your node to node 27133 and play the specified sound file locally.
These scripts could go anywhere on the system but I recommend creating a directory under /etc/asterisk - call it local or your call letters or whatever you want and put your local files there. Then if you backup the asterisk directory your local files will be backed up also.
Remember you have to make a script you create executable for it to work - chmod 750 filename
73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Mon, 7 Jul 2014 16:14:58 -0600

From: electricity440@gmail.com
To: app_rpt-users@ohnosec.org
Subject: [App_rpt-users] Macro Help

Im still a bit confused on how to use macros. So lets say I want to execute a command when the DTMF is dialed, lets say just a simple localplay

How would I implement that command into a DTMF sequence so I could save it as part of my macro.

Lets say I wanted to create a macro to connect to the node 28298 and play the audio file. How would I implement the localplay command in the macros?

[mymacros]

1= (localplaycommandHere) *328298

73


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com


App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.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


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com

Skyler,
I am not sure what you are trying to do. I think you are using a remote Allstar node into a repeater. You can turn off CW ID just by not defining it. You can do the same with courtesy tones. So you could set duplex=1 and eliminate those if you want. Keep in mind though that legally all transmitters need to ID. If it is your repeater then it should not be a big deal if the remote ID’s. You just don’t want repeater ID’s to come back over the Allstar network. You want the repeater COS or tone to follow the input of the repeater NOT when the repeater transmits on its own such as when it is doing an ID.
73 Doug
WA3DSP
WA3DSP Amateur Radio Resources

···

Date: Tue, 8 Jul 2014 08:24:12 -0600
Subject: Re: [App_rpt-users] Macro Help
From: electricity440@gmail.com
To: doug@crompton.com; app_rpt-users@ohnosec.org

This goes back to what I was dealing with before, my link to the remote repeater (via input frequency) requires me to use duplex=0 so I don’t have to deal with it ID’ing over the repeater etc.

If I were to use duplex=1, there would be 3 constraints I would need to solve

#1- NO voice prompt comes in when I enable or disable TX PL on Input ONLY , I can’t have it saying “T” “X” “P” “L” “E” “N” “A” every time I have a dtmf or macro enabling and disabling it.

#2- After I unkey, it does this [Wait , Courtesy beep , Wait] , I don’t know what the first wait is, I know the second one is hang time. I need to delete both waits.

#3- I think pretty easy I saw some other threads on it, run macros when connected to any node, and run a macros when disconnected.

If those three constraints are solved, I can then turn duplex=0 to 1. Else, I have to stay there.

73 Skyler KDØWHB

On Tue, Jul 8, 2014 at 8:11 AM, Doug Crompton doug@crompton.com wrote:

set duplex=1 in rpt.conf

73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Tue, 8 Jul 2014 06:58:27 -0600
Subject: Re: [App_rpt-users] Macro Help
From: electricity440@gmail.com
To: doug@crompton.com

I just realized that no audio will play when Duplex=0. Telemetry works, but any system audio does not work. Is there a way to fix this?

On Mon, Jul 7, 2014 at 10:43 PM, Doug Crompton doug@crompton.com wrote:

First of all there is a way to do that automatically. Put a sound file in
/var/lib/asterisk/sounds/rpt/nodenames/
such as 27225.ulaw
That file would play when you connected to node 27225.
There are already some sample files in there and some groups like the WAN system have file sets you can install for many of their nodes.
To just play a sound file locally when you type a DTMF sequence do the following…
In the functions section of your rpt.conf file add the DTMF sequence. Note the DTMF sequence must not conflict with any other commands.
985=localplay,/tmp/some-sound-file
This would play the file when you DTMF 985. Note that you do NOT put the extent on the sound file name. No ulaw, gsm etc. and the file must comply with the requirements for playing - sample rate, etc.
Another way to execute macro commands and a way I usually employ because it is much more flexible is to use bash scripts in the system and call them to do things. The scripts could also be called from a system cron job setup using crontab.
985=cmd,/tmp/some-script.sh
The script could be
#! /bin/bash
/usr/sbin/asterisk -rx “rpt fun node *327133”
/usr/sbin/asterisk -rx “rpt localplay node some-sound-file”
Replace node with your node number
This would connect your node to node 27133 and play the specified sound file locally.
These scripts could go anywhere on the system but I recommend creating a directory under /etc/asterisk - call it local or your call letters or whatever you want and put your local files there. Then if you backup the asterisk directory your local files will be backed up also.
Remember you have to make a script you create executable for it to work - chmod 750 filename
73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Mon, 7 Jul 2014 16:14:58 -0600

From: electricity440@gmail.com
To: app_rpt-users@ohnosec.org
Subject: [App_rpt-users] Macro Help

Im still a bit confused on how to use macros. So lets say I want to execute a command when the DTMF is dialed, lets say just a simple localplay

How would I implement that command into a DTMF sequence so I could save it as part of my macro.

Lets say I wanted to create a macro to connect to the node 28298 and play the audio file. How would I implement the localplay command in the macros?

[mymacros]

1= (localplaycommandHere) *328298

73


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com


App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.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


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com

Yes,

•I am adding a remote allstar node into a repeater.

•I still want it to ID, to compensate for the problems with the ID’s from the repeater and my node, I will use the function TX PL on input only. This will make the ID not heard on the repeater.

•the repeater will turn off the tone for the tail, courtesy, and ID.

Now the problem arises, I do not have any way of hearing telemetry, so the idea is to turn the TX PL mode off when I connect to a node and reenable it when I disconnect.

•The problem with this is the annoying voice will come in every time I connect “TX PL ENA”

Is there a way to disable that voice when it says that?

73

Skyler KDØWHB

···

Sent from my iPhone

On Jul 8, 2014, at 11:00 AM, Doug Crompton doug@crompton.com wrote:

Skyler,
I am not sure what you are trying to do. I think you are using a remote Allstar node into a repeater. You can turn off CW ID just by not defining it. You can do the same with courtesy tones. So you could set duplex=1 and eliminate those if you want. Keep in mind though that legally all transmitters need to ID. If it is your repeater then it should not be a big deal if the remote ID’s. You just don’t want repeater ID’s to come back over the Allstar network. You want the repeater COS or tone to follow the input of the repeater NOT when the repeater transmits on its own such as when it is doing an ID.
73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Tue, 8 Jul 2014 08:24:12 -0600
Subject: Re: [App_rpt-users] Macro Help
From: electricity440@gmail.com
To: doug@crompton.com; app_rpt-users@ohnosec.org

This goes back to what I was dealing with before, my link to the remote repeater (via input frequency) requires me to use duplex=0 so I don’t have to deal with it ID’ing over the repeater etc.

If I were to use duplex=1, there would be 3 constraints I would need to solve

#1- NO voice prompt comes in when I enable or disable TX PL on Input ONLY , I can’t have it saying “T” “X” “P” “L” “E” “N” “A” every time I have a dtmf or macro enabling and disabling it.

#2- After I unkey, it does this [Wait , Courtesy beep , Wait] , I don’t know what the first wait is, I know the second one is hang time. I need to delete both waits.

#3- I think pretty easy I saw some other threads on it, run macros when connected to any node, and run a macros when disconnected.

If those three constraints are solved, I can then turn duplex=0 to 1. Else, I have to stay there.

73 Skyler KDØWHB

On Tue, Jul 8, 2014 at 8:11 AM, Doug Crompton doug@crompton.com wrote:

set duplex=1 in rpt.conf

73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Tue, 8 Jul 2014 06:58:27 -0600
Subject: Re: [App_rpt-users] Macro Help
From: electricity440@gmail.com
To: doug@crompton.com

I just realized that no audio will play when Duplex=0. Telemetry works, but any system audio does not work. Is there a way to fix this?

On Mon, Jul 7, 2014 at 10:43 PM, Doug Crompton doug@crompton.com wrote:

First of all there is a way to do that automatically. Put a sound file in
/var/lib/asterisk/sounds/rpt/nodenames/
such as 27225.ulaw
That file would play when you connected to node 27225.
There are already some sample files in there and some groups like the WAN system have file sets you can install for many of their nodes.
To just play a sound file locally when you type a DTMF sequence do the following…
In the functions section of your rpt.conf file add the DTMF sequence. Note the DTMF sequence must not conflict with any other commands.
985=localplay,/tmp/some-sound-file
This would play the file when you DTMF 985. Note that you do NOT put the extent on the sound file name. No ulaw, gsm etc. and the file must comply with the requirements for playing - sample rate, etc.
Another way to execute macro commands and a way I usually employ because it is much more flexible is to use bash scripts in the system and call them to do things. The scripts could also be called from a system cron job setup using crontab.
985=cmd,/tmp/some-script.sh
The script could be
#! /bin/bash
/usr/sbin/asterisk -rx “rpt fun node *327133”
/usr/sbin/asterisk -rx “rpt localplay node some-sound-file”
Replace node with your node number
This would connect your node to node 27133 and play the specified sound file locally.
These scripts could go anywhere on the system but I recommend creating a directory under /etc/asterisk - call it local or your call letters or whatever you want and put your local files there. Then if you backup the asterisk directory your local files will be backed up also.
Remember you have to make a script you create executable for it to work - chmod 750 filename
73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Mon, 7 Jul 2014 16:14:58 -0600

From: electricity440@gmail.com
To: app_rpt-users@ohnosec.org
Subject: [App_rpt-users] Macro Help

Im still a bit confused on how to use macros. So lets say I want to execute a command when the DTMF is dialed, lets say just a simple localplay

How would I implement that command into a DTMF sequence so I could save it as part of my macro.

Lets say I wanted to create a macro to connect to the node 28298 and play the audio file. How would I implement the localplay command in the macros?

[mymacros]

1= (localplaycommandHere) *328298

73


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com


App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.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


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com

telemwait=

and, in courtesy tones;
^ ^ ^ ^
> > > >----- amplitude
> > >------------duration
> >----------------Frequency 2
>---------------------Frequency 1
So, 660hz, 880hz, 150ms at 2048 amplitude.
Mine is like this…
ct8=|t(0,0,10,0)(880,440,50,2048)(0,0,50,0)(350,440,50,2048)
[wait-times]
telemwait=150
idwait=10 unkeywait=650
calltermwait=150
That’s after the signal into the repeater goes away, and before the
telemetry starts. Of course, you don’t -want- telemetry, so someone
else could help, there. I added the 10ms delay before the tones,
because that’s what worked for me.
You can add custom sounds here, instead of tones. Some have gotten
rather clever with tones, imitating the NexTel Chirp, for one… the
's-s-stutter dial-tone, for another… a StarTrek Communicator, etc,
etc…

···

On 07/08/2014 09:24 AM, Skyler F wrote:

    This goes back to what I was dealing with before,

my link to the remote repeater (via input frequency) requires me
to use duplex=0 so I don’t have to deal with it ID’ing over the
repeater etc.

      If I were to use duplex=1, there would be 3 constraints I

would need to solve

#1- NO voice prompt comes in when I enable or disable TX PL on Input ONLY , I can’t have it
saying “T” “X” “P” “L” “E” “N” “A” every time I have a dtmf
or macro enabling and disabling it.

        #2-

After I unkey, it does this [Wait , Courtesy beep , Wait] ,
I don’t know what the first wait is, I know the second one
is hang time. I need to delete both waits.

ct2=|t(660,880,150,2048)
        #3-

I think pretty easy I saw some other threads on it, run
macros when connected to any node, and run a macros when
disconnected.

        If those three constraints

are solved, I can then turn duplex=0 to 1. Else, I have to
stay there.

  I use macros to connect and

disconnect to specific nodes… can even use them in cron settings
to select what times to be/not to be connected ‘somewhere’…