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
You can ignore this. I mistyped the password, and once it was fixed, and registered correctly, both links failed to work again. I have some extended information from sip debug. Again, this shows up as soon as I try to register two connections. <--- SIP read from 203.166.103.242:5060 ---> SIP/2.0 403 Forbidden Via: SIP/2.0/UDP 192.168.107.4:5060;branch=z9hG4bK454ad99d;received=59.167.248.154;rport53487 From: "Joshua Small" <sip:8001 at 192.168.107.4>;tag=as3d465ba3 To: <sip:phonnumber at gw02.mytel.net.au>;tag=as5937f41d Call-ID: 2f9f21865185cb9103ef86f438a79835 at 192.168.107.4 CSeq: 103 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Content-Length: 0 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: Joshua Small Sent: Thursday, 13 September 2007 1:38 PM To: 'asterisk-users at lists.digium.com' Subject: FW: [asterisk-users] Problems with two trunks 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
One more spam from yours truely.. Got it sorted out. My configuration never had a: Fromuser = 1111111 In it. Worked fine for any individual trunk. But after sticking that command in for each individual connection, I was able to register two of them (and use them both). Thanks for the suggestions, it looks like this was all I needed. 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: Joshua Small Sent: Thursday, 13 September 2007 3:07 PM To: 'asterisk-users at lists.digium.com' Subject: FW: [asterisk-users] Problems with two trunks You can ignore this. I mistyped the password, and once it was fixed, and registered correctly, both links failed to work again. I have some extended information from sip debug. Again, this shows up as soon as I try to register two connections. <--- SIP read from 203.166.103.242:5060 ---> SIP/2.0 403 Forbidden Via: SIP/2.0/UDP 192.168.107.4:5060;branch=z9hG4bK454ad99d;received=59.167.248.154;rport53487 From: "Joshua Small" <sip:8001 at 192.168.107.4>;tag=as3d465ba3 To: <sip:phonnumber at gw02.mytel.net.au>;tag=as5937f41d Call-ID: 2f9f21865185cb9103ef86f438a79835 at 192.168.107.4 CSeq: 103 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Content-Length: 0 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: Joshua Small Sent: Thursday, 13 September 2007 1:38 PM To: 'asterisk-users at lists.digium.com' Subject: FW: [asterisk-users] Problems with two trunks 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