Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialplan: don't try to translate on dp_match() #1953

Merged
merged 1 commit into from May 15, 2019

Conversation

linuxmaniac
Copy link
Member

INFO: <script>: SET_DST trying to get dialplan from dpid:101000 - ci'1cf77cbb5baebdbd0e8635e1116aa713@PBX-2797.xpbx.foehn.co.uk'
DEBUG: dialplan [dialplan.c:232]: dp_get_ivalue(): searching 15
DEBUG: dialplan [dialplan.c:240]: dp_get_ivalue(): dpid is 101000 from pv argument
DEBUG: dialplan [dialplan.c:249]: dp_get_svalue(): searching 7 
DEBUG: dialplan [dialplan.c:345]: dp_translate_f(): input is 0034654205681
DEBUG: dialplan [dp_repl.c:606]: dp_translate_helper(): regex operator testing over [0034654205681]
DEBUG: dialplan [dp_repl.c:681]: dp_translate_helper(): found a matching rule 0x7f065c2818d0: pr 1, match_exp ^00([1-9][0-35-9]|[1-35-9][0-9])[0-9]+$
DEBUG: dialplan [dp_repl.c:688]: dp_translate_helper(): the rule's attrs are cli=+34654205682;action=0
DEBUG: dialplan [dp_repl.c:699]: dp_translate_helper(): the copied attributes are: cli=+34654205682;action=0
ERROR: dialplan [dp_repl.c:439]: rule_translate(): the string 0034654205681 matched the match_exp ^00([1-9][0-35-9]|[1-35-9][0-9])[0-9]+$ but not the subst_exp ^([1-9][0-9]{8})$!
ERROR: dialplan [dp_repl.c:730]: dp_translate_helper(): could not build the output
DEBUG: dialplan [dialplan.c:350]: dp_translate_f(): could not translate 0034654205681 with dpid 101000
INFO: <script>: SET_DST  no valid subst_exp for '0034654205681' trying to match - ci='1cf77cbb5baebdbd0e8635e1116aa713@PBX-2797.xpbx.foehn.co.uk'
DEBUG: dialplan [dp_repl.c:606]: dp_translate_helper(): regex operator testing over [0034654205681]
DEBUG: dialplan [dp_repl.c:681]: dp_translate_helper(): found a matching rule 0x7f065c2818d0: pr 1, match_exp ^00([1-9][0-35-9]|[1-35-9][0-9])[0-9]+$
DEBUG: dialplan [dp_repl.c:688]: dp_translate_helper(): the rule's attrs are cli=+34654205682;action=0
DEBUG: dialplan [dp_repl.c:699]: dp_translate_helper(): the copied attributes are: cli=+34654205682;action=0
DEBUG: <script>: SET_DST $var(dp_attrs):cli=+34654205682;action=0 action:0 - ci='1cf77cbb5baebdbd0e8635e1116aa713@PBX-2797.xpbx.foehn.co.uk'

Pre-Submission Checklist

  • Commit message has the format required by CONTRIBUTING guide
  • Commits are split per component (core, individual modules, libs, utils, ...)
  • Each component has a single commit (if not, squash them into one commit)
  • No commits to README files for modules (changes must be done to docbook files
    in doc/ subfolder, the README file is autogenerated)

Type Of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)

Checklist:

Description

changing dp_replace_helper() to pass a NULL value indicating no output is needed ( no need to do subst ) to dp_translate_helper()

@linuxmaniac
Copy link
Member Author

is that the correct behavior for dp_match()? That is what I understand from the description

6.2.  dp_match(dpid, inval)

   The function matches the input value 'inval' using the rules with
   dialplan id 'dpid'. If the rule that was applied has attributes, they
   are stored in the variable provided via the module parameter
   'attrs_pvar'.

@linuxmaniac linuxmaniac requested a review from miconda May 15, 2019 09:01
@linuxmaniac linuxmaniac merged commit cced237 into master May 15, 2019
@linuxmaniac linuxmaniac deleted the vseva/dialplan_fix branch May 15, 2019 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant