[OpenSIPS-Users] Do_Routing problem

Nick Khamis symack at gmail.com
Wed May 22 20:14:34 CEST 2013


Mismatched prefix between IDT BICS etc...?

N.

On 5/22/13, M.Khaled W Chehab <kchehab at icucall.com> wrote:
> Dear bogdan,
>
>
>
> Thanks for you  ,my problem been  solved
>
>
>
> Regards
>
> khaled
>
>
>
> From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> Sent: Wednesday, May 22, 2013 2:12 PM
> To: M.Khaled W Chehab
> Cc: 'OpenSIPS users mailling list'
> Subject: Re: [OpenSIPS-Users] Do_Routing problem
>
>
>
> 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 at opensips>
> "sip:pinger at 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,
>
>
>
>
>
>
>
> <http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_qu
> ery=SELECT+%2A+FROM+%60dr_carriers%60&goto=tbl_structure.php&display_options
> _form=1&display_text=F&token=4c290d9fc747fadbbb216f2d571c00ef> Description:
> Full Texts
>
>
> <http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_qu
> ery=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60id%60+AS
> C&token=4c290d9fc747fadbbb216f2d571c00ef> id
>
>
> <http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_qu
> ery=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60carrieri
> d%60+ASC&token=4c290d9fc747fadbbb216f2d571c00ef> carrierid
>
>
> <http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_qu
> ery=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60gwlist%6
> 0+ASC&token=4c290d9fc747fadbbb216f2d571c00ef> gwlist
>
>
> <http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_qu
> ery=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60flags%60
> +ASC&token=4c290d9fc747fadbbb216f2d571c00ef> flags
>
>
> <http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_qu
> ery=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60attrs%60
> +ASC&token=4c290d9fc747fadbbb216f2d571c00ef> attrs
>
>
> <http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_qu
> ery=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60descript
> ion%60+ASC&token=4c290d9fc747fadbbb216f2d571c00ef> description
>
> 	
>
> <http://5.104.224.33/phpmyadmin/tbl_change.php?db=opensips&table=dr_carriers
> &where_clause=%60dr_carriers%60.%60id%60+%3D+14&clause_is_unique=1&sql_query
> =SELECT+%2A+FROM+%60dr_carriers%60&goto=sql.php&token=4c290d9fc747fadbbb216f
> 2d571c00ef> Description: Edit
>
>
> <http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_qu
> ery=DELETE+FROM+%60opensips%60.%60dr_carriers%60+WHERE+%60dr_carriers%60.%60
> id%60+%3D+14&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Dopensips
> %26table%3Ddr_carriers%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560dr_carrier
> s%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure
> .php%26token%3D4c290d9fc747fadbbb216f2d571c00ef&token=4c290d9fc747fadbbb216f
> 2d571c00ef> Description: Delete
>
> 14
>
> Lebanon
>
> Dahdah_JVS,Bics,IDT,Snell_93
>
> 0
>
>
>
>
>
> 									
>
>
>
> And the problem still exists, please advice
>
> Regards
>
>
>
>
>
> From: Bogdan-Andrei Iancu [mailto:bogdan at 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 at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list