Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-26 Thread John Quick
Hi Mark, Liviu made a mistake in his last response to you. He picked out the debug at the end of the drouting process, not the beginning. Perhaps he had the screen upside down. From the debug it is clear that do_routing behaved correctly and has worked. So the problem is either that you have

Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-25 Thread Liviu Chircu
Hi, Mark! Notice this log: Jan 25 15:00:39 tsip3 /usr/local/sbin/opensips[12173]: - ruri is sip:01423369031@10.98.0.11 ... and your drouting rule:

Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-25 Thread Mark Farmer
OK, that's changed something! I'm now getting 'do_routing: No rules matching the URI' in my log - so I guess I need to review the rules. Many thanks for the help so far!! On Fri, 25 Jan 2019 at 15:35, Jon Abrams wrote: > You have the t_relay() in the do_routing() failure code section. Move

Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-25 Thread Jon Abrams
You have the t_relay() in the do_routing() failure code section. Move it afterwards: $avp(gw_whitelist) = "testpbx1"; if ( !do_routing("1","L","$avp(gw_whitelist)","$avp(rules_attributes)","$avp(gw_attributes)")) { send_reply("404","DID not found");

Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-25 Thread Jennifer Hashimoto
You are only going into the block that you put the relay in if your do_routing fails. pay attention to the ! which means NOT --- Jennifer Akemi Hashimoto Caztel Communications jennifer.hashim...@caztel.com

Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-25 Thread Mark Farmer
Thanks Jim. I now have: $avp(gw_whitelist) = "testpbx1"; if ( !do_routing("1","L","$avp(gw_whitelist)","$avp(rules_attributes)","$avp(gw_attributes)")) { t_relay(); send_reply("404","DID not found"); xlog("do_routing: No rules matching the URI\n");

Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-25 Thread Mark Farmer
A little more info from the logs: DBG:db_mysql:db_mysql_str2val: converting STRING [+441423369031] DBG:db_mysql:db_mysql_str2val: converting STRING [10.98.0.11] DBG:alias_db:alias_db_query: new URI [0] is [sip:+441423369031@10.98.0.11] DBG:core:db_free_columns: freeing result columns at

Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-25 Thread Jim DeVito
Are you missing the actual relay part? I'm pretty sure do_routing just loads routing info from the database but you sill need to call the actual relay. Put a t_relay() after the IF statement and see what happens. Also look at the docs regarding capturing and displaying the return code from