Macro / Function Help

Hi All,

Below is a snip of part of my rpt.conf.

I was using macro 1 on the hour to give a voice announcement of my call followed by the time. All was working fine. Macro 1 is as you can see is 920 followed by 81

But I wanted to add the WX conditions. So I edited the 81 function (currently commented out)… the 81 with the WX in it works fine when I send *81 to the node.

but *51 only sends the 920 and doesn’t play 81 at all. I’m confused.

So how do I get 920 and the commented out 81 to play together as macro 1 (*51)?


[schedule53393]
;dtmf_function = m h dom mon dow ; ala cron, star is implied
1=00 * * * * ;run macro 1 on the hour

[functions53393]
81=status,12 ; Time of Day (local)
;81=cmd,/usr/local/sbin/saytime.pl EGOS 53393 ; Time of Day and Weather

; Play a Node announcement
920=localplay,/etc/asterisk/local/53393 ; G4UJS Voice ID

[macro53393]
;Macro number = command string (ea command separated by space) -end with HASH
1=*920 *81# ; Voice ID & Time Announcement

Thanks Rob

Try removing the space between *920 and *81#.

1 Like

What I’ve done is to point the macro to a shell script that will play both of the sound files one after the other. The schedule stanza stays the same. Function stanza should look something like this.
83=cmd,/etc/asterisk/local/long_announce.sh

The shell script would look something like this.
#!/bin/bash

node-id1 will say “K3SRM Simplex Repeater 145.650 using PL of 131.8”

ASTERISKSND=/var/lib/asterisk/sounds

asterisk -rx “rpt localplay 45061 /etc/asterisk/local/node-id1”
(source /usr/local/etc/allstar.env ; /usr/bin/nice -19 /usr/bin/perl /usr/local/sbin/say24time.pl 19734 45061 > /dev/null)

The macro stanza would then look like this.
1=*83# ;voice ID, weather, and play time

Try setting up like that if wd6awp idea doesn’t work for you.

1 Like

I believe they are to be separated by a comma

1=*920,*81#

This works for me…

Open asterisk in a separate command window to trouble shoot.

asterisk -rvvv

[functions519401]
80=localplay,/etc/asterisk/local/node-id
81=cmd,/usr/local/sbin/saytime.pl 519401

[macro519401]
;Macro number = command string (each command separated by space) -end with HASH
1=*81 *80# ; play time and voice ID

1 Like