I have configured asterisk realtime to work with two servers and a seperate
MySQL DB.
Each sip client registers which server it is connected to in the MySQL DB. This
works great as long as the clients are
1. On the same network
2. Behind a NAT and connected to the same asterisk server as the caller.
However I need this configuration to work for "NAT-ed" clients on
different asterisk servers in an HA environment(Loadbalanced).
Through packet "sniffing" I have observed that traffic is not being
passed to the clients via the asterisk server they are registered to, hence
breaking the call.
Any insight on this would be great as the documentation on this subject is
almost non-existent.
Here's all the configs.
sip.conf
[general]
svrlookup=yes
displaysystemname=yes
;rtcachefriends=yes
rtsavesysname=yes
canreinvite=no
externip=10.100.1.31
extensions.conf
[internal]
switch => Realtime/internal at extensions
res_mysql.conf
[general]
dbhost = 10.100.1.32
dbname = asterisk
dbuser = asterisk
dbpass = ***********
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock
extconfig.conf
sipusers => mysql,asterisk,sip_users
sippeers => mysql,asterisk,sip_users
extensions => mysql,asterisk,extensions_table
And heres the DB config....
mysql> select * from extensions_table;
+----+----------+-------+----------+--------+-----------+
| id | context | exten | priority | app | appdata |
+----+----------+-------+----------+--------+-----------+
| 1 | internal | 111 | 1 | Dial | SIP/tim |
| 2 | internal | 111 | 2 | Hangup | |
| 3 | internal | 222 | 1 | Dial | SIP/lance |
| 4 | internal | 222 | 2 | Hangup | |
+----+----------+-------+----------+--------+-----------+
4 rows in set (0.00 sec)
| id | name | host | nat | type | accountcode | amaflags | callgroup |
callerid | cancallforward | canreinvite | context | defaultip | dtmfmode |
fromuser | fromdomain | insecure | language | mailbox | md5secret | deny |
permit | mask | musiconhold | pickupgroup | qualify | regexten | restrictcid |
rtptimeout | rtpholdtimeout | secret | setvar | disallow | allow
| fullcontact | ipaddr | port | regserver | regseconds | username |
+----+-------+---------+-----+--------+-------------+----------+-----------+----------+----------------+-------------+----------+-----------+----------+----------+------------+----------+----------+---------+-----------+------+--------+------+-------------+-------------+---------+----------+-------------+------------+----------------+--------+--------+----------+-------------------------+-------------+--------------+-------+-------------+------------+----------+
| 1 | lance | dynamic | yes | friend | NULL | NULL | NULL |
lance | yes | no | internal | NULL | NULL | NULL
| NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL
| NULL | NULL | NULL | NULL | NULL | NULL |
NULL | lance | NULL | all | g729;ilbc;gsm;ulaw;alaw |
| 10.100.1.32 | 30988 | sanbox-mono | 1191962717 | lance |
| 2 | tim | dynamic | no | friend | NULL | NULL | NULL | tim
| yes | no | internal | NULL | NULL | NULL |
NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
NULL | NULL | NULL | NULL | NULL | NULL | NULL
| tim | NULL | all | g729;ilbc;gsm;ulaw;alaw | |
10.100.1.108 | 64230 | kickstart | 1191963352 | tim |
Note in the above example, lance is behind a NAT and tim is not. In this case
tim cannot call lance but lance can call tim!.
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20071009/c7fdf6f6/attachment.htm