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

cannot handle hints (and crash on W_ARROW) #35

Open
owoschhodan opened this issue Dec 21, 2018 · 1 comment
Open

cannot handle hints (and crash on W_ARROW) #35

owoschhodan opened this issue Dec 21, 2018 · 1 comment

Comments

@owoschhodan
Copy link

owoschhodan commented Dec 21, 2018

exten => 151,hint,Custom:test,CustomPresence:mypresence01

leads to

./dialplan.conf:70 I_NOTIMPL_HINT: the dialplan hint directive has not been implemented yet

exten = 151,hint,Custom:test,CustomPresence:mypresence01

which is a valid Asterisk syntax for defining hints
leads to a crash:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/asterisklint/config.py", line 186, in __iter__
    self.on_varset(element)
  File "/usr/local/lib/python3.6/dist-packages/asterisklint/dialplan.py", line 600, in on_varset
    dialplanvarset = DialplanVarset.from_varset(varset)
  File "/usr/local/lib/python3.6/dist-packages/asterisklint/dialplan.py", line 473, in from_varset
    assert varset.arrow  # W_ARROW
AssertionError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/asterisklint", line 34, in <module>
    sys.exit(main(sys.argv[1:], os.environ))
  File "/usr/local/lib/python3.6/dist-packages/asterisklint/main.py", line 178, in main
    return command_module.main(args, envs)
  File "/usr/local/lib/python3.6/dist-packages/asterisklint/mainutil.py", line 35, in __call__
    return self.handle_args(args)
  File "/usr/local/lib/python3.6/dist-packages/asterisklint/commands/dialplan-check.py", line 50, in handle_args
    dialplan = next(iter(parser))
  File "/usr/local/lib/python3.6/dist-packages/asterisklint/config.py", line 192, in __iter__
    raise ProgrammingError(str(element.where)) from exc
asterisklint.config.ProgrammingError: An unexpected exception was raised. This is most likely a bug in the asterisklint library. If you can reproduce the problem and file an issue on the bug tracker, that would be nice. Further info: ./dialplan.conf:12
@wdoekes
Copy link
Member

wdoekes commented Dec 21, 2018

Thank you for raising attention to this issue.

Hints are indeed not supported yet. I don't use them myself, so I don't have much incentive to look into that any time soon unfortunately. PRs are gladly accepted though :)

The crash that happens on W_ARROW however should not happen, so I will be looking into that.

@wdoekes wdoekes changed the title cannot handle hints cannot handle hints (and crash on W_ARROW) Dec 21, 2018
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

No branches or pull requests

2 participants