[Users] openser 1.2 migration questions

Alex Hermann alex at speakup.nl
Fri Jun 8 09:40:23 CEST 2007


On Thursday 07 June 2007 21:21, Zahid Mehmood wrote:
> Would it be relatively easier to provide the option for db mode again?

You can get the same -and more- functionality by using db_query, creating a 
list of destinations in the format and avp that next_gw() expects. ie
sip:|0 at destination;transport=udp
which can be stored directly in the db or use a CONCAT or similar to create it 
from separate fields.


modparam("lcr", "gw_uri_avp", "1400")
modparam("lcr", "ruri_user_avp", "1402")

if not avp_db_query("SELECT uri FROM pstn_gw WHERE '$(fU{s.escape.common})' 
LIKE callerid ORDER BY callerid DESC", "$avp(i:1400)") {
	INFO("Can't find PSTN gateways");
	sl_send_reply("500", "Cannot load gateways");
	return;
}
next_gw();
t_relay();
...

Performance will be very dependent on the complexity of the query.


-- 
Greetings,

Alex Hermann




More information about the sr-users mailing list