Setvar From Chan_dahdi.conf

Home » Asterisk Users » Setvar From Chan_dahdi.conf
Asterisk Users 1 Comment

Would someone be able to give an example of a working use of setvar from chan_dahdi.conf? I am trying to create a custom variable like I use in sip.conf but I have been completely unsuccessful getting any variable set using setvar to appear for a DAHDI
channel. I am running 1.8.11-cert8 and am using the newer format (but I have tried using the older [channels] format). Here is an example:

[trunkgroups]

[channels]

[phone_template](!)
usecallerid = yes hidecallerid = no callwaiting = no threewaycalling = yes transfer = yes echocancel = yes echotraining = yes immediate = no context = longdistance signalling = fxo_ks

[test1](phone_template)
callerid = “Test 1” <(111)222-3333>
setvar=myvariable=test dahdichan = 1

I have tried every example I have been able to find but nothing appears in a DumpChan. Thank you.

Chet Stevens

One thought on - Setvar From Chan_dahdi.conf

  • You wouldn’t do it from chan_dahdi. You would set the context in chan_dahdi, then the context would set the variable.

    From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Chet W. Stevens Sent: Saturday, December 01, 2012 9:05 AM
    To: asterisk-users@lists.digium.com Subject: [asterisk-users] setvar from chan_dahdi.conf

    Would someone be able to give an example of a working use of setvar from chan_dahdi.conf? I am trying to create a custom variable like I use in sip.conf but I have been completely unsuccessful getting any variable set using setvar to appear for a DAHDI channel. I am running 1.8.11-cert8 and am using the newer format (but I have tried using the older [channels] format). Here is an example:

    [trunkgroups]

    [channels]

    [phone_template](!)

    usecallerid = yes

    hidecallerid = no

    callwaiting = no

    threewaycalling = yes

    transfer = yes

    echocancel = yes

    echotraining = yes

    immediate = no

    context = longdistance

    signalling = fxo_ks

    [test1](phone_template)

    callerid = “Test 1” < (111)222-3333>

    setvar=myvariable=test

    dahdichan = 1

    I have tried every example I have been able to find but nothing appears in a DumpChan. Thank you.

    Chet Stevens