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

[BUG] Documented default value for default_q is not 0. A useful value also isn't available in the event_route #3367

Closed
NormB opened this issue Apr 12, 2024 · 1 comment

Comments

@NormB
Copy link
Member

NormB commented Apr 12, 2024

OpenSIPS version you are running

Running master branch

Describe the bug

The documentation for the default_q value is located here: https://opensips.org/html/docs/modules/devel/registrar.html#param_default_q

Specifically "Default value is 0.".

However, the module sets the default value to Q_UNSPECIFIED.

The file qvalue.h has this comment:

Value Q_UNSPECIFIED (which is in fact -1) has a special meaning, 
it means that the q value is not known and the parameter should not
be printed when printing Contacts, implementations will then use
implementation specific pre-defined values.

The problem is that the qval printed in a fired event is not able to be printed properly as shown when printing $param(qval)

NOTICE:[E_UL_CONTACT_UPDATE] qval[18446744073709551615]

To Reproduce

Expected behavior

Relevant System Logs

OS/environment information

  • Operating System:
  • OpenSIPS installation:
  • other relevant information:

Additional context

@NormB NormB changed the title [BUG] Documented default value for default_q is incorrect [BUG] Documented default value for default_q is not 0 (per the doc). A useful value also isn't available in the event_route Apr 12, 2024
@NormB NormB changed the title [BUG] Documented default value for default_q is not 0 (per the doc). A useful value also isn't available in the event_route [BUG] Documented default value for default_q is not 0. A useful value also isn't available in the event_route Apr 12, 2024
razvancrainea added a commit that referenced this issue Apr 26, 2024
Treat the integer as signed when building the $param value

Many thanks to Norm Brandinger (@NormB on GitHub) for reporting it in #3367
razvancrainea added a commit that referenced this issue Apr 26, 2024
Treat the integer as signed when building the $param value

Many thanks to Norm Brandinger (@NormB on GitHub) for reporting it in #3367

(cherry picked from commit 999b8ac)
razvancrainea added a commit that referenced this issue Apr 26, 2024
Treat the integer as signed when building the $param value

Many thanks to Norm Brandinger (@NormB on GitHub) for reporting it in #3367

(cherry picked from commit 999b8ac)
@NormB
Copy link
Member Author

NormB commented Apr 26, 2024

Working perfectly, thank you.

Apr 26 10:26:13 [70] NOTICE:[E_UL_CONTACT_INSERT]  QVal[-1]

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