[asterisk-dev] How to pass a parameter to the DAHDI kernel driver ?

Kevin P. Fleming kpfleming at digium.com
Wed Sep 14 10:48:05 CDT 2011


On 09/14/2011 02:02 AM, Pavel Troller wrote:
> Hi!
>    I'm writing a customization for the DAHDI driver - a possibility to transmit
> periodical charging pulses to the line for incoming calls.
>    I've done most of changes on the driver level (dahdi-base.c and corresponding
> include files) and the pulses are now happily being transmitted in the answered
> state of the channel, but with a hardcoded pace (3 secs for now).
>    I've also done a high-level (dialplan) part - according to the called number
> analysis, a variable is available in the time of the answer signal coming to the
> caller, containing the required charging pulses timing.
>    What I need to do to finish my work, is to pass the contents of the variable
> to the driver during signalling the answer. Any suggestions, how to pass a
> numeric parameter to the driver during the signalling process ?

You will have to implement an ioctl() operation that chan_dahdi can use 
to read/write the value on the channel in DAHDI.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list