[OpenSIPS-Users] Trunking Calls Onward
Laszlo
laszlo at voipfreak.net
Sun May 2 01:06:50 CEST 2010
Hi Mike,
With mysql, you can try this too (just an example):
mysql> select username,destination,request_domain from dids where
username='1111111111';
+------------+-----------------------+----------------+
| username | destination | request_domain |
+------------+-----------------------+----------------+
| 111111111 | sip:11.11.11.11:5060 | whatever.com |
+------------+-----------------------+----------------+
modparam("avpops","db_url","mysql://aaa:bbb@localhost/opensips")
modparam("avpops","avp_table","dids")
..............
avp_db_query("select destination, request_domain
from dids where username='$rU'","$avp(s:destination);$avp(s:reqdomain)");
if ($avp(s:destination)==NULL)
{
sl_send_reply("404","Not found");
exit;
};
$du = $avp(s:destination);
$rd = $avp(s:reqdomain);
t_relay();
exit;
............
Not sure about the performance under a heavy inbound traffic (because of the
mysql queries).
-Laszlo
2010/5/1 Mike O'Connor <mike at oeg.com.au>
> So there is no way for me to read from a db and rewrite the sip host and
> port ?
>
> Mike
>
> On 1/05/10 4:35 PM, Adrian Georgescu wrote:
> > You could use ENUM to translate SIP URIs to a particular outside peer
> > and use trusted peers table to match incoming calls.
> >
> > Then you only need to add ENUM numbers in your DNS database and trusted
> > peers in your proxy database, no need to configure much in OpenSIPS
> > beside doing ENUM lookup and checking the trusted table.
> >
> >
> > On Sat, 2010-05-01 at 16:28 +0930, Mike O'Connor wrote:
> >
> >> Hi All
> >>
> >> I have a need to forward calls onward for a range of DID's, but the
> >> other end is not going to Register. I think this is called trunking.
> >>
> >> I need to be able to configure the DID's and the ip/port there being on
> >> forwarded too.
> >> What methods should I use to do this ?
> >>
> >> I've look at a number of options but the issue is that for the functions
> >> like 'seturi' do not allow variables only static strings.
> >>
> >> Thanks
> >> Mike
> >>
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>
> >>
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100502/02a3dfbe/attachment-0001.htm
More information about the Users
mailing list