[arm-allstar] scripting - last dtmf digit received in client display

David McGough kb4fxc at inttek.net
Tue Dec 8 04:12:16 EST 2015


Hi Neil,

I don't think this proposed mechanism, with the current code, will help 
very much. Here is an example why--say you setup a cmd like:

987=cmd,/bin/touch /tmp/test987

When you enter the DTMF sequence *987 the apt_rpt function subsystem
matches the above command and executes it immediately--in this sample,
just making a file named test987 in the /tmp directory. In this case, you 
already know the last DTMF digit since it was part of the function 
definition.

To be useful, you we would need capability to dynamically extend the 
DTMF sequence. For example, here is a theoretical NOT CURRENTLY 
FUNCTIONAL syntax:

987xxx=fancycmd,/usr/local/bin/myscript.sh

So, in theory, if the user then entered the DTMF sequence *987123, the 
function subsystem might exec the program like:

/usr/local/bin/myscript.sh 123

Note that 123 is provided as a command-line parameter...This would be 
really useful!

I'm thinking this type of capability is what you'd really like?  
...Unfortunately, unless I've overlooked something obvious in the
app_rpt.c code, I think this capability would take a considerable amount
of hacking to accomplish.


73, David KB4FXC



On Mon, 7 Dec 2015, Neil k8it wrote:

> I am not a C programmer or I would offer to help.
> It seems to me that since the last received DTMF digit is written to the 
> client display, that maybe adding one line of C code to write the digit to a 
> temporary variable which a user script could poll, could be a quick and easy 
> solution
> of course it would be over written as soon as the next DTMF digit arrived.
> 
> Thanks
> 73 Neil Sablatzky  K8IT
> Allstar Node 41838 KITLINK
> Allstar Node 42087 KITLINK HUB
> IRLP Node exp0068
> Echolink K8IT-L
> WIRES-X K8IT 11479 Room 21479
> 
> --------------------------------------------------
> From: "David McGough" <kb4fxc at inttek.net>
> Sent: Monday, December 07, 2015 5:07 PM
> To: "ARM Allstar" <arm-allstar at hamvoip.org>
> Subject: Re: [arm-allstar] scripting - last dtmf digit received in client 
> display
> 
> >
> > Hi Neil,
> >
> > Yes, I agree that simpler access to DTMF sequences, etc., would be very
> > nice. These are hacks which would get added to the app_rpt.c code and my
> > notion is that expanding the current command ("cmd") scripting capability
> > would be useful...On a side note, this capability should already be
> > available directly via AGI scripting from Asterisk. However, I haven't
> > investigated if AGI scripts would suffice for some more complex
> > applications--perhaps like remote base control. (Anybody got any ideas
> > here?)
> >
> > I'm not going to make any promises for the upcoming release, since I'm
> > feverishly trying to get some MAJOR changes completed.  However, if other
> > programmers out there want to have a look at this request, I'm all for it!
> > Your efforts won't fall on deaf ears!
> >
> > 73, David KB4FXC
> >
> >
> >
> >
> > On Mon, 7 Dec 2015, Neil k8it wrote:
> >
> >> I just had a thought for a neat script.
> >> What temporary variable or other method can I use in a script to return 
> >> the
> >> last entered DTMF digit as displayed in the client ? If it does not 
> >> exsist,
> >> can it be included in the upcoming code release?
> >>
> >>
> >> Thanks
> >> 73 Neil Sablatzky  K8IT
> >> Allstar Node 41838 KITLINK
> >> Allstar Node 42087 KITLINK HUB
> >> IRLP Node exp0068
> >> Echolink K8IT-L
> >> WIRES-X K8IT 11479 Room 21479
> >>
> >> --------------------------------------------------
> >> From: "David McGough" <kb4fxc at inttek.net>
> >> Sent: Friday, December 04, 2015 1:34 PM
> >> To: "ARM Allstar" <arm-allstar at hamvoip.org>
> >> Subject: Re: [arm-allstar] Fob not recognized
> >>
> >> >
> >> > Hi Lito,
> >> >
> >> > Outstanding!!!  Thanks for contributing! I'll review and integrate your
> >> > patches.
> >> >
> >> > For everyone else who is interested, I'll copy a couple beta-test 
> >> > binaries
> >> > up to the hamvoip download site this weekend and provide install
> >> > instruction.
> >> >
> >> >
> >> > 73, David KB4FXC
> >> >
> >> >
> >> >
> >> > On Fri, 4 Dec 2015, Roselito de los Reyes wrote:
> >> >
> >> >> Here is the patched file.
> >> >>
> >> >> > Date: Thu, 3 Dec 2015 10:26:23 -0500
> >> >> > From: kb4fxc at inttek.net
> >> >> > To: arm-allstar at hamvoip.org
> >> >> > Subject: Re: [arm-allstar] Fob not recognized
> >> >> >
> >> >> >
> >> >> > I'll patch chan_simpleusb and chan_usbradio, initially. Once tested,
> >> >> > I'll
> >> >> > add it to our new drivers, too.
> >> >> >
> >> >> >
> >> >> > On Thu, 3 Dec 2015, Roselito de los Reyes wrote:
> >> >> >
> >> >> > > Hi David,
> >> >> > >
> >> >> > > I would love to!
> >> >> > > Are the changes going to be in the chan_simpleusb.c only?
> >> >> > >
> >> >> > > Best regards,
> >> >> > >
> >> >> > > Roselito De Los Reyes
> >> >> > >
> >> >> > >
> >> >> > > > On Dec 3, 2015, at 6:14 AM, David McGough <kb4fxc at inttek.net>
> >> >> > > > wrote:
> >> >> > > >
> >> >> > > >
> >> >> > > > Hi Lito,
> >> >> > > >
> >> >> > > >
> >> >> > > > That Product ID (0x0014) isn't currently recognized by the 
> >> >> > > > channel
> >> >> > > > drivers as a CM108/CM119 compatible sound chip.  Currently, the
> >> >> > > > only
> >> >> > > > recognized Product IDs are: 0x000c, 0x013c, 0x0008, 0x013a and
> >> >> > > > 0x6a00.
> >> >> > > >
> >> >> > > > I'll try to confirm which variant of the CM108/CM119 that ID
> >> >> > > > corresponds
> >> >> > > > to and add it to the upcoming firmware release, which we're 
> >> >> > > > looking
> >> >> > > > forward to this month!
> >> >> > > >
> >> >> > > > Are you willing to do some beta testing before the new release?
> >> >> > > >
> >> >> > > >
> >> >> > > > 73, David KB4FXC
> >> >> > > >
> >> >> > > >
> >> >> > > >
> >> >> > > >
> >> >> > > >> On Wed, 2 Dec 2015, Roselito de los Reyes wrote:
> >> >> > > >>
> >> >> > > >> Hi Doug,
> >> >> > > >>
> >> >> > > >> I built a new fob using the same manufacturer Sabrent. This new
> >> >> > > >> batch that I got has a different id showing as
> >> >> > > >>
> >> >> > > >> 0003:0D8C:0014.0005 instead of
> >> >> > > >> 0003:0D8C:000C.0004 in the models I purchased a couple months 
> >> >> > > >> ago
> >> >> > > >> and is not picked up on simpleusb.
> >> >> > > >>
> >> >> > > >> Here is the result from dmesg
> >> >> > > >>
> >> >> > > >> [  670.561777] usb 1-1.5: new full-speed USB device number 4 
> >> >> > > >> using
> >> >> > > >> dwc_otg
> >> >> > > >> [  670.690063] usb 1-1.5: New USB device found, idVendor=0d8c,
> >> >> > > >> idProduct=0014
> >> >> > > >> [  670.697166] usb 1-1.5: New USB device strings: Mfr=1,
> >> >> > > >> Product=2, SerialNumber=0
> >> >> > > >> [  670.704667] usb 1-1.5: Product: USB Audio Device
> >> >> > > >> [  670.709401] usb 1-1.5: Manufacturer: C-Media Electronics 
> >> >> > > >> Inc.
> >> >> > > >> [  670.723289] input: C-Media Electronics Inc. USB Audio Device 
> >> >> > > >> as
> >> >> > > >> /devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.3/0003:0D8C:0014.0001/input/input0
> >> >> > > >> [  670.737628] hid-generic 0003:0D8C:0014.0001: input,hidraw0: 
> >> >> > > >> USB
> >> >> > > >> HID v1.00 Device [C-Media Electronics Inc. USB Audio Device] on
> >> >> > > >> usb-bcm2708_usb-1.5/input3
> >> >> > > >> [  670.835956] usbcore: registered new interface driver
> >> >> > > >> snd-usb-audio
> >> >> > > >> [  703.615739] usb 1-1.5: USB disconnect, device number 4
> >> >> > > >> [  711.532519] usb 1-1.5: new full-speed USB device number 5 
> >> >> > > >> using
> >> >> > > >> dwc_otg
> >> >> > > >> [  711.660783] usb 1-1.5: New USB device found, idVendor=0d8c,
> >> >> > > >> idProduct=0014
> >> >> > > >> [  711.667872] usb 1-1.5: New USB device strings: Mfr=1,
> >> >> > > >> Product=2, SerialNumber=0
> >> >> > > >> [  711.675404] usb 1-1.5: Product: USB Audio Device
> >> >> > > >> [  711.680143] usb 1-1.5: Manufacturer: C-Media Electronics 
> >> >> > > >> Inc.
> >> >> > > >> [  711.718468] input: C-Media Electronics Inc. USB Audio Device 
> >> >> > > >> as
> >> >> > > >> /devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.3/0003:0D8C:0014.0002/input/input1
> >> >> > > >> [  711.733088] hid-generic 0003:0D8C:0014.0002: input,hidraw0: 
> >> >> > > >> USB
> >> >> > > >> HID v1.00 Device [C-Media Electronics Inc. USB Audio Device] on
> >> >> > > >> usb-bcm2708_usb-1.5/input3
> >> >> > > >> [  713.345041] usb 1-1.5: USB disconnect, device number 5
> >> >> > > >> [  715.632593] usb 1-1.2: new full-speed USB device number 6 
> >> >> > > >> using
> >> >> > > >> dwc_otg
> >> >> > > >> [  715.760943] usb 1-1.2: New USB device found, idVendor=0d8c,
> >> >> > > >> idProduct=0014
> >> >> > > >> [  715.768049] usb 1-1.2: New USB device strings: Mfr=1,
> >> >> > > >> Product=2, SerialNumber=0
> >> >> > > >> [  715.775555] usb 1-1.2: Product: USB Audio Device
> >> >> > > >> [  715.780293] usb 1-1.2: Manufacturer: C-Media Electronics 
> >> >> > > >> Inc.
> >> >> > > >> [  715.818392] input: C-Media Electronics Inc. USB Audio Device 
> >> >> > > >> as
> >> >> > > >> /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.3/0003:0D8C:0014.0003/input/input2
> >> >> > > >> [  715.833072] hid-generic 0003:0D8C:0014.0003: input,hidraw0: 
> >> >> > > >> USB
> >> >> > > >> HID v1.00 Device [C-Media Electronics Inc. USB Audio Device] on
> >> >> > > >> usb-bcm2708_usb-1.2/input3
> >> >> > > >>
> >> >> > > >> and this is the one that simpleusb picks up.
> >> >> > > >> [  716.929536] usb 1-1.2: USB disconnect, device number 6
> >> >> > > >> [  723.312723] usb 1-1.5: new full-speed USB device number 7 
> >> >> > > >> using
> >> >> > > >> dwc_otg
> >> >> > > >> [  723.434976] usb 1-1.5: New USB device found, idVendor=0d8c,
> >> >> > > >> idProduct=000c
> >> >> > > >> [  723.442026] usb 1-1.5: New USB device strings: Mfr=0,
> >> >> > > >> Product=1, SerialNumber=0
> >> >> > > >> [  723.449569] usb 1-1.5: Product: C-Media USB Headphone Set
> >> >> > > >> [  723.489585] input: C-Media USB Headphone Set   as
> >> >> > > >> /devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.3/0003:0D8C:000C.0004/input/input3
> >> >> > > >> [  723.503045] hid-generic 0003:0D8C:000C.0004: input,hidraw0: 
> >> >> > > >> USB
> >> >> > > >> HID v1.00 Device [C-Media USB Headphone Set  ] on
> >> >> > > >> usb-bcm2708_usb-1.5/input3
> >> >> > > >>
> >> >> > > >>
> >> >> > > >> Thanks
> >> >> > > >>
> >> >> > > >> Lito
> >> >> > > >
> >> >> > > > _______________________________________________
> >> >> > > >
> >> >> > > > arm-allstar mailing list
> >> >> > > > arm-allstar at hamvoip.org
> >> >> > > > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >> >> > > >
> >> >> > > > Visit the BBB and RPi2 web page - http://hamvoip.org
> >> >> > > _______________________________________________
> >> >> > >
> >> >> > > arm-allstar mailing list
> >> >> > > arm-allstar at hamvoip.org
> >> >> > > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >> >> > >
> >> >> > > Visit the BBB and RPi2 web page - http://hamvoip.org
> >> >> > >
> >> >> >
> >> >> > _______________________________________________
> >> >> >
> >> >> > arm-allstar mailing list
> >> >> > arm-allstar at hamvoip.org
> >> >> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >> >> >
> >> >> > Visit the BBB and RPi2 web page - http://hamvoip.org
> >> >>
> >> >
> >> > _______________________________________________
> >> >
> >> > arm-allstar mailing list
> >> > arm-allstar at hamvoip.org
> >> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >> >
> >> > Visit the BBB and RPi2 web page - http://hamvoip.org
> >> >
> >> _______________________________________________
> >>
> >> arm-allstar mailing list
> >> arm-allstar at hamvoip.org
> >> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>
> >> Visit the BBB and RPi2 web page - http://hamvoip.org
> >>
> >
> > _______________________________________________
> >
> > arm-allstar mailing list
> > arm-allstar at hamvoip.org
> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >
> > Visit the BBB and RPi2 web page - http://hamvoip.org
> > 
> _______________________________________________
> 
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> 
> Visit the BBB and RPi2 web page - http://hamvoip.org
> 



More information about the arm-allstar mailing list