[OpenSIPS-Users] DRouting Madness (Anil M Pannikode)

Christopher Dye chris.dye at paragon.net
Thu Feb 9 17:44:42 CET 2012


Clear out your 'routeid' make it NULL

-----Original Message-----
From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of users-request at lists.opensips.org
Sent: Thursday, February 09, 2012 10:37 AM
To: users at lists.opensips.org
Subject: Users Digest, Vol 43, Issue 18

Send Users mailing list submissions to
        users at lists.opensips.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.opensips.org/cgi-bin/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
        users-request at lists.opensips.org

You can reach the person managing the list at
        users-owner at lists.opensips.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of Users digest..."


Today's Topics:

   1. Re: DRouting Madness (Anil M Pannikode)


----------------------------------------------------------------------

Message: 1
Date: Thu, 26 Jan 2012 10:32:16 -0500
From: Anil M Pannikode <anilpannikode at hotmail.com>
Subject: Re: [OpenSIPS-Users] DRouting Madness
To: <users at lists.opensips.org>
Message-ID: <BLU149-DS111AE6A8CB7804AC45E921B8890 at phx.gbl>
Content-Type: text/plain; charset="us-ascii"



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.htm>

------------------------------

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


End of Users Digest, Vol 43, Issue 18
*************************************



More information about the Users mailing list