[OpenSIPS-Users] DRouting Madness

Anil M Pannikode anilpannikode at hotmail.com
Thu Jan 26 16:32:16 CET 2012


 

I am running in to the same issue as the below attached post. Any solutions
?

 

My dr tables have the following entries.

 

+------+------+--------------+-------+------------+-------+------------+----
-----------+

| gwid | type | address      | strip | pri_prefix | attrs | probe_mode |
description   |

+------+------+--------------+-------+------------+-------+------------+----
-----------+

|    3 |    1 | 10.10.20.201 |     0 | NULL       | NULL  |          2 |
eivr1  |

|    4 |    1 | 10.10.20.202 |     0 | NULL       | NULL  |          2 |
eivr2  |

|    5 |    2 | 10.10.20.181 |     0 | NULL       | NULL  |          2 |
eivr3  |

+------+------+--------------+-------+------------+-------+------------+----
-----------+

 

 

+----+----------+--------+---------+-------------+

| id | username | domain | groupid | description |

+----+----------+--------+---------+-------------+

|  1 | .*       | .*     |       0 | Everyone    |

+----+----------+--------+---------+-------------+

 

+----+--------+-------------+

| id | gwlist | description |

+----+--------+-------------+

|  2 | 3,4    | list1         |

|  3 | 5      | list2          |

+----+--------+-------------+

 

 

+--------+---------+-------------+---------+----------+---------+--------+--
-------------+-------+

| ruleid | groupid | prefix      | timerec | priority | routeid | gwlist |
description   | attrs |

+--------+---------+-------------+---------+----------+---------+--------+--
-------------+-------+

|      7 | 0       | 12065555555 |         |        0 | 4       | #3     |
Route 1           | NULL  |

|      8 | 0       |                        |         |        0 | 4       |
#2     | Default Route | NULL  |

+--------+---------+-------------+---------+----------+---------+--------+--
-------------+-------+

 

 

 

Anil

 

 

> 
> Hello All,
> 
>                 I've been posing this question in IRC, but haven't had 
> any luck with a lead...
> 
>                 I'm trying to setup DRouting and I think I'm really 
> close, but for some reason when I get into my drouting subroute (in 
> this case route[4]) it matches from a row in the database on the first 
> try, but continues to loop through that subroute up to 32 additional 
> times before starting to throw errors. I'll attach a snippet here to 
> illustrate:
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:core:parse_headers: 
> flags=10
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:core:parse_to_param: 
> tag=as3cde8572
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:core:parse_to: end of 
> header reached, state=29
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:core:parse_to: 
> display={"username_of_caller"}, 
> ruri={sip:username_of_caller at address_of_caller
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users> }
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> using dr group 0
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: 
> DBG:drouting:internal_check_rt: found rgid 0 (rule list 0xa741465c)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[4] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: CRITICAL:core:eval_expr: 
> too many expressions (101)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: WARNING:core:do_action: 
> error in expression (l=387)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: CRITICAL:core:eval_expr: 
> too many expressions (101)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: WARNING:core:do_action: 
> error in expression (l=391)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DEBUG: >>>BEGIN: route[1] 
> Block -->
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: CRITICAL:core:eval_expr: 
> too many expressions (101)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: WARNING:core:do_action: 
> error in expression (l=369)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: CRITICAL:core:eval_expr: 
> too many expressions (101)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: WARNING:core:do_action: 
> error in expression (l=372)
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> setting GW attr [] as for ruri
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> setting GW id [1] as avp
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> setting RULE id [3] as avp
> 
> Jan 18 01:39:06 core01 /sbin/opensips[8489]: DBG:drouting:do_routing: 
> setting the gw [0] as ruri "sip:NXXNXXNXXX at
address_of_gateway_from_mysql
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users> "
> 
> It continues, then, to loop through my first subroute (the same number 
> of times as route[4] hits) and then dies... One important thing to 
> note is that if I throw an xlog() the line after the do_routing() 
> call, it doesn't fire between the loops... the looping seems to happen 
> within the function...
> 
> An ngrep packet capture reveals that there is a copy of the INVITE 
> sent to the gateway for every one of the attempts. The gateway 
> responds after the flood with a "500: Server Error", which is 
> ironically correctly forwarded back to the caller address (so the 
> record_route() seems to be working).
> 
> My subroute is as follows:
> 
> route[4] {
> 
>         #log that we're trying dynamically at least
> 
>         xlog("DEBUG: >>>BEGIN: route[4] Block -->\n");
> 
>         if (!do_routing("0")) {
> 
>                 xlog("!do_routing: No Rules matching the URI\n");
> 
>                 send_reply("503", "No Rules matching the URI");
> 
>                 exit;
> 
>         }
> 
>         if (is_method("INVITE")) {
> 
>                 t_on_failure("4");
> 
>         }
> 
>         route(1);
> 
> }
> 
> There seems to be precedence for this problem as I found a pastebin 
> containing the exact same issue from Feb 17, 2011 -- but no resolution 
> was discernible...
> 
> I apologize in advance if this isn't the proper forum for this 
> question, but I'm getting desperate to get this working and didn't 
> know where else to go.
> 
> Thanks in Advance,
> 
> Chris
> 
> chris.dye at paragon.net
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users> 
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.opensips.org/pipermail/users/attachments/20120118/7fb2829e/att
achment-0001.htm>
  _____  


*	Previous message: [OpenSIPS-Users] DRouting Madness
<http://lists.opensips.org/pipermail/users/2012-January/020497.html> 
*	Next message: [OpenSIPS-Users] get expires when I login to sip
server  <http://lists.opensips.org/pipermail/users/2012-January/020498.html>

*	Messages sorted by: [ date ]
<http://lists.opensips.org/pipermail/users/2012-January/date.html#20567>  [
thread ]
<http://lists.opensips.org/pipermail/users/2012-January/thread.html#20567>
[ subject ]
<http://lists.opensips.org/pipermail/users/2012-January/subject.html#20567>
[ author ]
<http://lists.opensips.org/pipermail/users/2012-January/author.html#20567>  

  _____  

More information about the Users mailing list
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120126/cc41712a/attachment-0001.htm>


More information about the Users mailing list