[arm-allstar] scripting - last dtmf digit received in client display
David McGough
kb4fxc at inttek.net
Tue Dec 8 15:57:07 EST 2015
Hi Doug,
I agree that moving various operations out of the app_rpt code entirely
and to the dialplan (perhaps including AGI scripts) is the ideal approach,
since Asterisk already has sophisticated DTMF matching and scripting
capability, etc...While I'll not privy to the history of why it was
originally coded this way, I'll speculate that probably it was partly due
to functionality limitations found in early versions of Asterisk, years
ago.
A question I've got with the method of using the autopatch functions to
reach the dialplan is whether there are any hidden side effects--I haven't
looked thru app_rpt.c carefully in that regard--YET. While I'm not
wanting to add even more code to app_rpt.c, this is one area where we
might need to add some code to improve integration with dialplan
functionality?? (thoughts?)
As you know, I'm a proponent of lean, focused, highly modularized code.
Going along with that premise, IMO, the remote-base support code should be
completely stripped from the app_rpt.so module and migrated to another
format--probably not even being a 'C' program, but, rather a higher-level
scripting language. And, for the actual radio-control operations, use
hamlib, which is what I'm already doing on my custom version.
Anyhow, lots to ponder! I'm not going to get bogged down on this just now.
73, David KB4FXC
On Tue, 8 Dec 2015, Doug Crompton wrote:
> Neil,
>
> OK here is a way to do this at least here are the clues to do it. I have not done it completely for you but what I show here does work.
>
> First in rpt.conf find the phone patch function - 61
>
> change the context= to context=command_radio
>
> then in extensions.conf add the following context at the end -
>
> [command_radio]
> exten => _1xxxxx,1,Playback(please-enter-the)
> exten => _1xxxxx,n,Playback(frequency)
> exten => _1xxxxx,n,SayDigits(${EXTEN})
> exten => _1xxxxx,n,Wait(2)
> exten => _1xxxxx,n,Hangup()
>
> You need to understand asterisk dial plans in order to understand this
but basically the way this is setup if you enter at the radio *611xxxxx
the last 5 digits will be passed as the EXTEN variable in Asterisk. At
that point you could do whatever you wanted with it - like pass to a
script that sent it to hamlib for execution. Of course the number of
digits could be changed and other functions could be added.
>
> When changing either file you need to either reload then in the client or restart Allstar.
>
> The Asterisk diaplan is very powerful but you need to hone up on the commands and syntax!!!
>
> This is the (more) right way to do this rather than adding stuff to Allstar.
>
> 73 Doug
> WA3DSP
> http://www.crompton.com/hamradio
>
>
>
More information about the arm-allstar
mailing list