<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi list,</p>
<p>I'm currently building a HA setup with 2 openSIPS 2.4 instances
which do share a floating IP through keepalived. They are working
as 1:1 mid_registrar, gateway to the PSTN and dispatcher for
multiple FreeSWITCH instances. Those FreeSWITCH instances hold all
accounts, domains and media services, they also do the RTP part.</p>
<p>Since we are hosting multiple customers on the same FreeSWITCH
instances, sperated through domains, we'd like to ensure that all
registrations of a domain stay on the same FreeSWITCH as long this
instance is reachable. We want this to ensure that conferences,
call pickups and so on work reliable. It's not very important for
us to distribute the load evenly since we have no high call /
conference volume, the goal is more to have the setup as available
as possible with some sort of loadbalancing and without having to
take manual action if one of the FreeSWITCHes dies.<br>
</p>
<p>To achieve this, our idea was to set <b>modparam("dispatcher",
"hash_pvar", "$fd")</b> to use the from domain as source for
hashing and call <b>ds_select_dst </b>with the alg "7":</p>
<p>if (!ds_select_dst("2", "7"))<br>
{<br>
xlog("L_ERR", "$ci|end|no servers avaliable");<br>
sl_send_reply("480", "Temporarily Unavailable");<br>
exit;<br>
}</p>
<p>This approach works fine as long as we use it for internal calls
since those have the from / to domain part properly set. If a call
arrives from the PSTN openSIPS has no knowledge about the relation
of the external numbers and internal numbers / domains. Is there a
smart way to properly route those external calls to the correct
FreeSWITCH wihtout having openSIPS to access the FreeSWITCH
database / duplicating the data into the openSIPS database or to
run FreeSWITCH in active/standby mode?<br>
</p>
<p>Best regards,<br>
Matthias<br>
</p>
</body>
</html>