interconnect two trixbox problem

Mohammad Karaminejad
Posts: 10
Member Since:
2009-03-21

hello to all
I have setuped 2 trixbox and connected them via a sip trunk.

server A have some extention start with 2xx.
server B have some extention start with 1xx.

i defined a sip trunk on each serever and now they are connected and can call each extensions from another and caller ID also tranferd.
the server A is also connected to my PSTN lines.
I want the extensions on server B can call out by these Pstns like extenstion of server A.
for this i add a rule in dial pattern for access to serverA . but when a clients on server B calls local number to sent out from pstn lines that connect to server A , server A only play An IVR and see it as incomming call.

extens====>serverBserver APSTN

i also use of the following links :
http://blogs.elastix.org/en/2009/11/interoffice-trunking-with-ela...
http://blogs.elastix.org/en/2009/11/interoffice-trunking-with-ela...

would you please someone help me how can i solve this problem and the extension of server B can sens out thier calls form server A , Pstn lines.



obeliks
Posts: 877
Member Since:
2010-03-14
your outbound route on

your outbound route on serverB should be - send everything to serverA - Dial Pattern: XX.



Mohammad Karaminejad
Posts: 10
Member Since:
2009-03-21
Dear obeliks; Thanks alots

Dear obeliks;
Thanks alots for your replay.
unfortunatly i did this but faild.
following is my config on server B:
-----------------------------------------
Trunk name:=Trunk 101-peer
Dial ruls: (blank)
Peer Details:
username=106-user
type=peer
trunk=yes
secret=1234
qualify=yes
host=192.168.115.1
context=from-internal

User context: 101-user
USER DETAILS:
type=user
secret=1234
host=192.168.115.1
context=from-internal
---------------------------------------
Outbound route on server B:
Dial Pattern:
7|xx.
Trunk sequence:
sip/101-peer
----------------------------------------
Now I dial from server B by one of extention(204) : 700986412248001 (this is international number)
---------------------------------------------------------------------------------------------------------------------
Log on server B:

-- Executing [700986412243875@from-internal:1] Set("SIP/204-09900f08", "INTRACOMPANYROUTE=YES") in new stack
-- Executing [700986412243875@from-internal:2] Macro("SIP/204-09900f08", "user-callerid|SKIPTTL|") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/204-09900f08", "AMPUSER=204") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/204-09900f08", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/204-09900f08", "1|Set|REALCALLERIDNUM=204") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/204-09900f08", "AMPUSER=204") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/204-09900f08", "AMPUSERCIDNAME=204") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/204-09900f08", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/204-09900f08", "AMPUSERCID=204") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/204-09900f08", "CALLERID(all)="204" ") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/204-09900f08", "0|Set|CHANNEL(language)=") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/204-09900f08", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/204-09900f08", "Using CallerID "204" ") in new stack
-- Executing [700986412243875@from-internal:3] Set("SIP/204-09900f08", "_NODEST=") in new stack
-- Executing [700986412243875@from-internal:4] Macro("SIP/204-09900f08", "record-enable|204|OUT|") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/204-09900f08", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/204-09900f08", "recordingcheck|20100901-111144|1283323304.29") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20100901-111144|1283323304.29: Outbound recording not enabled
-- AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:5] MacroExit("SIP/204-09900f08", "") in new stack
-- Executing [700986412243875@from-internal:5] Macro("SIP/204-09900f08", "dialout-trunk|4|00986412243875||") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/204-09900f08", "DIAL_TRUNK=4") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/204-09900f08", "0?sub-pincheck|s|1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/204-09900f08", "0?disabletrunk|1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/204-09900f08", "DIAL_NUMBER=00986412243875") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/204-09900f08", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/204-09900f08", "OUTBOUND_GROUP=OUT_4") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/204-09900f08", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/204-09900f08", "1?skipoutcid") in new stack
-- Goto (macro-dialout-trunk,s,12)
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/204-09900f08", "1|AGI|fixlocalprefix") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
-- AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("SIP/204-09900f08", "OUTNUM=00986412243875") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/204-09900f08", "custom=SIP/101-peer") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/204-09900f08", "0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)tr") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/204-09900f08", "dialout-trunk-predial-hook|") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] GotoIf("SIP/204-09900f08", "0?custom-freepbx-a2billing|00986412243875|1:2") in new stack
-- Goto (macro-dialout-trunk-predial-hook,s,2)
-- Executing [s@macro-dialout-trunk-predial-hook:2] MacroExit("SIP/204-09900f08", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/204-09900f08", "0?bypass|1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/204-09900f08", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/204-09900f08", "SIP/101-peer/00986412243875|300|tr") in new stack
-- Called 101-peer/00986412243875
-- SIP/101-peer-0992d590 answered SIP/204-09900f08
-- Executing [h@macro-dialout-trunk:1] Macro("SIP/204-09900f08", "hangupcall|") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/204-09900f08", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,4)
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/204-09900f08", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/204-09900f08", "1?theend") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] Hangup("SIP/204-09900f08", "") in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/204-09900f08' in macro 'hangupcall'
== Spawn h extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/204-09900f08'
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'SIP/204-09900f08' in macro 'dialout-trunk'
== Spawn extension (from-internal, 700986412243875, 5) exited non-zero on 'SIP/204-09900f08'
--------------------------------------------------------------------------------------------------------------------------------------
Log on server A:

-- Executing [00986412243875@from-sip-external:1] NoOp("SIP/10.2.2.2-097944d0", "Received incoming SIP connection from unknown peer to 00986412243875") in new stack
-- Executing [00986412243875@from-sip-external:2] Set("SIP/10.2.2.2-097944d0", "DID=00986412243875") in new stack
-- Executing [00986412243875@from-sip-external:3] Goto("SIP/10.2.2.2-097944d0", "s|1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [s@from-sip-external:1] GotoIf("SIP/10.2.2.2-097944d0", "1?from-trunk|00986412243875|1") in new stack
-- Goto (from-trunk,00986412243875,1)
-- Executing [00986412243875@from-trunk:1] NoOp("SIP/10.2.2.2-097944d0", "Catch-All DID Match - Found 00986412243875 - You probably want a DID for this.") in new stack
-- Executing [00986412243875@from-trunk:2] Goto("SIP/10.2.2.2-097944d0", "ext-did|s|1") in new stack
-- Goto (ext-did,s,1)
-- Executing [s@ext-did:1] Set("SIP/10.2.2.2-097944d0", "__FROM_DID=s") in new stack
-- Executing [s@ext-did:2] Gosub("SIP/10.2.2.2-097944d0", "app-blacklist-check|s|1") in new stack
-- Executing [s@app-blacklist-check:1] LookupBlacklist("SIP/10.2.2.2-097944d0", "") in new stack
-- Executing [s@app-blacklist-check:2] GotoIf("SIP/10.2.2.2-097944d0", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:3] Return("SIP/10.2.2.2-097944d0", "") in new stack
-- Executing [s@ext-did:3] ExecIf("SIP/10.2.2.2-097944d0", "0 |Set|CALLERID(name)=204") in new stack
-- Executing [s@ext-did:4] Set("SIP/10.2.2.2-097944d0", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [s@ext-did:5] SetCallerPres("SIP/10.2.2.2-097944d0", "allowed_not_screened") in new stack
-- Executing [s@ext-did:6] Goto("SIP/10.2.2.2-097944d0", "ivr-3|s|1") in new stack
-- Goto (ivr-3,s,1)
-- Executing [s@ivr-3:1] Set("SIP/10.2.2.2-097944d0", "MSG=custom/main") in new stack
-- Executing [s@ivr-3:2] Set("SIP/10.2.2.2-097944d0", "LOOPCOUNT=0") in new stack
-- Executing [s@ivr-3:3] Set("SIP/10.2.2.2-097944d0", "__DIR-CONTEXT=default") in new stack
-- Executing [s@ivr-3:4] Set("SIP/10.2.2.2-097944d0", "_IVR_CONTEXT_ivr-3=") in new stack
-- Executing [s@ivr-3:5] Set("SIP/10.2.2.2-097944d0", "_IVR_CONTEXT=ivr-3") in new stack
-- Executing [s@ivr-3:6] GotoIf("SIP/10.2.2.2-097944d0", "0?begin") in new stack
-- Executing [s@ivr-3:7] Answer("SIP/10.2.2.2-097944d0", "") in new stack
-- Executing [s@ivr-3:8] Wait("SIP/10.2.2.2-097944d0", "1") in new stack
-- Executing [s@ivr-3:9] Set("SIP/10.2.2.2-097944d0", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3
-- Executing [s@ivr-3:10] Set("SIP/10.2.2.2-097944d0", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10
-- Executing [s@ivr-3:11] Set("SIP/10.2.2.2-097944d0", "__IVR_RETVM=") in new stack
-- Executing [s@ivr-3:12] ExecIf("SIP/10.2.2.2-097944d0", "1|Background|custom/main") in new stack
-- Playing 'custom/main' (language 'en')
-- Executing [h@ivr-3:1] Hangup("SIP/10.2.2.2-097944d0", "") in new stack
== Spawn extension (ivr-3, h, 1) exited non-zero on 'SIP/10.2.2.2-097944d0'
------------------------------------------------------------------------------------------------
I have to tell:

both server are connected by vpn tunnel :
the tunel ip side B: 10.2.2.2
the tunel ip side A:10.0.0.1

server A ip range: 192.168.115.0/24
server B ip range:172.17.18.0/24
---------------------------------------------------------------------------------------------

would you please help me for solve this problem.



obeliks
Posts: 877
Member Since:
2010-03-14
Here is your

Here is your problem:

"Received incoming SIP connection from unknown peer to 00986412243875"

you did not really "connect" the boxes.



Mohammad Karaminejad
Posts: 10
Member Since:
2009-03-21
Dear obeliks Thanks for yr

Dear obeliks
Thanks for yr kind replay:

on the server B have:

*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
Quintum 172.17.18.10 5060 Unmonitored
205 (Unspecified) D N 0 UNKNOWN
204/204 172.17.18.6 D N 5060 OK (112 ms)
203 (Unspecified) D N 0 UNKNOWN
202 (Unspecified) D N 0 UNKNOWN
201/201 172.17.18.10 D N 5060 OK (66 ms)
200 (Unspecified) D N 0 UNKNOWN
101-peer/106-user 192.168.115.1 5060 OK (327 ms)
8 sip peers [Monitored: 3 online, 4 offline Unmonitored: 1 online, 0 offline]
-- Remote UNIX connection
-- Remote UNIX connection disconnected

---------------
on the server A also have:

elastix*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
SIP-VOIP 69.31.23.227 5060 Unmonitored
106-peer/101-user 172.17.18.100 5060 OK (360 ms)
105 (Unspecified) D N A 0 UNKNOWN

and seems 106-peer/101-user are ok.

would you please guide me how can overcome to this problem.

regards



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.