Interconnecting 2 servers Elastix - Asterisk

javapaul

Joined
Jul 1, 2009
Messages
99
Likes
0
Points
0
#1
Hi, im trying to interconnect 2 servers, server 1 is running elastix, and server 2 is running asterisk(clean),

so far i can do the following

ELASTIX ----EXT---> ASTERISK

Which mean i can call an extension on my asterisk server from elastix, but i cant dial an extension on my elastix server from my asterisk

I'm getting this error when i try to dial out from asterisk to elastix

I DONT HAVE THIS PROBLEM ANY MORE SO I POSTED MY CONFIG, HOPE IT HELPS
SOLUTION

ASTERISK SERVER
EXTENSIONS.CONF

Code:
[asterisktwo]
exten => _60XX,1,dial(SIP/A-out/${EXTEN})
exten => _60XX,2,hangup()
i include "asterisktwo" on my internal context

SIP.CONF
added the following sip account
Code:
[A-out]
type=friend
host=172.26.1.223 ;or the ip address from the other server
fromuser=tuyo ; this is very important cause it should be the same in your elastix server
username=tuyo
secret=tuyo
disallow=all
allow=ulaw ;ulaw works for me, try different ones till it works
canreinvite=no
Code:
[prueba]
type=friend
username=prueba
secret=5555
dtmfmode=info
disallow=all
allow=ulaw ; again use the best one that suits you
qualify=yes
nat=no
host=172.26.1.152 ;IP of the  asterisk server
context=internal
canreinvite=yes
ELASTIX SERVER
create a sip trunk
Code:
TRUNK NAME Asterisk
PEER DETAILS
type=peer
host=172.26.1.152 ;IP from your asterisk server
fromuser=prueba
username=prueba
secret=5555
disallow=all
allow=ulaw
canreinvite=no

USER CONTEXT tuyo ;this is why the fromuser line is important for
USER DETAILS
type=user
username=tuyo ; from the sip account u created in asterisk server
secret=tuyo
host=172.26.1.223 ;IP FROM YOUR ELASTIX
disallow=all
allow=ulaw
canreinvite=no
context=from-internal
now on outbound rules u can set them to whatever suits u best.
 

Megabyte

Joined
Mar 28, 2009
Messages
327
Likes
0
Points
0
#2
Do you have a register string? because sometimes you need to create one and use a way like this:


asterisk:password@myserverip/elastixuser


Try that of course you have to fixed to your reality
 

javapaul

Joined
Jul 1, 2009
Messages
99
Likes
0
Points
0
#3
Megabyte said:
Do you have a register string? because sometimes you need to create one and use a way like this:


asterisk:password@myserverip/elastixuser


Try that of course you have to fixed to your reality
yeah about that, at the end /elastixuser , what should i put in there?
something like this
A:A@172.26.1.152/B

where B is my username for the context?

USER CONTEXT B
USER DETAILS
type=friend
secret=B
host=172.26.1.223
disallow=all
allow=ulaw
canreinvite=no
 

Megabyte

Joined
Mar 28, 2009
Messages
327
Likes
0
Points
0
#4
ok i will try to make you a detailed config

in your elastix server try something like this

in the name of the trunk try serverA
in peer details try

host=dynamic
secret=alfio
trunk=yes
type=friend

in the register field

serverB:alfio@ipserverB

In your asterisk server try something like


in the register use:


register => serverA:alfio@ipserverA/serverB

[serverB]
type=friend
secret=alfio
context=whereyouwanttohandleincomingcalls
host=dynamic

Try it and tell waht happend
 

haamed

Joined
Jul 23, 2007
Messages
251
Likes
0
Points
0
#5

rejil.rajan

Joined
Apr 8, 2007
Messages
154
Likes
0
Points
0
#6
The best method to connect between two asterisk servers is using IAX

You could also try by making the type as friend in Server A
 

javapaul

Joined
Jul 1, 2009
Messages
99
Likes
0
Points
0
#7
sorry been so busy with work that i haven't had the time to work with elastix, i got it to a point were i can call between extensions but when i try to use the sip trunk from my asterisk, it would think that elastix is trying to dial an extensions, but ill try the other stuff tomorrow, thanks again elastix community :)
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
I believe the context of the remote box(asterisk) trunk on the box with outbound connectivity (elastix) should be

context=from-internal

or the trunks on that box(Elastix) won't be available to calls from the remote box (asterisk), just the internal extensions (unless specifically included in your chosen context) . (do you understand the logic, the remote box is in effect another set of extensions using a "tie-line" to the master box, so calls from it should be treated as local extension calls, they will be thusly routed to extension or outbound trunk as appropriate)
 

javapaul

Joined
Jul 1, 2009
Messages
99
Likes
0
Points
0
#9
:woohoo: thanks for all the help guys i was able to interconnect the two boxes and make calls trough one of them, there is a whole lot of logic involved like dicko said, thanks again elastix's community :woohoo:
 

Megabyte

Joined
Mar 28, 2009
Messages
327
Likes
0
Points
0
#10
Hi im happy you did it, can you post yours configs here for other people, in that way the forum gets better.
 

younes371

Joined
Jul 15, 2009
Messages
4
Likes
0
Points
0
#11
Hi,

i would like do the same config, can you tel me how can i do it ?

Thank's
 

javapaul

Joined
Jul 1, 2009
Messages
99
Likes
0
Points
0
#12
I posted the solution/config files at the beginning of the threat.
 

younes371

Joined
Jul 15, 2009
Messages
4
Likes
0
Points
0
#13
Thank you very match for help

I will test it and i return to you if i will have problème

Thank's
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,901
Messages
130,885
Members
17,562
Latest member
colak
Top