Beginning Asterisk

Home » Asterisk Users » Beginning Asterisk
Asterisk Users 2 Comments

f you had the card already installed when you built DAHDI, then it should already have generated you a plausible configuration file.

I have a TDM410P with two FXO and two FXS interfaces. I’ve attached my /etc/asterisk/chan_dahdi.conf and /etc/dahdi/system.conf to give you a starting point. You will have to remove or comment lines that don’t apply to your installation, and maybe change the country and the method of getting caller ID.

You dial out using something like this in your dialplan:

exten => _XXXXX.,1,Dial(DAHDI/g1/${EXTEN})
exten => _XXXXX.,2,Hangup()

This will send any number of 5 digits or more via the PSTN. Incoming calls will arrive in the context you specified in chan_dahdi.conf, at the “s” extension (here, from-pstn).

2 thoughts on - Beginning Asterisk

  • I advise you taking Gentoo Linux. There is a great asterisk repisetory.
    Also support patvhes for NON digium hardware.

    Resources:
    http://oreilly.com/openbook/

    there you find on the right the free book Asterisk: The Future of telephony

    the 3rd edition is available, but that book covers every thing to run
    the asterisk PBX.

    Tamer

    Am 03.09.2011 14:00, schrieb Daniel Tryba:

  • 2011/9/6 Esteban Cacavelos

    finally i decided to install from source because the documentation suggest
    that.

    I’ve installed successfully asterisk+dahdi+libpri. I tested a basic SIP
    configuration and there were no problems.

    Now i have problems with pstn termination and origination. I have one fxo
    module from witch i want to make and receive calls. Can I do that ?. I’ll
    post my configuration files.

    I want to make calls from my android phone (where i have a SIP client) and
    recieve calls from my analog line through my androi.

    My country code is 595, city code 21, number , xxx xxx

    chan_dahdi.conf

    [channels]

    ;
    ; To apply other options to these channels, put them before “channel”.
    ;
    signalling=fxs_ks ; in Asterisk, FXO channels use FXS signaling
    ; (and yes, FXS channels use FXO signaling)
    context=from-pstn
    channel => 1 ; apply all the previously defined settings to this
    channel

    extensions.conf
    [LocalSets]

    exten => 100,1,Dial(SIP/android-esteban) ; Replace 0000FFFF0001 with your
    device name

    exten => 101,1,Dial(SIP/recepcion) ; Replace 0000FFFF0002 with your device
    name

    exten => 200,1,Answer()
    same => n,Playback(hello-world)
    same => n,Hangup()

    ; TERMINATION
    [from-voip-network]
    exten => _X.,1,Verbose(2, Call from VoIP network to ${EXTEN})
    same => n,Dial(DAHDI/g0/${EXTEN})

    ORIGINATION
    [from-pstn]
    ; This is the context that would be listed in the config file
    ; for the circuit (i.e. chan_dahdi.conf)

    exten => _X.,1,Dial(SIP/android-esteban)

    [number-mapping]
    ; This context is not strictly required, but will make it easier
    ; to keep track of your DIDs in a single location in your dialplan.
    ; From here you can pass the call to another part of the dialplan
    ; where the actual dialplan work will take place.

    exten => 59521xxxxxx,1,Dial(SIP/android-esteban)

    exten => i,1,Verbose(2,Incoming call to invalid number)

    Dahdi system.conf

    # Autogenerated by /usr/sbin/dahdi_genconf on Tue Sep 6 14:40:03 2011
    # If you edit this file and execute /usr/sbin/dahdi_genconf again,
    # your manual changes will be LOST.
    # Dahdi Configuration File
    #
    # This file is parsed by the Dahdi Configurator, dahdi_cfg
    #
    # Span 1: WCTDM/4 “Wildcard TDM400P REV I Board 5” (MASTER)
    fxsks=1
    echocanceller=mg2,1
    # channel 2, WCTDM/4/1, no module.
    # channel 3, WCTDM/4/2, no module.
    # channel 4, WCTDM/4/3, no module.

    # Global data

    loadzone = us
    defaultzone = us

    Thanks in advance !