[Asterisk-code-review] PJSIP respond to emtpy SIP INFO packets (asterisk[master])
snuffy
asteriskteam at digium.com
Wed Apr 27 04:48:28 CDT 2016
snuffy has uploaded a new change for review.
https://gerrit.asterisk.org/2710
Change subject: PJSIP respond to emtpy SIP INFO packets
......................................................................
PJSIP respond to emtpy SIP INFO packets
Some SBCs use emtpy SIP INFO packets as a KEEPALIVE and drop
your session(s) if you do not respond.
Make sure we respond 200 - OK to empty body SIP INFO messages.
Change-Id: Ib27e4f07151e5aef28fa587e4ead36c5b87c43e0
---
M res/res_pjsip_dtmf_info.c
1 file changed, 1 insertion(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/10/2710/1
diff --git a/res/res_pjsip_dtmf_info.c b/res/res_pjsip_dtmf_info.c
index 47ccd1a..73f156c 100644
--- a/res/res_pjsip_dtmf_info.c
+++ b/res/res_pjsip_dtmf_info.c
@@ -97,11 +97,8 @@
is_dtmf = is_media_type(rdata, "dtmf");
if (!is_dtmf && !is_media_type(rdata, "dtmf-relay")) {
- return 0;
- }
-
- if (!body || !body->len) {
/* need to return 200 OK on empty body */
+ /* Some SBCs use emtpy INFO as a KEEPALIVE */
send_response(session, rdata, 200);
return 0;
}
--
To view, visit https://gerrit.asterisk.org/2710
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib27e4f07151e5aef28fa587e4ead36c5b87c43e0
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: snuffy <snuffy22 at gmail.com>
More information about the asterisk-code-review
mailing list