Dears,
Am able to route call using LCR module from anywhere. I need to use certain option in the lcr tables in order to specify the ip of which calls is generated.
I suppose that the From_uri column in LCR module meets my requirement, yet am not able to make it work and confused after reading several docs.
My question is in what form should the from_uri column be? Is the ip enough?
Are the Load params used below missing?
modparam("lcr", "db_url","mysql://openser:openserrw@localhost/openser")
modparam("lcr","lcr_gw_table","lcr_gw")
modparam("lcr","from_uri_column","from_uri")
modparam("lcr","priority_column","priority")
modparam("lcr","gw_uri_avp", "$avp(i:709)")
modparam("lcr","ruri_user_avp", "$avp(i:500)")
modparam("lcr", "flags_avp", "$avp(i:712)")
modparam("lcr","lcr_id_avp","$avp(s:lcr_id_avp)")
What should I change in the routing script to consider the from_uri?
if (!load_gws("1")) {
sl_send_reply("503", "Unable To lOad GatEwAyS");
exit;}
if(!next_gw()){
sl_send_reply("503", "Unable To fInD a gateWaY");
exit;}
Thanks in advance,
F Chahrour
Fatima Chahrour~Vanrise Support writes:
I suppose that the From_uri column in LCR module meets my requirement, yet am not able to make it work and confused after reading several docs.
My question is in what form should the from_uri column be? Is the ip enough?
i my opinion syntax of from uri is pretty well described in README:
From-URI pattern and Request-URI pattern are regular expressions (see 'man pcresyntax' for syntax), an empty string, or NULL. An empty or NULL From-URI pattern, Request-URI pattern or prefix matches anything.
-- juha
Hi juha,
Sorry, where can I find the 'man pcresyntax' for syntax?
Can you please give me an example on what could a from-uri look like?
Am now using empty string wich is matching with any ip as mentioned below, but I need to route calls coming from specific IP's instead!
Thanks in advance and Kind Regards, F Chahrour
On Oct 2, 2012, at 4:10 PM, Juha Heinanen jh@tutpro.com wrote:
Fatima Chahrour~Vanrise Support writes:
I suppose that the From_uri column in LCR module meets my requirement, yet am not able to make it work and confused after reading several docs.
My question is in what form should the from_uri column be? Is the ip enough?
i my opinion syntax of from uri is pretty well described in README:
From-URI pattern and Request-URI pattern are regular expressions (see 'man pcresyntax' for syntax), an empty string, or NULL. An empty or NULL From-URI pattern, Request-URI pattern or prefix matches anything.
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Fatima Chahrour writes:
Sorry, where can I find the 'man pcresyntax' for syntax?
if you are not running linux, see this:
http://regexkit.sourceforge.net/Documentation/pcre/pcresyntax.html
Can you please give me an example on what could a from-uri look like?
Am now using empty string wich is matching with any ip as mentioned below, but I need to route calls coming from specific IP's instead!
this should work for you:
@1.2.3.4
where 1.2.3.4 is the ip.
-- juha