<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><pre>This was added and working at one time but in the latest SVN it seems to have reverted back to non-working. Am I missing a setting that has changed?</pre><pre><br></pre><pre>ds_select_dst("1", "4");
t_replicate("$du");</pre><pre><br></pre><pre>Dec 20 13:16:02 [12858] ERROR:core:parse_uri: uri too short: <$du> (3)</pre><pre>Dec 20 13:16:02 [12858] ERROR:tm:uri2proxy: bad_uri: $du</pre><pre><br></pre><pre>Thanks,</pre><pre>Jody Rudolph</pre><pre><br></pre><pre><br></pre><pre>On Oct 4, 2010, at 9:57 AM, Razvan Crainea wrote:
><i> Hi Jody,
</i>><i>
</i>><i> I just made a commit with this feature. Now t_replicate can also receive
</i>><i> a pseudo-variable as argument.
</i>><i> Please update from svn (it is both in trunk and 1.6).
</i>><i>
</i>><i> Regards,
</i>><i>
</i>><i> --
</i>><i> Razvan Crainea
</i>><i> <a href="http://www.voice-system.ro">www.voice-system.ro</a>
</i>><i>
</i>><i>
</i>><i>
</i>><i> On 10/04/2010 02:17 PM, Bogdan-Andrei Iancu wrote:
</i>>><i> Hi Jody,
</i>>><i>
</i>>><i> Indeed, this is not a nice solution - let me put on the TODO list the
</i>>><i> support for variables in t_replicate.
</i>>><i>
</i>>><i> Regards,
</i>>><i> Bogdan
</i>>><i>
</i>>><i> Jody Rudolph wrote:
</i>>>><i> Just in case anyone might need a workaround here like I did I thought I would share what I did to get it to work.
</i>>>><i>
</i>>>><i> Since the servers I am load balancing registrations across share a database backend for registrations I am trying to spread the registrations across single servers using dispatcher.
</i>>>><i>
</i>>>><i> Lets say we have the following 3 IPs:
</i>>>><i>
</i>>>><i> 192.168.1.2
</i>>>><i> 192.168.1.3
</i>>>><i> 192.168.1.4
</i>>>><i>
</i>>>><i>
</i>>>><i> Since we cant use (that I can figure out anyway)
</i>>>><i> ds_select_dst("1", "4");
</i>>>><i> t_replicate($du);
</i>>>><i>
</i>>>><i> I used:
</i>>>><i>
</i>>>><i>         ds_select_dst("1", "4");
</i>>>><i>         switch($du)
</i>>>><i> {
</i>>>><i> case "<a href="sip:192.168.1.2">sip:192.168.1.2</a>":
</i>>>><i> xlog("reg destination address is $du\n");
</i>>>><i> t_replicate("<a href="sip:192.168.1.2">sip:192.168.1.2</a>");
</i>>>><i> break;
</i>>>><i> case "<a href="sip:192.168.1.3">sip:192.168.1.3</a>":
</i>>>><i> xlog("reg destination address is $du\n");
</i>>>><i> t_replicate("<a href="sip:192.168.1.3">sip:192.168.1.3</a>");
</i>>>><i> break;
</i>>>><i> case "<a href="sip:192.168.1.4">sip:192.168.1.4</a>":
</i>>>><i> xlog("reg destination address is $du\n");
</i>>>><i> t_replicate("<a href="sip:192.168.1.4">sip:192.168.1.4</a>");
</i>>>><i> break;
</i>>>><i> default:
</i>>>><i> xlog("Dispatching Reg failed: $du\n");
</i>>>><i> sl_reply_error();
</i>>>><i> break;
</i>>>><i> }
</i>>>><i>         exit;
</i>>>><i>
</i>>>><i> Not the cleanest way of doing it, but it works.
</i>>>><i>
</i>>>><i>
</i>>>><i>
</i>>>><i> Thanks,
</i>>>><i> Jody Rudolph
</i>>>><i>
</i>>>>><i>
</i>>>><i>
</i>>>><i> _______</i></pre><div><br></div><br></span>
</div>
<br></body></html>