trunk. can dial extentions but not ring groups

syadnom

Joined
Aug 4, 2009
Messages
36
Likes
0
Points
6
#1
I have setup a trunk between 2 elastix machines according to the E W/O Tears guide. They guide has 3 methods, I tried the last 2 because I want caller ID to be delivered.

elastix version 1.5.2, fresh installs.

I setup the trunk and am able to directly dial extentions on the remote machine but when I try to dial a ring group I the all trunks in use recording.

The current setup is to have
Trunkname = interoffice1
host=ipaddy
qualify=yes
type=friend
in PEER and nothing in the USER section.

I put an outgoing route with dial rules

51
51XX
and trunk as interoffice1

the remote site has ring groups of 51 and 5160 and extensions of 5101-5120

The remote site is a mirror of the current site except for extention numbers and ip address.

Am I missing something here?

here is the output of the asterisk console
[root@elastix src]# asterisk -r
Asterisk 1.4.24, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.4.24 currently running on elastix (pid = 4317)
Verbosity is at least 29
-- Executing [51@from-internal:1] Set("SIP/10110-08f2f418", "INTRACOMPANYROUTE=YES") in new stack
-- Executing [51@from-internal:2] Macro("SIP/10110-08f2f418", "user-callerid|SKIPTTL|") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/10110-08f2f418", "AMPUSER=10110") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/10110-08f2f418", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/10110-08f2f418", "1|Set|REALCALLERIDNUM=10110") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/10110-08f2f418", "AMPUSER=10110") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/10110-08f2f418", "AMPUSERCIDNAME=Dan - Home") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/10110-08f2f418", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/10110-08f2f418", "AMPUSERCID=10110") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/10110-08f2f418", "CALLERID(all)="Dan - Home" <10110>") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/10110-08f2f418", "REALCALLERIDNUM=10110") in new stack
-- Executing [s@macro-user-callerid:10] ExecIf("SIP/10110-08f2f418", "0|Set|CHANNEL(language)=") in new stack
-- Executing [s@macro-user-callerid:11] GotoIf("SIP/10110-08f2f418", "1?continue") in new stack
-- Goto (macro-user-callerid,s,20)
-- Executing [s@macro-user-callerid:20] NoOp("SIP/10110-08f2f418", "Using CallerID "Dan - Home" <10110>") in new stack
-- Executing [51@from-internal:3] Set("SIP/10110-08f2f418", "_NODEST=") in new stack
-- Executing [51@from-internal:4] Macro("SIP/10110-08f2f418", "record-enable|10110|OUT|") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/10110-08f2f418", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/10110-08f2f418", "recordingcheck|20090804-114123|1249407683.59") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20090804-114123|1249407683.59: Outbound recording not enabled
-- AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:5] MacroExit("SIP/10110-08f2f418", "") in new stack
-- Executing [51@from-internal:5] Macro("SIP/10110-08f2f418", "dialout-trunk|3|51||") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/10110-08f2f418", "DIAL_TRUNK=3") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/10110-08f2f418", "0?sub-pincheck|s|1") in new stack
== Parsing '/etc/asterisk/manager.conf': Found
== Parsing '/etc/asterisk/manager_additional.conf': Found
== Parsing '/etc/asterisk/manager_custom.conf': Found
== Manager 'admin' logged on from 127.0.0.1
== Manager 'admin' logged off from 127.0.0.1
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/10110-08f2f418", "0?disabletrunk|1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/10110-08f2f418", "DIAL_NUMBER=51") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/10110-08f2f418", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/10110-08f2f418", "OUTBOUND_GROUP=OUT_3") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/10110-08f2f418", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/10110-08f2f418", "1?skipoutcid") in new stack
-- Goto (macro-dialout-trunk,s,12)
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/10110-08f2f418", "1|AGI|fixlocalprefix") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern X.
== fixlocalprefix: Dialpattern X. matched. 51 -> 51
-- AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("SIP/10110-08f2f418", "OUTNUM=51") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/10110-08f2f418", "custom=IAX2/io100") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/10110-08f2f418", "0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)tr") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/10110-08f2f418", "dialout-trunk-predial-hook|") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/10110-08f2f418", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/10110-08f2f418", "0?bypass|1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/10110-08f2f418", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/10110-08f2f418", "IAX2/io100/51|300|tr") in new stack
-- Called io100/51
-- Hungup 'IAX2/io100-2958'
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [s@macro-dialout-trunk:20] Goto("SIP/10110-08f2f418", "s-CHANUNAVAIL|1") in new stack
-- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
-- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf("SIP/10110-08f2f418", "1?noreport") in new stack
-- Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
-- Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp("SIP/10110-08f2f418", "TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 3) - failing through to other trunks") in new stack
-- Executing [51@from-internal:6] Macro("SIP/10110-08f2f418", "outisbusy|") in new stack
-- Executing [s@macro-outisbusy:1] Playback("SIP/10110-08f2f418", "all-circuits-busy-now|noanswer") in new stack
-- <SIP/10110-08f2f418> Playing 'all-circuits-busy-now' (language 'en')
-- Executing [s@macro-outisbusy:2] Playback("SIP/10110-08f2f418", "pls-try-call-later|noanswer") in new stack
-- <SIP/10110-08f2f418> Playing 'pls-try-call-later' (language 'en')
== Spawn extension (macro-outisbusy, s, 2) exited non-zero on 'SIP/10110-08f2f418' in macro 'outisbusy'
== Spawn extension (from-internal, 51, 6) exited non-zero on 'SIP/10110-08f2f418'
-- Executing [h@from-internal:1] Macro("SIP/10110-08f2f418", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] ResetCDR("SIP/10110-08f2f418", "w") in new stack
-- Executing [s@macro-hangupcall:2] NoCDR("SIP/10110-08f2f418", "") in new stack
-- Executing [s@macro-hangupcall:3] GotoIf("SIP/10110-08f2f418", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,6)
-- Executing [s@macro-hangupcall:6] GotoIf("SIP/10110-08f2f418", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] GotoIf("SIP/10110-08f2f418", "1?theend") in new stack
-- Goto (macro-hangupcall,s,11)
-- Executing [s@macro-hangupcall:11] Hangup("SIP/10110-08f2f418", "") in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/10110-08f2f418' in macro 'hangupcall'
== Spawn extension (from-internal, s, 1) exited non-zero on 'SIP/10110-08f2f418'
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
I think you might need to add an inbound route on the remote box for 51 that goes to the RG. for this scenario to work.

For obvious reasons you must be proactive in allowing ingress to endpoints that should not be normally available.
 

jgutierrez

Joined
Feb 28, 2008
Messages
5,737
Likes
0
Points
0
#3
Paste the complete configuration of the IAX2 trunk that you have done on both servers, also on Peer details (on bith servers), add the following flag:
context=from-internal
 

syadnom

Joined
Aug 4, 2009
Messages
36
Likes
0
Points
6
#4
If I have a general default route coming in with the DID and CID fields blank shouldnt that pick this up? Do I need an inbound route for this specifically?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#5
As jgutierrez alluded,

it's a matter of the context that the call is in at the point of entry, either use his solution (put the trunk in from-internal) or add any specific inbound routes that are not available to from-trunk.
 

syadnom

Joined
Aug 4, 2009
Messages
36
Likes
0
Points
6
#6
I will try the "context=from-internal" in the PEER details.

here is the config. I left blank fields out

TRUNK:
Trunk Name: io101
PEER Details:
host=remoteip
Qualify=no
type=friend
*will add this*context=from-internal

OUTBOUND ROUTE:
Route Name: 101
Dial Patterns:
101
101XX

Trunk Sequence:
IAX2/io101

Exact copy on the other did but switch 101 with 100 and different ip addresses

Thanks for the help guys. I only have access to one of the boxes right now, will try the context option later today.
 

syadnom

Joined
Aug 4, 2009
Messages
36
Likes
0
Points
6
#7
ok, will try. thanks for the quick response!
 

syadnom

Joined
Aug 4, 2009
Messages
36
Likes
0
Points
6
#8
thinking about it, wouldnt I need to put the context option in the USER details? I am using method 3 from the EW/OTEARS where I only use PEER details. I a bit new to freepbx and asterix and I dont know the gory inner-workins of IAX trunks yet.
 

jgutierrez

Joined
Feb 28, 2008
Messages
5,737
Likes
0
Points
0
#9
I have an example for an IAX2 trunk setup betwwen two Elastix Servers:

Server A:
Code:
Trunk Name: toB

Peer Details:
host=10.199.199.180
username=serverA
secret=98765
type=peer
insecure=very
qualify=yes
disallow=all
allow=gsm

User Context: serverB
secret=98765
type=user
context=from-internal
insecure=very

Server B:
Code:
Trunk Name: toA

Peer Details:
host=10.199.199.240
username=serverB
secret=98765
type=peer
insecure=very
qualify=yes
disallow=all
allow=gsm

User Context: serverA
secret=98765
type=user
context=from-internal
insecure=very
After the creaion of IAX2 trunk on server A and in server B, the only thing that you should do is to create the appropiate outbound routes, and that is all! You won't need to setup any DID/CID inbund configuration
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,566
Latest member
Fpino
Top