[asterisk-users] IAX configuration
yonoko molomo
yonokomolomo at gmail.com
Thu Sep 27 09:23:09 CDT 2007
Hi,
I have some problems and doubts connecting two asterisk servers.
I have one asterisk (serverA), with 1 sip client registered (clientA).
I have another asterisk (sever B), with another client (clientB).
Now I want to call from client A to B and from B to A.
Searching in google i find many configuration examples. For instance:
http://etel.wiki.oreilly.com/wiki/index.php/Peering_two_Asterisk_servers_using_IAX
There are hundreds of pages like this. Also the book "Asterisk the
future of telephony" describes how to configure IAX.
But it seems that there are many things missing.
I understand I need to configure iax.conf in server A and add an entry
for server B as "peer".
I also need to include a "register" line in iax.conf of server B. If i
do this, i have server B registered in server A.
I do the same in server B.
The problem is that I see some "rejected" messages, and the servers
are not registering. I do not see anything else that i need to do in
the configuration examples.
Finally, after doing a lot of tests, I tried adding in "users.conf"
some lines like:
[serverA]
type=peer
callwaiting = yes
fullname = serverA
hasagent = yes
hasdirectory = no
hasiax = yes
hasmanager = no
hassip = no
hasvoicemail = yes
host = dynamic
secret = serverA
threewaycalling = yes
vmsecret = 1234
registeriax = yes
registersip = no
canreinvite = no
nat = no
dtmfmode = rfc2833
im not sure of some of these parameter. but basicalli i define a new
user for the server. if i do not define a user like this in users.conf
the registration of the server is rejected.
I type in the CLI> iax2 show registry
and i see that server A is registered in B and B in A. so it seems fine.
Now I update the extensions.conf file accordingly.
in server A i define something like
exten => clientA_Number,1,Dial(sip/$(exten),10)
exten => clientA_Number,2,hangup()
exten => clientB_Number,1,Dial(iax2/serverB,$(exten))
exten => clientB_Number,2,hangup()
i do the similar in serverB.
i am very frustrated because the call does not work. the error is Call
rejected by x.x.x.x No authority found
Again, after doing a lot of tests, i noticed that if i add a new user
in iax.conf like:
[clientB]
type=friend
username=clientB
secret=userB
...
and i do the following in serverB's iax.conf:
register => clientB:clientB at serverA
then it seems to work.
but i have some doubts on it.
i have:
- clientA registered in serverA
- clientB registered in serverB
- serverA registered in serverB
- serverB registered in serverA
then, why do i need to do an explicit register of clientB in server A
in the iax.conf and in the users.conf?
i am not sure if this is mandatory (i did not find this configuration
in any example, but if i do not do this, the call is rejected in the
remote asterisk server)
why should server A know all users in server B?
is it not enough if server B is registered in server A?
i am not an expert in asterisk and i am not sure if this is the
correct configuration, but i am a bit tired testing and this is the
only way i found to make the calls work, but i dont find it is
reasonable, especially when the system grows and then my asterisk
server peers with many other servers (do i need to configure my
users.conf and iax.conf for *each* of the users of other asterisks?)
could someone give me some hints?
thanks
More information about the asterisk-users
mailing list