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

Script error on SIP ALG DETECTED #1

Closed
bpasquet opened this issue May 9, 2019 · 2 comments
Closed

Script error on SIP ALG DETECTED #1

bpasquet opened this issue May 9, 2019 · 2 comments

Comments

@bpasquet
Copy link

bpasquet commented May 9, 2019

Hello, I get an error when SIP ALG is detected and opensips server send a 500 ALG DETECTED return instead of 200 OK.

My prompt trace :

Traceback (most recent call last):
File "C:\Users\Ben\AppData\Local\Programs\Python\Python37-32\Scripts\pysipctl-script.py", line 11, in
load_entry_point('PySIP==0.1.3', 'console_scripts', 'pysipctl')()
File "C:\Users\Ben\AppData\Local\Programs\Python\Python37-32\lib\site-packages\click\core.py", line 764, in call
return self.main(*args, **kwargs)
File "C:\Users\Ben\AppData\Local\Programs\Python\Python37-32\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "C:\Users\Ben\AppData\Local\Programs\Python\Python37-32\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Ben\AppData\Local\Programs\Python\Python37-32\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Ben\AppData\Local\Programs\Python\Python37-32\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Ben\AppData\Local\Programs\Python\Python37-32\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "C:\Users\Ben\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pysip-0.1.3-py3.7.egg\pysip\cli.py", line 127, in aug
_, title = result["title"].split('200')
ValueError: not enough values to unpack (expected 2, got 1)

@bpasquet
Copy link
Author

bpasquet commented May 9, 2019

It can be simply resolved with :

if '200' in result["title"]:
_, title = result["title"].split('200')
else:
title = "NOK"

replacing line 127 :

_, title = result["title"].split('200')

@flaviogoncalves
Copy link
Member

Thank you for your contribution.

I will fix the code ASAP.

@bpasquet bpasquet closed this as completed May 9, 2019
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