<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>I have configured asterisk realtime to work with two servers and a seperate MySQL DB.<br><br>Each sip client registers which server it is connected to in the MySQL DB. This works great as long as the clients are<br><br>1. On the same network<br>2. Behind a NAT and connected to the same asterisk server as the caller.<br><br>However I need this configuration to work for "NAT-ed" clients on different asterisk servers in an HA environment(Loadbalanced).<br><br>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.<br><br>Any insight on this would be great as the documentation on this subject is almost non-existent.<br><br>Here's all the configs.<br><br>sip.conf
<br><br>[general]<br>svrlookup=yes<br>displaysystemname=yes<br>;rtcachefriends=yes<br>rtsavesysname=yes<br>canreinvite=no<br>externip=10.100.1.31<br><br>extensions.conf<br><br>[internal]<br>switch => Realtime/internal@extensions<br><br>res_mysql.conf<br><br>[general]<br>dbhost = 10.100.1.32<br>dbname = asterisk<br>dbuser = asterisk<br>dbpass = ***********<br>dbport = 3306<br>dbsock = /var/lib/mysql/mysql.sock<br><br>extconfig.conf<br><br>sipusers => mysql,asterisk,sip_users<br>sippeers => mysql,asterisk,sip_users<br>extensions => mysql,asterisk,extensions_table<br><br>And heres the DB config....<br><br>mysql> select * from extensions_table;<br>+----+----------+-------+----------+--------+-----------+<br>| id | context | exten | priority | app | appdata |<br>+----+----------+-------+----------+--------+-----------+<br>| 1 | internal | 111 | 1 |
Dial | SIP/tim |<br>| 2 | internal | 111 | 2 | Hangup | |<br>| 3 | internal | 222 | 1 | Dial | SIP/lance |<br>| 4 | internal | 222 | 2 | Hangup | |<br>+----+----------+-------+----------+--------+-----------+<br>4 rows in set (0.00 sec)<br><br>| 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 |<br>+----+-------+---------+-----+--------+-------------+----------+-----------+----------+----------------+-------------+----------+-----------+----------+----------+------------+----------+----------+---------+-----------+------+--------+------+-------------+-------------+---------+----------+-------------+------------+----------------+--------+--------+----------+-------------------------+-------------+--------------+-------+-------------+------------+----------+<br>| 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 |<br>| 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 |<br><br>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!.<br><br><br><br></div></div><br>
<hr size=1>Boardwalk for $500? In 2007? Ha! <br><a href="http://us.rd.yahoo.com/evt=48223/*http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow">Play Monopoly Here and Now</a> (it's updated for today's economy) at Yahoo! Games.</body></html>