IAX2 TRUNK entre dos elastix

gianrg

Joined
Mar 4, 2008
Messages
7
Likes
0
Points
1
#1
Hola tengo dos elastix trabajando; una con conexcion a la PSTN por un primario y otra sin ninguna conexcion hacia la PSTN; deseo interconectarlas mediante un TRUNK IAX2, he logrado hacer que las llamadas pasen entre los anexos SIP de las dos centrales, pero lo que no he logrado hacer es que cuando deseo hacer una llamada hacia la PSTN desde la elastix que no tiene ningun hardware de Voip salga atravez del primario de la otra elastix

el contenido mi fichero /etc/asterisk/iax_additional.conf en la
elastix A

[int-of-ent]
type=user
secret=password
context=from-trunk

[INTER]
username=user
type=peer
secret=password
qualify=yes
host=IP_elastix_B

y este el del /etc/asterisk/iax.conf (elastix A)

[general]
bindport = 4569 ; Port to bind to (IAX is 4569)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
disallow=all
allow=ulaw
allow=alaw
allow=gsm
mailboxdetail=yes
bandwidth=low
allow=lpc10
jitterbuffer=no
trunk=yes
trunkfreq=20
tos=lowdelay

[INTER]
type=friend
trunk=yes
host=IP_elastix_B

quisiera saber si alguien me puede ayudar LO NECESITO CON SUMA URGENCIA
 

Cerino88

Joined
Feb 13, 2008
Messages
10
Likes
0
Points
0
#2
I can help you, but in english, i hope u can understand or someone can translate for u if needed.
I had 2 system linked in the past and all worked correctly.
Assuming that the server connected to the PSNT is "Server1" and the one without is "server2".
Inside options "pbx configuration", under trunk configuration , in Server1 , you must insert the following:
Outgoing settings
Trunk Name -> Server2
PEER details -> allow=alaw&ulaw&gsm&g729&ilbc&g726
disallow=all
host=IP.or.DNS.of.Server2
secret=Server2secret(choice1)
type=peer
username=Server2
USER Context -> Server1
USER Details -> allow=alaw&ulaw&gsm&g729&ilbc&g726
auth=plaintext
context=from-internal
disallow=all
host=dynamic
secret=Server1secret(choice1)
trunk=no
type=user

Inside options "pbx configuration", under trunk configuration , in Server2 , you must insert the following:
Outgoing settings
Trunk Name -> Server1
PEER details -> allow=alaw&ulaw&gsm&g729&ilbc&g726
disallow=all
host=IP.or.DNS.of.Server1
secret=Server1secret
type=peer
username=Server1
USER Context -> Server2
USER Details -> allow=alaw&ulaw&gsm&g729&ilbc&g726
auth=plaintext
context=from-internal
disallow=all
host=dynamic
secret=Server2secret
trunk=no
type=user

This is all u need to link the two servers, but dont forget to configure outgoing and incoming routes to make all work like u want.

I hope this will be usefull and dont esitate to ask again if need help.

Bye

Davide
 

Cerino88

Joined
Feb 13, 2008
Messages
10
Likes
0
Points
0
#3
I can help you, but in english, i hope u can understand or someone can translate for u if needed.
I had 2 system linked in the past and all worked correctly.
Assuming that the server connected to the PSNT is "Server1" and the one without is "server2".
Inside options "pbx configuration", under trunk configuration , in Server1 , you must insert the following:
Outgoing settings
Trunk Name -> Server2
PEER details -> allow=alaw&ulaw&gsm&g729&ilbc&g726
disallow=all
host=IP.or.DNS.of.Server2
secret=Server2secret(choice1)
type=peer
username=Server2
USER Context -> Server1
USER Details -> allow=alaw&ulaw&gsm&g729&ilbc&g726
auth=plaintext
context=from-internal
disallow=all
host=dynamic
secret=Server1secret(choice1)
trunk=no
type=user

Inside options "pbx configuration", under trunk configuration , in Server2 , you must insert the following:
Outgoing settings
Trunk Name -> Server1
PEER details -> allow=alaw&ulaw&gsm&g729&ilbc&g726
disallow=all
host=IP.or.DNS.of.Server1
secret=Server1secret
type=peer
username=Server1
USER Context -> Server2
USER Details -> allow=alaw&ulaw&gsm&g729&ilbc&g726
auth=plaintext
context=from-internal
disallow=all
host=dynamic
secret=Server2secret
trunk=no
type=user

This is all u need to link the two servers, but dont forget to configure outgoing and incoming routes to make all work like u want.

I hope this will be usefull and dont esitate to ask again if need help.

Bye

Davide
 

markt

Joined
Oct 29, 2007
Messages
9
Likes
0
Points
0
#4
After updating Freepbx till 2.4.0.0. this method does not work, on 2.3.1 all was OK

Code:
 -- Hungup 'IAX2/pr-16384'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:21] Goto("SIP/701-b77026f0", "s-CHANUNAVAIL|1"«») in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf("SIP/701-b77026f0", "1?noreport"«») in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp("SIP/701-b77026f0", "TRUNK Dial failed due to CHANUNAVAIL - failing through to other trunks"«») in new stack
    -- Executing [206@from-internal:5] Macro("SIP/701-b77026f0", "outisbusy|"«») in new stack
    -- Executing [s@macro-outisbusy:1] Playback("SIP/701-b77026f0", "all-circuits-busy-now|noanswer"«») in new stack
    -- <SIP/701-b77026f0> Playing 'all-circuits-busy-now' (language 'en')
Server 1:

iax_additional.conf

Code:
[br]
allow=alaw
auth=plaintext
context=from-internal
disallow=all
host=dynamic
secret=123456
trunk=no
type=user

[pr]
allow=alaw
disallow=all
host=192.168.2.127
secret=123456
type=peer
username=br
Code:
voip*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status
pr/br            192.168.2.127   (S)  255.255.255.255  4569 (T)      OK (2 ms)
1 iax2 peers [1 online, 0 offline, 0 unmonitored]
Server 1:

iax_additional.conf

Code:
[br]
allow=alaw
disallow=all
host=192.168.2.129
secret=123456
type=peer
username=br

[pr]
allow=alaw
auth=plaintext
context=from-internal
disallow=all
host=dynamic
secret=123456
trunk=no
type=user
Code:
voippr*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status
br/br            192.168.2.129   (S)  255.255.255.255  4569 (T)      OK (1 ms)
1 iax2 peers [1 online, 0 offline, 0 unmonitored]
 

markt

Joined
Oct 29, 2007
Messages
9
Likes
0
Points
0
#5
Has solved the problem if to whom it is interesting:

server1 - ip 192.168.2.129, elastix 1.08, Freepbx 2.4.0

server2 - ip 192.168.2.127, elastix 1.08, Freepbx 2.4.0


Code:
Server 1

Trunk Name: server2

context=from-internal
host=192.168.2.127
secret=123456
trunk=yes
type=friend
username=server1

User Context: EMPTY
User Details: EMPTY

Register String: server1:123456@192.168.2.127

Server 2

Trunk Name: server1

context=from-internal
host=192.168.2.129
secret=123456
trunk=yes
type=friend
username=server2

User Context: EMPTY
User Details: EMPTY

Register String: server2:123456@192.168.2.129
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#6
I have a different config, but working ok too.
These are my IAX2 trunks settings in both boxes:

boxA (192.168.1.11)

Trunk name: boxB-peer
Peer details:
username=boxA-user
type=peer
secret=123456
monitor=yes
host=192.168.2.11
disallow=all
allow=g729,g723,gsm,alaw

User context: boxB-user
User details:
type=user
secret=123456
host=192.168.2.11
disallow=all
context=from-internal
allow=g729,g723,gsm,alaw

Register string: empty

boxB (192.168.2.11)

Trunk name: boxA-peer
Peer details:
username=boxB-user
type=peer
secret=123456
monitor=yes
host=192.168.1.11
disallow=all
allow=g729,g723,gsm,alaw

User context: boxA-user
User details:
type=user
secret=123456
host=192.168.1.11
disallow=all
context=from-internal
allow=g729,g723,gsm,alaw

Register string: empty


Then I have an outgoing route 7|. in both boxes using this IAX2 trunk.
When I want to call extensions from the other box I just dial 7 + ext number.
If I want to transfer a call I press: *1 (transfer prompt) 7 + ext number
 

Members online

No members online now.

Forum statistics

Threads
30,952
Messages
130,980
Members
17,654
Latest member
janko67
Top