[OpenSIPS-Users] Dynamic Routing never routes call

Mark Farmer farmorg at gmail.com
Fri Jan 25 10:06:17 EST 2019


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 at 10.98.0.11]
DBG:core:db_free_columns: freeing result columns at 0x7f5cf8f9b720
DBG:core:db_free_rows: freeing 1 rows
DBG:core:db_free_row: freeing row values at 0x7f5cf8f9b780
DBG:core:db_free_rows: freeing rows at 0x7f5cf8f9b770
DBG:core:db_free_result: freeing result set at 0x7f5cf8f9b6d8
DBG:dialplan:dp_translate_f: dpid is 1 partition is default
DBG:dialplan:dp_get_svalue: searching 15
DBG:dialplan:dp_translate_f: input is +441423369031
DBG:dialplan:dp_translate_f: Checking with dpid 1
DBG:dialplan:translate: Regex operator testing. Got result: -1
DBG:dialplan:test_match: test_match:[0] +441423369031
DBG:dialplan:translate: Regex operator testing. Got result: 0
DBG:dialplan:translate: Found a matching rule 0x7f5cf7233908: pr 1,
match_exp \+[1-9][0-9]+$
DBG:dialplan:test_match: test_match:[0] +441423369031
DBG:dialplan:test_match: test_match:[1] 441423369031
DBG:dialplan:dp_translate_f: input +441423369031 with dpid 1 => output
441423369031
DBG:drouting:do_routing_1: matching prefix with strict len
DBG:drouting:do_routing: using dr group 1, rule_idx 0, username 441423369031
DBG:drouting:internal_check_rt: found rgid 1 (rule list 0x7f5cf72360a8)
DBG:drouting:push_gw_for_usage: adding gw [testpbx1] as "
sip:01423369031 at 10.98.0.11" in order 0
DBG:drouting:push_gw_for_usage: setting GW id [testpbx1] as avp
DBG:drouting:push_gw_for_usage: setting GW attr [testpbx1] as avp
DBG:drouting:do_routing: setting RULE attr [rule_441423369031]
DBG:core:parse_headers: flags=10000
DBG:auth:pre_auth: credentials with given realm not found
Jan 25 15:00:39 tsip3 /usr/local/sbin/opensips[12173]: ----- gw attr is
<null>
Jan 25 15:00:39 tsip3 /usr/local/sbin/opensips[12173]: ----- ruri is
sip:01423369031 at 10.98.0.11
Jan 25 15:00:39 tsip3 /usr/local/sbin/opensips[12173]: proxy: MF - Fell
into proxy auth



On Fri, 25 Jan 2019 at 14:51, Mark Farmer <farmorg at gmail.com> wrote:

> Hello all
>
> Very new OpenSIPS user trying to build my first real server.
>
> Using debug logging I can see that my alias/dialplan operations seem to be
> working but when it reaches the do_routing the call never actually gets
> routed.
>
> I've been trying to get this working for nearly 2 weeks now and I'm at a
> loss now. Please can someone help me?
>
> From my script:
>
>         $avp(gw_whitelist) = "testpbx1";
>         if (
> !do_routing("1","L","$avp(gw_whitelist)","$avp(rules_attributes)","$avp(gw_attributes)"))
> {
>           send_reply("404","DID not found");
>           xlog("do_routing: No rules matching the URI\n");
>           exit;
>
> Oddly, I never get the no rules log entry but it drops out of here & into
> the else if below which forces proxy auth.
>
> My DB:
>
> dr gateways
>
> +----+--------------+------+---------------------+-------+------------+--------------+------------+-------+--------+-------------+
> | id | gwid         | type | address             | strip | pri_prefix |
> attrs        | probe_mode | state | socket | description |
>
> +----+--------------+------+---------------------+-------+------------+--------------+------------+-------+--------+-------------+
> |  2 | BT_SDIN_BCTE |    1 | sip:xxx.xxx.xxx.xxx   |     0 |            |
> BT_SDIN_BCTE |          2 |     0 |        | Inbound     |
> |  3 | BT_SDIN_GDH  |    1 | sip:xxx.xxx.xxx.xxx   |     0 |            |
> BT_SDIN_GDH  |          2 |     0 |        | Inbound     |
> |  1 | BT_SDIN_LFH  |    1 | sip:xxx.xxx.xxx.xxx |     0 |            |
> BT_SDIN_LFH  |          2 |     0 |        | Inbound     |
> |  4 | BT_SDIN_SEH  |    1 | sip:xxx.xxx.xxx.xxx  |     0 |            |
> BT_SDIN_SEH  |          2 |     0 |        | Inbound     |
> |  5 | testpbx1     |    1 | sip:10.98.0.11      |     2 | 0          |
> testpbx1     |          2 |     0 |        | Inbound     |
>
> +----+--------------+------+---------------------+-------+------------+--------------+------------+-------+--------+-------------+
> dr groups
> +----+--------------+----------------------------+---------+-------------+
> | id | username     | domain                     | groupid | description |
> +----+--------------+----------------------------+---------+-------------+
> |  7 | 441423369031 | 10.98.0.11                 |       1 |             |
> |  6 | 441423369031 | my.domain |       2 |             |
> +----+--------------+----------------------------+---------+-------------+
> dr carriers
>
> +----+-----------+--------------------------------------------------+-------+-------+-------+-------------+
> | id | carrierid | gwlist                                           |
> flags | state | attrs | description |
>
> +----+-----------+--------------------------------------------------+-------+-------+-------+-------------+
> |  1 | BT        | BT_SDIN_BCTE,BT_SDIN_GDH,BT_SDIN_LFH,BT_SDIN_SEH |
> 0 |     0 |       | BT SDIN     |
>
> +----+-----------+--------------------------------------------------+-------+-------+-------+-------------+
> dr rules
>
> +--------+---------+--------------+---------+----------+---------+----------+-------------------+------------------+
> | ruleid | groupid | prefix       | timerec | priority | routeid | gwlist
>   | attrs             | description      |
>
> +--------+---------+--------------+---------+----------+---------+----------+-------------------+------------------+
> |     13 | 1       | 441423369031 |         |        0 |         |
> testpbx1 | rule_441423369031 | Send to testpbx1 |
>
> +--------+---------+--------------+---------+----------+---------+----------+-------------------+------------------+
>
>
>
> --
> Mark Farmer
> farmorg at gmail.com
>


-- 
Mark Farmer
farmorg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190125/301c9e28/attachment.html>


More information about the Users mailing list