[asterisk-users] Problems with two trunks

Joshua Small JSmall at visinet.com.au
Wed Sep 12 19:44:11 CDT 2007


Hi,

 

I am attempting to setup an asterisk server, current specs:

CentOS release 5 (Final)

Asterisk 1.4.11

Asterisk-gui checked out from SVN last week

 

I started with a fairly basic setup involving one VOIP provider who
provided one dial in number, and a couple of handsets. Config files are
below. It was pretty much totally built by Asterisk-gui, except for the
fact I had to add "insecure=very" into users.conf in order to stop the
dialin from our provider presenting an authentication error. Advice on
any more correct approach would be appreciated, but is not the focus of
this post:

 

Users.conf

;several handsets setup like this...

[6001]

callwaiting = yes

context = numberplan-custom-1

email = jsmall at visinet.com.au

fullname = Joshua Small

hasagent = yes

hasdirectory = yes

hasiax = no

hasmanager = no

hassip = yes

hasvoicemail = no

host = dynamic

mailbox = 6001

secret = XXXXX

threewaycalling = yes

registeriax = no

registersip = yes

canreinvite = no

nat = no

dtmfmode = rfc2833

vmsecret = 1234

 

;some PSTNS

[trunk_2]

callerid = asreceived

context = DID_trunk_2

group = 2

hasexten = no

hasiax = no

hassip = no

trunkname = Ports 1,2,3,4

trunkstyle = analog

zapchan = 1,2,3,4

 

;my IP trunk

[trunk_3]

allow = all

context = DID_trunk_3

dialformat = ${EXTEN:1}

hasexten = no

hasiax = no

hassip = yes

host = gw02.mytel.net.au

port = 5060

registeriax = no

registersip = yes

secret = XXXXXXXX

trunkname = Custom - MyTel2

trunkstyle = customvoip

username = XXXXXXXX

type = friend

nat = yes

 

;extensions.conf

[numberplan-custom-1]

plancomment = DialPlan1

include = default

include = parkedcalls

exten = _0XXXXX!,1,Macro(trunkdial,${trunk_3}/${EXTEN:1})

comment = _0XXXXX!,1,First,standard

;a failover to PSTN, not yet enabled

;exten = _0XXXXX!,2,Macro(trunkdial,${trunk_2}/0${EXTEN:1})

;comment = _0XXXXX!,1,First,standard

 

At this point, everything appears to work fine. We can make calls from
our several handsets using our voip link no problems.

We have two different accounts with our provider, the goal being certain
handsets will connect to this account and therefore be billed
separately. I haven't gotten as far as to add the extra handsets and set
an appropriate dialplan, all I did was add this to users.conf:

 

[trunk_extra]

allow = all

context = DID_trunk_3

dialformat = ${EXTEN:1}

hasexten = no

hasiax = no

hassip = yes

host = gw02.mytel.net.au

port = 5060

registeriax = no

registersip = yes

secret = XXXXXXXX

trunkname = Custom - MyTel Two

trunkstyle = customvoip

username = XXXXXXXXXX

type = friend

nat = yes

 



More information about the asterisk-users mailing list