Asterisk connects with GOIP by single server mode

If you connect asterisk with GOIP, and you want to realise it like this:

when we dial 9+any number, the call will go out through any sim card of GOIP 1;

When we dial 6+any number, the call will go out thrugh any sim card of GOIP 2.

when we call in any sim card of two GOIP, the extension 8001 will ring.

If that, you can refer to the following settings:

Firstly, let us set asterisk.

1. In the file sip.conf, please create one extension 8001, and two trunks: lesheng-trunk1 and lesheng-trunk2.

[8001]
type=friend
context=lesheng
host=dynamic
nat=yes
secret=voptech1984
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw
allow=gsm
qualify=yes
directmedia=no

[lesheng-trunk1]!
context=fxo-lesheng
type=friend
host=dynamic
nat=yes
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw
allow=gsm
qualify=yes
directmedia=no
secret=voptech1984
[lesheng-trunk2](lesheng-trunk1)
Secret=voptech1984

after that, plesae use sip reload to make it take affect.

2. In the file extension.conf, please create the related dial plan.

[lesheng]
exten => _9X.,1,Dial(SIP/lesheng-trunk1/${EXTEN:1})
exten => _6X.,1,dial(SIP/lesheng-trunk2/${EXTEN:1})
[fxo-lesheng]
exten => 200,1,dial(sip/8001)

after that, samely, we need to use dialplan reload to make it take affect.

Secondly, let us set GOIP.

1. let us register GOIP to asterisk, in GOIP 1, please go to Configurations->call settings, and choose single server mode.

1

here 192.168.1.248:2468 is the IP address and sip port of asterisk.

In GOIP 2, let us do the similar setting.

2

2. let us set the routing, in GOIP 1, please go to Configurations->Call Divert.

4

Please keep all the lines in the same settings.

It means when the call reaches the GOIP 1, the call will go out through the sim card available.

when we dial any sim card of GOIP 1, GOIP 1 will send the number 200 to asterisk.

In GOIP 2, please go to configurations->Call Divert, it is same setting in all lines.

 

No comments yet.

Leave a Reply