Hi Mike,<br><br>With mysql, you can try this too (just an example):<br><br>mysql> select username,destination,request_domain from dids where username='1111111111';<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("avpops","db_url","mysql://aaa:bbb@localhost/opensips")<br>modparam("avpops","avp_table","dids")<br>
<br><br>..............<br><br> avp_db_query("select destination, request_domain from dids where username='$rU'","$avp(s:destination);$avp(s:reqdomain)");<br> if ($avp(s:destination)==NULL)<br>
{<br> sl_send_reply("404","Not found");<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'Connor <span dir="ltr"><<a href="mailto:mike@oeg.com.au">mike@oeg.com.au</a>></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>
> You could use ENUM to translate SIP URIs to a particular outside peer<br>
> and use trusted peers table to match incoming calls.<br>
><br>
> Then you only need to add ENUM numbers in your DNS database and trusted<br>
> peers in your proxy database, no need to configure much in OpenSIPS<br>
> beside doing ENUM lookup and checking the trusted table.<br>
><br>
><br>
> On Sat, 2010-05-01 at 16:28 +0930, Mike O'Connor wrote:<br>
><br>
>> Hi All<br>
>><br>
>> I have a need to forward calls onward for a range of DID's, but the<br>
>> other end is not going to Register. I think this is called trunking.<br>
>><br>
>> I need to be able to configure the DID's and the ip/port there being on<br>
>> forwarded too.<br>
>> What methods should I use to do this ?<br>
>><br>
>> I've look at a number of options but the issue is that for the functions<br>
>> like 'seturi' do not allow variables only static strings.<br>
>><br>
>> Thanks<br>
>> Mike<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>
>><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>
><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>