[Asterisk-code-review] res_pjsip: Fix path usage in case dialing with '@' (asterisk[18])
Igor Goncharovsky
asteriskteam at digium.com
Fri Nov 4 05:14:37 CDT 2022
Igor Goncharovsky has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/19471 )
Change subject: res_pjsip: Fix path usage in case dialing with '@'
......................................................................
res_pjsip: Fix path usage in case dialing with '@'
Add ability to use sip path even in case AOR do not found. This could
be possible in case of dialing with @ and overriding user part of RURI.
ASTERISK-30100 #close
Reported-by: Yury Kirsanov
Change-Id: I3f2c42a583578c94397b113e32ca3ebf2d600e13
---
M include/asterisk/res_pjsip.h
M res/res_pjsip/pjsip_configuration.c
M res/res_pjsip_path.c
3 files changed, 24 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/71/19471/1
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index d207297..091de12 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -1025,6 +1025,8 @@
unsigned int asymmetric_rtp_codec;
/*! Do we allow overlap dialling? */
unsigned int allow_overlap;
+ /*! Should we support path by default for endpoint AOR's dialed by URI ? */
+ unsigned int default_support_path;
/*! Whether to notifies all the progress details on blind transfer */
unsigned int refer_blind_progress;
/*! Whether to notifies dialog-info 'early' on INUSE && RINGING state */
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index e63018e..87563b1 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -2229,6 +2229,7 @@
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "asymmetric_rtp_codec", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, asymmetric_rtp_codec));
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtcp_mux", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.rtcp_mux));
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "allow_overlap", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, allow_overlap));
+ ast_sorcery_object_field_register(sip_sorcery, "endpoint", "default_support_path", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, default_support_path));
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "refer_blind_progress", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, refer_blind_progress));
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "notify_early_inuse_ringing", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, notify_early_inuse_ringing));
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "max_audio_streams", "1", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.max_audio_streams));
diff --git a/res/res_pjsip_path.c b/res/res_pjsip_path.c
index 5272a5c..241b148 100644
--- a/res/res_pjsip_path.c
+++ b/res/res_pjsip_path.c
@@ -174,7 +174,12 @@
}
aor = find_aor(endpoint, tdata->msg->line.req.uri);
- if (!aor || !aor->support_path) {
+ if (!aor) {
+ if (!endpoint->default_support_path) {
+ return;
+ }
+ }
+ if (aor && !aor->support_path) {
return;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19471
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I3f2c42a583578c94397b113e32ca3ebf2d600e13
Gerrit-Change-Number: 19471
Gerrit-PatchSet: 1
Gerrit-Owner: Igor Goncharovsky <igor.goncharovsky at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221104/fe0471d0/attachment-0001.html>
More information about the asterisk-code-review
mailing list