[OpenSIPS-Users] DRouting Madness

Razvan Crainea razvan at opensips.org
Fri Feb 10 09:45:30 CET 2012


Hello, Anil!

You should replace the routeid column from your your dr_rules table with 
an empty value. Otherwise that routeid will be called every time the 
"do_routing" function is called, that's why the loop appears.

Regards,

--
Ra(zvan Crainea
OpenSIPS Developer
http://www.opensips-solutions.com


On 01/26/2012 07:56 PM, Anil M Pannikode wrote:
>
> 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]: 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.../
> >/  /
> >  
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120210/907e86d6/attachment-0001.htm>


More information about the Users mailing list