[OpenSIPS-Devel] [ opensips-Bugs-3557901 ] dialplan results not consistent

SourceForge.net noreply at sourceforge.net
Wed Aug 15 15:28:39 CEST 2012


Bugs item #3557901, was opened at 2012-08-15 06:01
Message generated for change (Comment added) made by rrevels
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3557901&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Richard Revels (rrevels)
Assigned to: Nobody/Anonymous (nobody)
Summary: dialplan results not consistent

Initial Comment:
When opensips is first loaded and a dialplan lookup function is called the result is different than after a MI dialplan reload command is issued and the same lookup is done.  The results also don't match my expectations in either case but that may be me not keeping up with changes in the regex parser.  So, anyway, this is what I'm seeing in my logs when calling +19198788990

On initial proxy load:

Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: Doing dialplan lookup in route fix ruri 
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:dp_translate_f: dpid is 30
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:dp_get_svalue: searching 14 
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:dp_translate_f: input is sip:+19198788990 at X.XX.XX.XX
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:translate: regex operator testing
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:test_match: test_match:[0] sip:+19198788990 at X.XX.XX.XX
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:translate: found a matching rule 0x2b0c6e160b80: pr 100, match_exp .*
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:translate: the rule's attrs are restrc
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:translate: the copied attributes are: restrc
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:test_match: test_match:[0] sip:+19198788990 at X.XX.XX.XX
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:rule_translate: simply replace the string, subst_comp 0x2b0c6e160a50, n_escapes 0
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: DBG:dialplan:dp_translate_f: input sip:+19198788990 at X.XX.XX.XX with dpid 30 => output invalid
Aug 15 12:45:49 trunking1 /usr/local/sbin/opensips[15244]: Got destination type of restrc from dialplan and set destination to invalid 


After MI reload dialplan issued:

Aug 15 12:48:18 trunking1 /usr/local/sbin/opensips[15247]: Doing dialplan lookup in route fix ruri 
Aug 15 12:48:18 trunking1 /usr/local/sbin/opensips[15247]: DBG:dialplan:dp_translate_f: dpid is 30
Aug 15 12:48:18 trunking1 /usr/local/sbin/opensips[15247]: DBG:dialplan:dp_get_svalue: searching 14 
Aug 15 12:48:18 trunking1 /usr/local/sbin/opensips[15247]: DBG:dialplan:dp_translate_f: input is sip:+19198788990 at X.XX.XX.XX
Aug 15 12:48:18 trunking1 /usr/local/sbin/opensips[15247]: DBG:dialplan:dp_translate_f: no information available for dpid 30
Aug 15 12:48:18 trunking1 /usr/local/sbin/opensips[15247]: Did not get indication of match in dialplan call with sip:+19198788990 at X.XX.XX.XX 

I'm sure this will paste badly but here are the rules I'm using for this lookup:

+----+------+-----+----------+----------------------------------+-----------+--------------------------+----------+----------+-------------+
| id | dpid | pr  | match_op | match_exp                        | match_len | subst_exp                | repl_exp | disabled | attrs       |
+----+------+-----+----------+----------------------------------+-----------+--------------------------+----------+----------+-------------+
| 31 |   30 |  40 |        1 | sip:011.*                        |         0 | (011)(.*)@.*             | +\2      |        0 | intl        | 
| 19 |   30 |  49 |        1 | sip:([1]?...5551212|411|1411)@.* |         0 | .*                       | +1411    |        0 | information | 
| 10 |   30 |  50 |        1 | sip:(\+1888|1888|888)[0-9]{7}@.* |         0 | (\+?[1]?)([2-9][0-9]{9}) | +1\2     |        0 | tollfree    | 
| 18 |   30 |  50 |        1 | sip:(\+1800|1800|800)[0-9]{7}@.* |         0 | (\+?[1]?)([2-9][0-9]{9}) | +1\2     |        0 | tollfree    | 
| 13 |   30 |  50 |        1 | sip:(\+1866|1866|866)[0-9]{7}@.* |         0 | (\+?[1]?)([2-9][0-9]{9}) | +1\2     |        0 | tollfree    | 
| 14 |   30 |  50 |        1 | sip:(\+1877|1877|877)[0-9]{7}@.* |         0 | (\+?[1]?)([2-9][0-9]{9}) | +1\2     |        0 | tollfree    | 
| 42 |   30 |  50 |        1 | sip:(\+1911|1911|911)@.*         |         0 | (\+?[1]?)(911)           | +1\2     |        0 | emergency   | 
| 17 |   30 |  99 |        1 | sip:\+1[2-9][0-9]{9}@.*          |         0 | (\+?[1]?)([2-9][0-9]{9}) | +1\2     |        0 | domestic    | 
| 16 |   30 |  99 |        1 | sip:([1])?([2-9][0-9]{9})@.*     |         0 | (\+?[1]?)([2-9][0-9]{9}) | +1\2     |        0 | domesticno+ | 
| 25 |   30 | 100 |        1 | .*                               |         0 | .*                       | invalid  |        0 | restrc      | 
+----+------+-----+----------+----------------------------------+-----------+--------------------------+----------+----------+-------------+




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

>Comment By: Richard Revels (rrevels)
Date: 2012-08-15 06:28

Message:
Oh, by the way, this is also in my logs and looks like a few too many
entries for the number of records I have:


Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 100
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 40
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 49
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 99
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 99
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 100
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 99
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 99
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 50
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 49
Aug 15 12:48:11 trunking1 /usr/local/sbin/opensips[15237]:
DBG:dialplan:destroy_rule: destroying rule with priority 40


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3557901&group_id=232389



More information about the Devel mailing list