Skip to content

Conversation

@maximilianfridrich
Copy link
Contributor

@maximilianfridrich maximilianfridrich commented Nov 7, 2025

res_pjsip: Introduce redirect module for handling 3xx responses
This commit introduces a new redirect handling module that provides
infrastructure for following SIP 3xx redirect responses. The redirect
functionality respects the endpoint's redirect_method setting and only
follows redirects when set to 'uri_pjsip'. This infrastructure can be
used by any PJSIP module that needs to handle 3xx redirect responses.

res_pjsip_messaging: Add support for following 3xx redirects
This commit integrates the redirect module into res_pjsip_messaging
to enable following 3xx redirect responses for outgoing SIP MESSAGEs.

When redirect_method is set to 'uri_pjsip' on an endpoint, Asterisk
will now follow 3xx redirect responses for MESSAGEs, similar to how
it behaves for INVITE responses. For other redirect_method values (user,
uri_core), redirects are not followed for MESSAGEs, maintaining backward
compatibility.

Resolves: #1576

@maximilianfridrich
Copy link
Contributor Author

cherry-pick-to: 20
cherry-pick-to: 22
cherry-pick-to: 23
multiple-commits: standalone
testsuite-test-pr: 117

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Workflow PRCheck completed successfully

This commit introduces a new redirect handling module that provides
infrastructure for following SIP 3xx redirect responses. The redirect
functionality respects the endpoint's redirect_method setting and only
follows redirects when set to 'uri_pjsip'. This infrastructure can be
used by any PJSIP module that needs to handle 3xx redirect responses.
This commit integrates the redirect module into res_pjsip_messaging
to enable following 3xx redirect responses for outgoing SIP MESSAGEs.

When redirect_method is set to 'uri_pjsip' on an endpoint, Asterisk
will now follow 3xx redirect responses for MESSAGEs, similar to how
it behaves for INVITE responses. For other redirect_method values (user,
uri_core), redirects are not followed for MESSAGEs, maintaining backward
compatibility.

Resolves: asterisk#1576
@github-actions
Copy link

github-actions bot commented Nov 9, 2025

Workflow PRCheck completed successfully

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.

[improvement]: res_pjsip_messaging: Follow 3xx redirect messages if redirect_method=uri_pjsip

1 participant