Kaled,

You need to pay a bit of attention on what you are doing and try to understand things - simply throeing some lines into the script, without being consistent, will not make your script work and simply waste our time here.

So, one more time:

1) the drouting "modparams" I gave you were correlated with the AVP names in the xlogs I gave you.

2) In your post, the output of the xlog line with "Destinations are" is missing

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/21/2013 10:03 PM, M.Khaled W Chehab wrote:

Hi,

 

I set in dr_rules     #lebanon   as a carrier route to terminate the  rule that match 777961 ,

Please find below the output for your script

 

loadmodule "drouting.so"

modparam("drouting", "db_url", "virtual://set1") # CUSTOMIZE ME

modparam("drouting", "use_domain", 1)

modparam("drouting", "drd_table", "dr_gateways")

modparam("drouting", "drr_table", "dr_rules")

modparam("drouting", "drg_table", "dr_groups")

modparam("drouting", "drc_table", "dr_carriers")

modparam("drouting", "drg_user_col", "username")

modparam("drouting", "drg_domain_col", "domain")

modparam("drouting", "drg_grpid_col", "groupid")

modparam("drouting", "force_dns", 1)

#frequency of probing per paramete in seconds

modparam("drouting", "probing_interval", 120)

modparam("drouting", "probing_method", "OPTIONS")

modparam("drouting", "probing_from", "sip:pinger@opensips")

modparam("drouting", "probing_reply_codes", "487")

#501, 403,404,

modparam("drouting", "use_domain", 1)

modparam("drouting", "gw_attrs_avp", '$avp(gw_attrs)')

modparam("drouting", "gw_id_avp", '$avp(gw_id)')

modparam("drouting", "rule_attrs_avp", '$avp(rule_attrs)')

 

modparam("drouting","ruri_avp", "$avp(dr_ruri)")

modparam("drouting","rule_id_avp", "$avp(dr_rule)")

modparam("drouting","rule_attrs_avp", "$avp(dr_rule_attrs)")

modparam("drouting","rule_prefix_avp", "$avp(dr_rule_prefix)")

modparam("drouting","carrier_id_avp", "$avp(dr_cr)")

modparam("drouting","carrier_attrs_avp", "$avp(dr_cr_attrs)")

 

 

 

GW IDs are      : <null>

GW ATTRs are    : <null>

CR IDs are      : Lebanon, Lebanon, Lebanon, Lebanon, 

CR ATTRs are    : , , , , 

RULE: id=104, , attrs=0, , prefix=777961, 

 

 

Description: Full Texts

id

carrierid

gwlist

flags

attrs

description


Description: Edit

Description: Delete

14

Lebanon

Dahdah_JVS,Bics,IDT,Snell_93

0

 

 










 

And the problem still exists, please advice

Regards

 

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Tuesday, May 21, 2013 8:00 PM
To: OpenSIPS users mailling list
Cc: M.Khaled W Chehab
Subject: Re: [OpenSIPS-Users] Do_Routing problem

 

Hello,

You can check what do_routing() set (as GWs to be used) by adding this in your script (just after do_routing):

        xlog("Destinations are: $ru $(avp(dr_ruri)[*]) \n");
        xlog("GW IDs are      : $(avp(dr_gw)[*]) \n");
        xlog("GW ATTRs are    : $(avp(dr_gw_attrs)[*]) \n");
        xlog("CR IDs are      : $(avp(dr_cr)[*]) \n");
        xlog("CR ATTRs are    : $(avp(dr_cr_attrs)[*]) \n");
        xlog("RULE: id=$(avp(dr_rule)[*]), attrs=$(avp(dr_rule_attrs)[*]), prefix=$(avp(dr_rule_prefix)[*]) \n");

Be sure you have these params set:

modparam("drouting","ruri_avp", "$avp(dr_ruri)")
modparam("drouting","gw_id_avp", "$avp(dr_gw)")
modparam("drouting","gw_attrs_avp", "$avp(dr_gw_attrs)")
modparam("drouting","rule_id_avp", "$avp(dr_rule)")
modparam("drouting","rule_attrs_avp", "$avp(dr_rule_attrs)")
modparam("drouting","rule_prefix_avp", "$avp(dr_rule_prefix)")
modparam("drouting","carrier_id_avp", "$avp(dr_cr)")
modparam("drouting","carrier_attrs_avp", "$avp(dr_cr_attrs)")

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/21/2013 06:17 PM, M.Khaled W Chehab wrote:

Hi,

 

I am using opensips 1.8.3

I set three gateways  in carrier route ,  the call always go to  the 1st and jump to  third gateway  and ignores the second

 

Moreover  I can see in debug level 4 ,

DBG:drouting:push_gw_for_usage: adding gw [gw1] in order 0 adding gw [gw2]  in order 1 adding gw [gw3] in order 3

 

But using wireshark I can just see the invite to the first and the third

 

Please advice

 

 
 
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to