Page 1 of 1

Connect 2 asterisk servers via IAX protocol

PostPosted: Thu Nov 29, 2007 11:07 pm
by brainstorm
Hi, friends :D :D

I have sucessfully configured and connected the two asterisk servers.

For tht, considre the following scenario.

there are two pcs each have asterisk server installed. (asterisk - 1.2.24)
there are two sip fones also, first fone(fon no 5000) and second fon(fon no 5010).

for instance I am giving the sample ips to tht pcs like
(1) pc1 : IP - 192.168.100.200 Port - 5060
(2) pc2 : IP - 192.168.100.201 Port - 5060

fon_1 configuration,
---------------------------------------------
SIP Server : 192.168.100.200:5060
SIP User ID: 5000
Authenticate ID:5000
Name:5000
----------------------------------------------

fon_2 configuration,
---------------------------------------------
SIP Server : 192.168.100.201:5060
SIP User ID: 5010
Authenticate ID:5010
Name:5010
----------------------------------------------

Now u just have to edit 3 files. (in both the pcs)

-------------------------------------------------------------------
pc_1 conf files:
------------------------------------------------------------------

sip .conf------------------------------------------
[default]
context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes

[5000]
type=friend
username=5000
authuser=5000
context=iax
host=dynamic
canreinvite=no
nat=no
disallow=all
allow=g729

sip.conf file over -------------------xxxx-----------------


iax.conf
------------------------------------------

;peer name
[ASTtest1]
type=friend
context=default
auth=plaintext
host=192.168.100.201
port=4569
permit=0.0.0.0/0.0.0.0
disallow=all
allow=g729

iax.conf file over -----------------xxxx-----------------------

extensions.conf----------------------------------

[iax]
exten => _5XXX,1,Dial(IAX2/ASTtest1/${EXTEN},55,o)
exten => _5XXX,n,hangup()

extensions.conf file over --------------xxxxx--------------

-------------------------------------------------------------------
pc_2 conf files:
------------------------------------------------------------------

sip .conf------------------------------------------
[default]
context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes

[5010]
type=friend
username=5010
authuser=5010
context=iax
host=dynamic
canreinvite=no
nat=no
disallow=all
allow=g729

sip.conf file over -------------------xxxx-----------------

iax.conf ------------------------------------------

;peer name
[ASTtest2]
type=friend
context=default
auth=plaintext
host=192.168.100.200
port=4569
permit=0.0.0.0/0.0.0.0
disallow=all
allow=g729

iax.conf file over -----------------xxxx-----------------------

extensions.conf----------------------------------

[iax]
exten => _5XXX,1,Dial(IAX2/ASTtest2/${EXTEN},55,o)
exten => _5XXX,n,hangup()

extensions.conf file over --------------xxxxx--------------

all configuration stuff is over (cheers !!! :lol: :lol: :lol:)

now if u want to check in sip server then u can fire the following command.
CLI> iax2 show peers

u can make calls also from 5000 to 5010. (If u find not working fons then just check for codek compatibility in fone)

its time to rock an rollllll, fun unlimited........................................................ :P

PostPosted: Thu Nov 29, 2007 11:36 pm
by ramindia
Good document

keep it up for the work you have done for this group

ram

PostPosted: Sat Dec 01, 2007 11:05 pm
by Op3r
whats up with the sip?

PostPosted: Mon Dec 03, 2007 2:04 am
by brainstorm
dear Op3r,

please briefly explain ur question. :?: :?: :?:

PostPosted: Mon Dec 03, 2007 2:38 am
by Op3r
I mean you already configured the iax2 why do you have to redo it on sip?

PostPosted: Mon Dec 03, 2007 5:28 am
by brainstorm
dear Op3r,

I think I havnt re-done anything, in configuration.
still if, it is there, please point out.