[asterisk-users] FW: Problems with two trunks

Joshua Small JSmall at visinet.com.au
Wed Sep 12 22:38:01 CDT 2007


Update on this:

 

I found that by changing insecure = very to insecure = invite, adding
the second trunk no longer stopped calls working.

I've read the documentation on this switch and still don't see how it
applies/is meant to get used.

 

Anyway, with this change in place, the following may help:

 

asterisk*CLI> sip show registry

Host                            Username       Refresh State
Reg.Time

gw02.mytel.net.au:5060          11111             120 Request Sent


gw02.mytel.net.au:5060          22222             105 Registered
Thu, 13 Sep 2007 23:33:47

 

I have set a dial plan so that some handsets use the 2222 (not the real
number)  extension (which work) and now I only need to determine why
11111 never seems to register.

 

If I remove all traces of the 2222 connection from my config, 11111
registers fine.

Joshua Small | Senior Network Engineer | VisiNet | P. +61 1300 887 959 |
www.visinet.com.au <http://www.visinet.com.au/>  

This e-mail is intended for use by the named recipients only and
contains confidential information. Opinions and other information in
this message that pertain to the sender's employer and its products and
services represent the opinion of the sender and not necessarily those
of the employer. 

 

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Joshua
Small
Sent: Thursday, 13 September 2007 10:44 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Problems with two trunks

 

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