Send The Calls From To Servers

Home » Asterisk Users » Send The Calls From To Servers
Asterisk Users 8 Comments

I have this scenario

In the first server 192.168.5.100 I have asterisk installed 1.4.43 and one diguim card with 2 ports: in the first port connection for the provider X :
the second port of diguim card the connection of the provider Y

In the second server (the same configuration) 192.168.5.200 asterisk installed 1.4.43 and one diguim card with 2 ports : the first port is empty the second port the connection of the provider Y

My question how can I do in order to send the calls of the second providers from the port 2 server 1 and port 2 server 2 ()if one of them is down I
continue to send the calls from the other

Thanks and regards

8 thoughts on - Send The Calls From To Servers

  • The basic idea is dial using your main outbound dahdi group, then check the value of HANGUPCAUSE, then if appropriate dial out using your secondary dahdi group. This is a standard thing. Check the mailing list archives and voip-info.org

    See also the [stdexten] section of extensions.conf.sample

    —–Original Message—

  • hello thanks for your response

    i try to switch the provider in the same server without issue but my problem now i have 2 servers in the same network and with the same configuration

    iw want to use the group 2 of the server 1 and group 2 of server 2 for the same calls. and if group 2 of server 1 is down i can continue to use group
    2 of server 2

    thanks and regards

    [trunkgroups]
    trunkgroup => 1,16
    spanmap => 1,1,1

    [channels]
    #include dahdi-channels.conf

    context

  • You must write dialplan code to do what you want. Assuming you are not using a GUI with Asterisk, post your dialplan used for outgoing calls.

    —–Original Message—

  • You should be asking Aheeva these questions.

    Here is an untested sample dialplan which could be adapted. If you need more info you should read the Asterisk Book.

    Exten => _1NXXNXXXXXX,1,Dial(DAHDI/g1/${EXTEN})
    Exten => same,n,GotoIf($[“${DIALSTATUS” != “ANSWER” && ($[“${DIALSTATUS” != “BUSY”]?failover)
    Exten => same,n,Hangup Exten => same,n(failover),Dial(SIP/otherserver/${EXTEN})
    Exten => same,n,Hangup

    “otherserver” would be the peer entry in sip.conf for your other server.

    —–Original Message—