#553 dialplan results not consistent

trunk
closed-fixed
modules (454)
5
2014-08-21
2012-08-15
No

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@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@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@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@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@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@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 |
+----+------+-----+----------+----------------------------------+-----------+--------------------------+----------+----------+-------------+

Discussion

<< < 1 2 (Page 2 of 2)
  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> liviuchircu
     
  • Bogdan-Andrei Iancu

    Hi Richard,

    There was a fixing on trunk for this - could you please update from SVN trunk and see if everything ok now?

    Thanks and regards,
    Bogdan

     
  • Richard Revels

    Richard Revels - 2012-09-18

    It appears the dialplan reload MI command now works as expected. There are other things not working as expected now though. Is work still going on in the module code? If not, I will open another tracker as the original issue this was opened for appears resolved.

     
  • Bogdan-Andrei Iancu

    The work over the modules was completed, so if you have any other issues, open other tickets, I will close this one.

    Thanks,
    Bogdan

     
  • Bogdan-Andrei Iancu

    • status: open --> closed-fixed
     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.