two trixboxes and one voip trunk
Hi all i have 2 differnt locations with trixboxes installed at both and have them setup with IAX2 trunks betweent the two to link them, the main site has the incoming phone lines from a voip provider and the second site has nothing coming in what we would like is to have the second site beable to use the voip lines off the main site to make outgoing calls how can this be done? any help
okay here is how i have it set up i still get all circuits are busy
BOX ONE
BOX ONE has the voip provider via IAX2 trunk telax
linked to BOX TWO via iax trunk
OFFICEIAX trunk is set up in the following
Peer details
context=from-internal
host=7x.xx.xx.xx
qualify=yes
type=peer
user detail
context=from-internal
host=7.xx.xx.xx
type=user
out bound routes
route out to voip
dial plan
NXXNXXXXXX
NXXXXXX
to iax2 to voip provider
office route
52xx
to iax2 to box 2
BOX 2
IAX trunk to box one
peer
context=from-internal
host=7xxxxxxx
qualify=yes
type=peer
user
context=from-internal
host=7xxxxxx
type=user
route (the only one on this box)
dial plan
1NXXNXXXXXX
51xx
NXXNXXXXXX
points to iax to box 1
Instead of "peer" try friend.
OFFICEIAX
PEER DETAILS
allow=ulaw
host=ip_of_Box2
username=OFFICEIAX
secret=your_secret_password_for_OFFICEIAX
type=friend
USER DETAIL
User Context:BOX2
allow=ulaw
context=from-internal
type=friend
secret=your_secret_password_for_BOX2
BOX 2
PEER DETAILS
allow=ulaw
host=ip_of_officeIAX
username=BOX2
secret=your_secret_password_for_BOX2
type=friend
USER DETAIL
User Context: OFFICEIAX
allow=ulaw
context=from-internal
type=friend
secret=your_secret_password_for_OFFICEIAX
OK, here is the details of the call log. This is form the 2nd box without the VoIP provider On the box with the VoIP provider you see no call progress in the asterisk command line. I have tried all the solutions listed above with no results. Any Ideals?
-- Executing Set("SIP/5210-092bebf8", "INTRACOMPANYROUTE=YES") in new stack
-- Executing Macro("SIP/5210-092bebf8", "dialout-trunk|2|1234567890||") in n
ew stack
-- Executing Set("SIP/5210-092bebf8", "DIAL_TRUNK=2") in new stack
-- Executing Set("SIP/5210-092bebf8", "DIAL_NUMBER=1234567890") in new stack
-- Executing Set("SIP/5210-092bebf8", "ROUTE_PASSWD=") in new stack
-- Executing GotoIf("SIP/5210-092bebf8", "1?noauth") in new stack
-- Goto (macro-dialout-trunk,s,6)
-- Executing GotoIf("SIP/5210-092bebf8", "0?disabletrunk|1") in new stack
-- Executing Set("SIP/5210-092bebf8", "_NODEST=") in new stack
-- Executing Set("SIP/5210-092bebf8", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing Set("SIP/5210-092bebf8", "GROUP()=OUT_2") in new stack
-- Executing Macro("SIP/5210-092bebf8", "user-callerid|SKIPTTL") in new stac
k
-- Executing NoOp("SIP/5210-092bebf8", "user-callerid: device 5210") in new
stack
-- Executing Set("SIP/5210-092bebf8", "AMPUSER=5210") in new stack
-- Executing GotoIf("SIP/5210-092bebf8", "0?report") in new stack
-- Executing GotoIf("SIP/5210-092bebf8", "0?start") in new stack
-- Executing Set("SIP/5210-092bebf8", "REALCALLERIDNUM=5210") in new stack
-- Executing NoOp("SIP/5210-092bebf8", "REALCALLERIDNUM is 5210") in new sta
ck
-- Executing Set("SIP/5210-092bebf8", "AMPUSER=5210") in new stack
-- Executing Set("SIP/5210-092bebf8", "AMPUSERCIDNAME=A. User") in new s
tack
-- Executing GotoIf("SIP/5210-092bebf8", "0?report") in new stack
-- Executing Set("SIP/5210-092bebf8", "AMPUSERCID=5210") in new stack
-- Executing Set("SIP/5210-092bebf8", "CALLERID(all)="A. User" <5210>")
in new stack
-- Executing Set("SIP/5210-092bebf8", "REALCALLERIDNUM=5210") in new stack
-- Executing NoOp("SIP/5210-092bebf8", "TTL: ARG1: SKIPTTL") in new stack
-- Executing GotoIf("SIP/5210-092bebf8", "1?continue") in new stack
-- Goto (macro-user-callerid,s,23)
-- Executing NoOp("SIP/5210-092bebf8", "Using CallerID "A. User" <5210>"
) in new stack
-- Executing Macro("SIP/5210-092bebf8", "record-enable|5210|OUT") in new sta
ck
-- Executing GotoIf("SIP/5210-092bebf8", "0?2:4") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing AGI("SIP/5210-092bebf8", "recordingcheck|20080116-132310|120051
1390.62") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20080116-132310|1200511390.62: Outbound recording not enabled
-- AGI Script recordingcheck completed, returning 0
-- Executing NoOp("SIP/5210-092bebf8", "No recording needed") in new stack
-- Executing GotoIf("SIP/5210-092bebf8", "1?skipoutcid") in new stack
-- Goto (macro-dialout-trunk,s,15)
-- Executing GotoIf("SIP/5210-092bebf8", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,17)
-- Executing AGI("SIP/5210-092bebf8", "fixlocalprefix") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern XX.
== fixlocalprefix: Dialpattern XX. matched. 1234567890 -> 1234567890
-- AGI Script fixlocalprefix completed, returning 0
-- Executing Set("SIP/5210-092bebf8", "OUTNUM=1234567890") in new stack
-- Executing Set("SIP/5210-092bebf8", "custom=IAX2/InterOffice") in new stac
k
-- Executing GotoIf("SIP/5210-092bebf8", "1?gocall") in new stack
-- Goto (macro-dialout-trunk,s,22)
-- Executing Macro("SIP/5210-092bebf8", "dialout-trunk-predial-hook") in new
stack
-- Executing GotoIf("SIP/5210-092bebf8", "0?bypass|1") in new stack
-- Executing GotoIf("SIP/5210-092bebf8", "0?customtrunk") in new stack
-- Executing Dial("SIP/5210-092bebf8", "IAX2/InterOffice/1234567890|300|tr")
in new stack
-- Called InterOffice/1234567890
-- Hungup 'IAX2/InterOffice-1'
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Goto("SIP/5210-092bebf8", "s-CHANUNAVAIL|1") in new stack
-- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
-- Executing GotoIf("SIP/5210-092bebf8", "1?noreport") in new stack
-- Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
-- Executing NoOp("SIP/5210-092bebf8", "TRUNK Dial failed due to CHANUNAVAIL
- failing through to other trunks") in new stack
-- Executing Macro("SIP/5210-092bebf8", "outisbusy|") in new stack
-- Executing Playback("SIP/5210-092bebf8", "all-circuits-busy-now|noanswer")
in new stack
-- Playing 'all-circuits-busy-now' (language 'en')
-- Executing Playback("SIP/5210-092bebf8", "pls-try-call-later|noanswer") in
new stack
-- Playing 'pls-try-call-later' (language 'en')
-- Executing Macro("SIP/5210-092bebf8", "hangupcall") in new stack
-- Executing ResetCDR("SIP/5210-092bebf8", "w") in new stack
-- Executing NoCDR("SIP/5210-092bebf8", "") in new stack
-- Executing GotoIf("SIP/5210-092bebf8", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,6)
-- Executing GotoIf("SIP/5210-092bebf8", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing GotoIf("SIP/5210-092bebf8", "1?theend") in new stack
-- Goto (macro-hangupcall,s,11)
-- Executing Hangup("SIP/5210-092bebf8", "") in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/5210-092b
ebf8' in macro 'hangupcall'
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/5210-092b
ebf8' in macro 'outisbusy'
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/5210-092b
ebf8
This is how I have remote dial trunking working on multiple Trixboxes between 2 asterisk boxes in 2 different states. This assumes that you have nat mappings setup correctly on both your router AND nat configuration in sip_nat.conf !!. I think the outbound rule 3 at each site can be optimised to remove the second pattern, I just havent worked it out yet :P.
/Hyp
Your Local Trixbox (07 STD):-
** Outgoing Settings:-
Outgoing Trunk Name:- YourTB-RemoteTB
** Ougoing PEER Details:-
allow=gsm
disallow=all
host=x.x.x.x (RemoteTB (03 STD) asterisk ip address)
qualify=no
type=peer
username=YourTB-RemoteTB
secret=YourTB-RemoteTB
** Incoming Settings:-
Incoming USER Context:- RemoteTB-YourTB
** Incoming USER Details:-
allow=gsm
context=from-internal
disallow=all
type=user
username=RemoteTB-YourTB
secret=RemoteTB-YourTB
Now, lets assume for the example your local STD area code is 07 and the Remote STD area code is 03. I understand that with prefixing, there is probably a slightly simpler way of doing this on Rule3, but this is how I have it working on mine. it assumes your Your local extensions are 74XX and the Remote extensions are 34XX. it also assumes you use a prefix of 9 for a line out and your local main dial trunk is zap/g1 at each end.
on Your Trixbox at the 07 end :-
you should have at least 3 outbound dial rules :-
Rule 1 :- To-RemoteTB-InternalExtensions
pattern :- 34XX
trunk :- YourTB-RemoteTB
Rule 2:- To-RemoteTB-Dialout
pattern:- 9|03.
trunks :- YourTB-RemoteTB (primary), zap/g1 (secondary fallback)
Rule 3:- 9_AllDials
patterns:- 9|. and 07.
** (note the 07. is so that when remote calls from Remote Trixbox land here - they dial correctly as the 9 prefix will have already been stripped from the 9|07. numbers being called)
trunk :- zap/g1
NOW - the remote TrixBox at the 03 STD end:-
** Outgoing Settings:-
Outgoing Trunk Name:- RemoteTB-YourTB
** Ougoing PEER Details:-
allow=gsm
disallow=all
host=y.y.y.y (YourTB (07 STD) asterisk ip address)
qualify=no
type=peer
username=RemoteTB-YourTB
secret=RemoteTB-YourTB
** Incoming Settings:-
Incoming USER Context:- YourTB-RemoteTB
** Incoming USER Details:-
allow=gsm
context=from-internal
disallow=all
type=user
username=YourTB-RemoteTB
secret=YourTB-RemoteTB
Remote Trixbox should have at least 3 outbound dial rules :-
Rule 1 :- To-YourTB-InternalExtensions
pattern :- 74XX
trunk :- RemoteTB-YourTB
Rule 2:- To-YourTB-Dialout
pattern:- 9|07.
trunks :- RemoteTB-YourTB (primary), zap/g1 (secondary fallback)
Rule 3:- 9_AllDials
patterns:- 9|. and 03.
** (note the 03. is so that when remote calls from Your Trixbox land here - they dial correctly as the 9 prefix will have already been stripped from the 9|03. numbers being called)
trunk :- zap/g1
According to your dial plan, you do not have a route to handle 1NXXNXXXXXX on box 1, but your log shows that you are sending 1234567890 to box 1 from box 2. Can you add the route to handle 1NXXNXXXXXX on box 1 and recreate the log or provide a call log for a 10 digit call?
I am having luck with DUNDi. I am still experimenting. For instance I have DUNDi between two boxes via Hamachi VPN. It is a little tricky as Hamachi MAC's (enityid) can change on you.
Otherwise, the resources (PTSN, Conferences, IVR's, etc) can be shared between them.
While it is tough ( and remains so for me ) there is starting to be some documentation. Three equally good write ups on DUNDi: http://www.voip-info.org/users/813/47813/images/1654/DUNDi_So_Eas..., http://cohutta.com/Dundi_How_to.pdf (the one by John) and advanced training at http://www.freepbx.org/open-telephony-training-seminar-0001 whereby Philippe will be presenting it.
Googling Asterisk Dundi produces more every day too.
http://www.trixbox.org/forums/trixbox-forums/help/how-connect-2-t...
I am able to use the trunks on Box "A" from extensions on Box "B"
In Outbound Routes on Box "B" I have setup the following Dial Plan:
1NXXNXXXXXX
1XX
NXXNXXXXXX
NXXXXXX
All is working nicely



Member Since:
2006-11-30