Hi Mike,<br><br>With mysql, you can try this too (just an example):<br><br>mysql&gt; select username,destination,request_domain from dids where username=&#39;1111111111&#39;;<br>+------------+-----------------------+----------------+<br>
| username   | destination           | request_domain |<br>+------------+-----------------------+----------------+<br>| 111111111  | sip:<a href="http://11.11.11.11:5060">11.11.11.11:5060</a>  | <a href="http://whatever.com">whatever.com</a>   |<br>
+------------+-----------------------+----------------+<br><br>modparam(&quot;avpops&quot;,&quot;db_url&quot;,&quot;mysql://aaa:bbb@localhost/opensips&quot;)<br>modparam(&quot;avpops&quot;,&quot;avp_table&quot;,&quot;dids&quot;)<br>
<br><br>..............<br><br>                        avp_db_query(&quot;select destination, request_domain from dids where username=&#39;$rU&#39;&quot;,&quot;$avp(s:destination);$avp(s:reqdomain)&quot;);<br>                        if ($avp(s:destination)==NULL)<br>
                        {<br>                                sl_send_reply(&quot;404&quot;,&quot;Not found&quot;);<br>                                exit;<br>                        };<br>                        $du = $avp(s:destination);<br>
                        $rd = $avp(s:reqdomain);<br>                        t_relay();<br>                        exit;<br>............       <br>        <br><br>Not sure about the performance under a heavy inbound traffic (because of the mysql queries).<br>
<br>-Laszlo<br><br><br><div class="gmail_quote">2010/5/1 Mike O&#39;Connor <span dir="ltr">&lt;<a href="mailto:mike@oeg.com.au">mike@oeg.com.au</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
So there is no way for me to read from a db and rewrite the sip host and<br>
port ?<br>
<font color="#888888"><br>
Mike<br>
</font><div><div></div><div class="h5"><br>
On 1/05/10 4:35 PM, Adrian Georgescu wrote:<br>
&gt; You could use ENUM to translate SIP URIs to a particular outside peer<br>
&gt; and use trusted peers table to match incoming calls.<br>
&gt;<br>
&gt; Then you only need to add ENUM numbers in your DNS database and trusted<br>
&gt; peers in your proxy database, no need to configure much in OpenSIPS<br>
&gt; beside doing ENUM lookup and checking the trusted table.<br>
&gt;<br>
&gt;<br>
&gt; On Sat, 2010-05-01 at 16:28 +0930, Mike O&#39;Connor wrote:<br>
&gt;<br>
&gt;&gt; Hi All<br>
&gt;&gt;<br>
&gt;&gt; I have a need to forward calls onward for a range of DID&#39;s, but the<br>
&gt;&gt; other end is not going to Register. I think this is called trunking.<br>
&gt;&gt;<br>
&gt;&gt; I need to be able to configure the DID&#39;s and the ip/port there being on<br>
&gt;&gt; forwarded too.<br>
&gt;&gt; What methods should I use to do this ?<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve look at a number of options but the issue is that for the functions<br>
&gt;&gt; like &#39;seturi&#39; do not allow variables only static strings.<br>
&gt;&gt;<br>
&gt;&gt; Thanks<br>
&gt;&gt; Mike<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Users mailing list<br>
&gt;&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>