summaryrefslogtreecommitdiff
path: root/res/res_pjsip_one_touch_record_info.c
diff options
context:
space:
mode:
authorsnuffy <snuffy22@gmail.com>2016-05-10 12:40:08 +1000
committerJoshua Colp <jcolp@digium.com>2016-05-19 09:06:30 -0300
commit39fedfa4235da9f2d5de63bafae0521d7591ac8e (patch)
tree59ef667fc49e16d5e5d8a2d0515f24fcd3c85d59 /res/res_pjsip_one_touch_record_info.c
parent7d986ff3f6505c44f69940bb3dd3907bb63af4ba (diff)
res_pjsip_empty_info: Respond to empty SIP INFO packets
Some SBCs require responses to empty SIP INFO packets after establishing call via INVITE, if not responded to they may drop your call after unspecified timeout of X minutes. They are identified by having no Content-Type, check for this and respond with 200 - OK message. ASTERISK-24986 #close Reported-by: Ilya Trikoz, Federico Santulli Change-Id: Ib27e4f07151e5aef28fa587e4ead36c5b87c43e0
Diffstat (limited to 'res/res_pjsip_one_touch_record_info.c')
-rw-r--r--res/res_pjsip_one_touch_record_info.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/res/res_pjsip_one_touch_record_info.c b/res/res_pjsip_one_touch_record_info.c
index 8b1ff9dab..e15b0d815 100644
--- a/res/res_pjsip_one_touch_record_info.c
+++ b/res/res_pjsip_one_touch_record_info.c
@@ -72,13 +72,13 @@ static int handle_incoming_request(struct ast_sip_session *session, struct pjsip
if (!session->channel) {
send_response(session, 481, rdata);
- return 0;
+ return 1;
}
/* Is this endpoint configured with One Touch Recording? */
if (!session->endpoint->info.recording.enabled || ast_strlen_zero(feature)) {
send_response(session, 403, rdata);
- return 0;
+ return 1;
}
ast_channel_lock(session->channel);
@@ -87,7 +87,7 @@ static int handle_incoming_request(struct ast_sip_session *session, struct pjsip
if (feature_res || ast_strlen_zero(feature_code)) {
send_response(session, 403, rdata);
- return 0;
+ return 1;
}
for (digit = feature_code; *digit; ++digit) {
@@ -97,11 +97,12 @@ static int handle_incoming_request(struct ast_sip_session *session, struct pjsip
send_response(session, 200, rdata);
- return 0;
+ return 1;
}
static struct ast_sip_session_supplement info_supplement = {
.method = "INFO",
+ .priority = AST_SIP_SUPPLEMENT_PRIORITY_FIRST,
.incoming_request = handle_incoming_request,
};