Dear All,
I am new to Asterisk. I have configured two asterisk server in my network. one has TDM400 card installed. now i want establish communication between two server within my LAN. Please help me how to configure. and i also want to restrict all no. except 5/6 no. to do PSTN outgoing calls but everybody of both server will get incoming calls from PSTN. Please help me
get both your asterisk servers setup on your lan.
Then in /etc/asterisk/iax.conf, you will set up the connection between the two and the context of where the calls fall into (and vice versa on the other server…read up on IAX)
[server1]
type=user
secret=password_here
context=outgoing-lines
trunk=yes
notransfer=yes
qualify=yes
[server2]
type=peer
host=ipaddress_of_server
secret=password_here
username=server2
trunk=yes
notransfer=yes
quality=yes
restricting numbers will be done in your dial plan /etc/asterisk/extensions.conf
for server with the tdm card:
exten => _[5-6].,1,DIAL(Zap/1/${EXTEN:0},60,r)
for the server without the tdm card:
exten => _[5-6].,1,DIAL(IAX2/server2/${EXTEN:0},60,r)
hope this helps, u may want to be clearer with what you want next time, i had trouble trying to predict what you were thinking…(like the 5/6 is that zap channel or 5/6 prefix to dial out, or 5/6 area code…)
Thanks for your promt help. sorry to make you confuse. with 5/6 no. i wanted to mean that among all the sip users only 5 specific user will be able to make outgoing PSTN call.
you can put the zap lines in context=outgoing-lines
then give the 5 sip users context of outgoing-lines
within the outgoing-lines context do a include=>internal
the other sip users dump them into context internal to be able to dial other sip users etc, but not get into the outgoing-lines context.
Dear CustomGT,
i configured IAX in both server and getting this error
In Home Server
Executing Dial(“SIP/476001-09e7a250”, “IAX2/server2/SIP/476007|20|Tt”) in new stack
– Called server2/SIP/476007
Nov 22 18:40:49 WARNING[16137]: chan_iax2.c:7170 socket_read: Call rejected by 192.168.4.150: No authority found
– Hungup ‘IAX2/server2-16384’
== Everyone is busy/congested at this time (1:0/0/1)
== Auto fallthrough, channel ‘SIP/476001-09e7a250’ status is ‘CHANUNAVAIL’
In Destination Server
Nov 22 12:44:13 NOTICE[11417]: chan_iax2.c:6534 socket_read: Rejected connect attempt from 192.168.1.200, who was trying to reach ‘SIP@’
i am unable to troubleshoot. Please help and provide me some site URL on IAX configuration
well it is reaching the destination server that is good.
It looks to me like it is failing the handshake.
voip-info.org/wiki/view/Aste … al+servers
Its in your iax.conf on your 2 servers I believe.
On each server you have the user type=user, and type=peer
The type=user is the server it is on of course. The type=peer is the other server.
NOW if you went to the other server, type=user is actually the type=peer on the other server. So the password has to be identical, along with the context name i believe (aka [server1] or [server2])
(example type=users’s password on one server should be the same as the type=peer’s password on the other…)
hope this makes sense, if you still have problems i will post real time config files