SIP-To-SIP Trunk with ability to use outbound rout

waweiwi@gmail.com

Joined
Mar 15, 2010
Messages
8
Likes
0
Points
0
#1
Hi All,

I have two boxes running elastix (BoxA, BoxB) both have FXO-PSTN lines and they are located in different Geographic ares, they are able to do calls between extensions (BoxA can call extension form BoxB in both ways".

I configured BoxA outbond routes to send specific dial patterns "9|059XXXXXXX" to use PSTN lines of BoxB but it stuck and couldn't continue the call.

I did it before using two trixbox and IAX2 trunks and succeed to make outbound call from both sides!!!

Any ides?

BR
Walid Aweiwi
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#2
yes there are a few options to investigate but it would be easier to help you if you would have provided:

- setup of your inter-pbx trunks
- cli log of the failed call
 

waweiwi@gmail.com

Joined
Mar 15, 2010
Messages
8
Likes
0
Points
0
#3
Hi,

Bellow are the configrations for both boxs + logs:


----------------BoxA----------------------
[BoxA]
disallow=all
username=sipxxx
type=peer
secret=xxxxxxx
qualify=yes
insecure=port,invite
host="BoxB IP Add"
fromuser=sipxxx
dtmfmode=rfc2833
canredirect=no
allow=g729

[sipxxx]
username=sipxxx
type=user
secret=qaz123
qualify=no
insecure=port,invite
fromuser=sipxxx
context=from-internal
canreinvite=no

register=sipxxx:xxxxxxx@"BoxB IP Address"/sipxxx

Added route in the outbound routes to trunk a specific call paterns to "BoxA" trunk


-------------BoxB--------------------------
[BoxB]
disallow=all
username=sipyyy
type=peer
secret=xxxxxxxxx
qualify=yes
insecure=port,invite
host="BoxA IP Address"
fromuser=sipyyy
dtmfmode=rfc2833
canredirect=no
allow=g729

[sipyyy]
username=sipyyy
type=user
secret=qaz123
qualify=no
insecure=port,invite
fromuser=sipyyy
context=from-internal
canreinvite=no



register=sipyyy:xxxxxxxxx@"BoxA IP Address"/sipyyy


Added route in the outbound routes to trunk a specific call paterns to "BoxB" trunk





----------------------------------------logs from BoxA-----------------------------------

[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [0597989303@from-sip-external:1] NoOp("SIP/BoxB-00000067", "Received incoming SIP connection from unknown peer to 0597989303") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [0597989303@from-sip-external:2] Set("SIP/BoxB-00000067", "DID=0597989303") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [0597989303@from-sip-external:3] Goto("SIP/BoxB-00000067", "s|1") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Goto (from-sip-external,s,1)
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@from-sip-external:1] GotoIf("SIP/BoxB-00000067", "1?from-trunk|0597989303|1") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Goto (from-trunk,0597989303,1)
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [0597989303@from-trunk:1] NoOp("SIP/BoxB-00000067", "Catch-All DID Match - Found 0597989303 - You probably want a DID for this.") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [0597989303@from-trunk:2] Goto("SIP/BoxB-00000067", "ext-did|s|1") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Goto (ext-did,s,1)
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ext-did:1] Set("SIP/BoxB-00000067", "__FROM_DID=s") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ext-did:2] Gosub("SIP/BoxB-00000067", "app-blacklist-check|s|1") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@app-blacklist-check:1] LookupBlacklist("SIP/BoxB-00000067", "") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@app-blacklist-check:2] GotoIf("SIP/BoxB-00000067", "0?blacklisted") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@app-blacklist-check:3] Return("SIP/BoxB-00000067", "") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ext-did:3] Gosub("SIP/BoxB-00000067", "cidlookup|cidlookup_1|1") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [cidlookup_1@cidlookup:1] LookupCIDName("SIP/BoxB-00000067", "") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [cidlookup_1@cidlookup:2] Return("SIP/BoxB-00000067", "") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ext-did:4] ExecIf("SIP/BoxB-00000067", "0 |Set|CALLERID(name)=sipyyy") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ext-did:5] Set("SIP/BoxB-00000067", "__CALLINGPRES_SV=allowed_not_screened") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ext-did:6] SetCallerPres("SIP/BoxB-00000067", "allowed_not_screened") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ext-did:7] Goto("SIP/BoxB-00000067", "ivr-5|s|1") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Goto (ivr-5,s,1)
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:1] Set("SIP/BoxB-00000067", "MSG=custom/ar-main") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:2] Set("SIP/BoxB-00000067", "LOOPCOUNT=0") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:3] Set("SIP/BoxB-00000067", "__DIR-CONTEXT=default") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:4] Set("SIP/BoxB-00000067", "_IVR_CONTEXT_ivr-5=") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:5] Set("SIP/BoxB-00000067", "_IVR_CONTEXT=ivr-5") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:6] GotoIf("SIP/BoxB-00000067", "0?begin") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:7] Answer("SIP/BoxB-00000067", "") in new stack
[Mar 29 00:13:53] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:8] Wait("SIP/BoxB-00000067", "1") in new stack
[Mar 29 00:13:54] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:9] Set("SIP/BoxB-00000067", "TIMEOUT(digit)=3") in new stack
[Mar 29 00:13:54] VERBOSE[20991] logger.c: -- Digit timeout set to 3
[Mar 29 00:13:54] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:10] Set("SIP/BoxB-00000067", "TIMEOUT(response)=10") in new stack
[Mar 29 00:13:54] VERBOSE[20991] logger.c: -- Response timeout set to 10
[Mar 29 00:13:54] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:11] Set("SIP/BoxB-00000067", "__IVR_RETVM=") in new stack
[Mar 29 00:13:54] VERBOSE[20991] logger.c: -- Executing [s@ivr-5:12] ExecIf("SIP/BoxB-00000067", "1|Background|custom/ar-main") in new stack
[Mar 29 00:13:54] VERBOSE[20991] logger.c: -- <SIP/BoxB-00000067> Playing 'custom/ar-main' (language 'en')
[Mar 29 00:13:59] VERBOSE[20988] logger.c: -- Executing [h@macro-dialout-trunk:1] Macro("SIP/401-00000066", "hangupcall|") in ne
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#4
Your connection from the outside box arrive in this context:

0597989303@from-sip-external

It should have been in from-internal to allow outbound call. In this case, your call from the box is considered like an incoming call. you can also see it here:
Received incoming SIP connection from unknown peer

can you try in both box to change as follow

[BoxA]
disallow=all
username=sipxxx
type=peer
secret=xxxxxxx
qualify=yes
insecure=port,invite
host="BoxB IP Add"
fromuser=sipxxx
dtmfmode=rfc2833
canredirect=no
allow=g729
context=from-internal

[sipxxx]
erase all your entries

register=sipxxxxxxxxx@"BoxB IP Address"/sipxxx

also if you want to force g729, you have before the allow=g729, to add a disallow=all

Also you probably don't need to register on both side simultaneously.
Last but not least, when everything will work, I would suggest to use an IAX2 trunk instead of sip when you link two pbx together. You can use encryption, have a lower bandwidth use when carrying multi channels, and it works better through NAT.
 

waweiwi@gmail.com

Joined
Mar 15, 2010
Messages
8
Likes
0
Points
0
#5
Thanks,

It's working now, I was added from-internal context in user context, it should be in the peer details.

Regarding IAX2 and SIP, I'm using both but gave SIP less priority in the trunk sequence to use it as backup in case the IAX2 trunk frozen.

BR
Walid Aweiwi
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#6
glad it's working.
 

ashir24

Joined
Sep 1, 2009
Messages
75
Likes
0
Points
0
#7
I have made the very same setup. but I am not able to make calls one side. In other words, Box A can call Box B , but not the other way. It keep saying all circuits are busy.
what could be the possible reason.
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#8
Hi.

Be careful at dtmfmode.
The G729 codec and the RFC2833 are not good friend.
You could use dtmfmode=info or auto.
 

ashir24

Joined
Sep 1, 2009
Messages
75
Likes
0
Points
0
#9
I am using gsm.
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,886
Members
17,563
Latest member
dineshr
Top