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

Add the ability to call uac_auth() without incrementing CSEQ #1613

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Add the ability to call uac_auth() without incrementing CSEQ #1613

wants to merge 11 commits into from

Conversation

mstocco
Copy link

@mstocco mstocco commented Feb 8, 2019

This solves a problem where a UA is known to accept SIP Authorization without requiring the CSEQ being incremented and allowing for relaying without CSEQ adjustments.

The default value is 1; meaning no change to the normal behavior
of the uac_auth() exported function in the OpenSIPS uac module.
If the exported parameter, increment_seq, is the default value (1)
then perform the addition to CSEQ as normal.  If the value was set
to zero (0), then leave the CSEQ as received.
@bogdan-iancu
Copy link
Member

Hi @mstocco !
The correct disabling will be not changing and restoring to a cseq value equal to the received one, but skipping the whole cseq changing code and returning after this line .
Even more, to be flexible, I would strongly suggest to have this options per function call (via param), not globally per module.

@bogdan-iancu bogdan-iancu self-assigned this Feb 8, 2019
liviuchircu added a commit that referenced this pull request Feb 20, 2019
While doing strict routing (e.g. the R-URI host is a local domain) and
executing the module callbacks, the rr module would provide some bogus
memory pointer as the result of the rr_api.get_route_param() function.

Although opensips would not crash due to the dangling pointer residing
in pkg memory, some callbacks would misbehave (e.g. uac_auth() would
fail to adjust the outbound ACK CSeq, since it cannot locate the ";aci"
Route header field parameter within the dangling pkg area).

Related to #1613
modules/uac/README Outdated Show resolved Hide resolved
modules/uac/auth.c Outdated Show resolved Hide resolved
liviuchircu added a commit that referenced this pull request Feb 22, 2019
While doing strict routing (e.g. the R-URI host is a local domain) and
executing the module callbacks, the rr module would provide some bogus
memory pointer as the result of the rr_api.get_route_param() function.

Although opensips would not crash due to the dangling pointer residing
in pkg memory, some callbacks would misbehave (e.g. uac_auth() would
fail to adjust the outbound ACK CSeq, since it cannot locate the ";aci"
Route header field parameter within the dangling pkg area).

Related to #1613

(cherry picked from commit ec89b78)
@mstocco
Copy link
Author

mstocco commented Feb 24, 2019

Hi @mstocco !
The correct disabling will be not changing and restoring to a cseq value equal to the received one, but skipping the whole cseq changing code and returning after this line .
Even more, to be flexible, I would strongly suggest to have this options per function call (via param), not globally per module.

Hi @bogdan-iancu,
As you suggested, the idea of an exported, global parameter was replaced with an optional parameter (string) passed to the uac_auth function. Specifically, if uac_auth(“CSEQ_SKIP”) is in the route script, uac_auth returns cleanly where you expressed it should, at line 274.

Anything but “CSEQ_SKIP” (or no param at all) is intended to have uac_auth() continue as it always has. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants