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

force_send_socket now requires proto? in d29cd9d (devel) #447

Closed
hydrosine opened this issue Apr 1, 2015 · 3 comments
Closed

force_send_socket now requires proto? in d29cd9d (devel) #447

hydrosine opened this issue Apr 1, 2015 · 3 comments
Assignees
Milestone

Comments

@hydrosine
Copy link

version: opensips 2.2-dev (x86_64/linux)
git revision: d29cd9d

Unable to get force_send_socket to work without a proto. While it should be optional according to docs.
Working syntax in 1.10/1.11: (yes with quotes)
force_send_socket("12.12.21.12");

Output in devel:
Apr 1 14:12:32 SRV-DEV-HPROXY-1 opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 445, column 32-33: syntax error
Apr 1 14:12:32 SRV-DEV-HPROXY-1 opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 445, column 33-34: bad argument, [proto:]host[:port] expected

The following syntaxes do not work (also tried with quotes). While they should in my opinion:
force_send_socket(12.12.21.12);
force_send_socket(12.12.21.12:5060);

Working:
force_send_socket(udp:12.12.21.12);
force_send_socket(udp:12.12.21.12:5060);

@bogdan-iancu bogdan-iancu added this to the 2.1 milestone Apr 1, 2015
@bogdan-iancu
Copy link
Member

It is not a bug, and it is not trunk only (2.1 too). It is a side effect of the grammar changes during protocol rework.
I think it is even better now as it forces you to give exact description of the interface/listener you want to use (it is not protocol ambigous anymore).

@hydrosine
Copy link
Author

Then the documentation should be updated!

http://www.opensips.org/Documentation/Script-CoreFunctions-2-1#toc16

as well as the error message:
bad argument, [proto:]host[:port] expected
to
bad argument, proto:host[:port] expected

@liviuchircu liviuchircu self-assigned this Apr 1, 2015
@liviuchircu
Copy link
Member

Also corrected the documentation. Thanks for the report, @hydrosine ! The devil is always in the details...

liviuchircu added a commit that referenced this issue Apr 1, 2015
The transport protocol is now mandatory

Reported by @hydrosine
Closes #447

(cherry picked from commit 5a346da)
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

3 participants