[Asterisk-code-review] pjproject: Use a much higher limit for PJ ICE MAX CHECKS (asterisk[14])

Joshua Colp asteriskteam at digium.com
Wed Nov 16 16:56:02 CST 2016


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4430 )

Change subject: pjproject: Use a much higher limit for PJ_ICE_MAX_CHECKS
......................................................................


pjproject: Use a much higher limit for PJ_ICE_MAX_CHECKS

The PJ_ICE_MAX_CHECKS constant is used by pjproject to determine how
many pairs of local/remote candidates will be made. If for some reason
we reach this upper bound, ICE will generally fail and no media will
flow between the browser and Asterisk.

This patch makes PJ_ICE_MAX_CHECKS set to the total possible number of
pairs of candidates we'd theoretically allow, which is
PJ_ICE_MAX_CAND^2. Prior to this patch, we simply multiplied
PJ_ICE_MAX_CAND by two; on systems with multiple interfaces (I blame
Docker), this is far too low to allow WebRTC calls to succeed.

Setting this to be PJ_ICE_MAX_CAND^2 allowed WebRTC calls to succeed
even when the system Asterisk was running on had quite a few virtual
interfaces.

Change-Id: Icd4f17de0ac9d3a83dddfc8bf1cb7616bc107d55
---
M third-party/pjproject/patches/config_site.h
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/third-party/pjproject/patches/config_site.h b/third-party/pjproject/patches/config_site.h
index 564959d..1a48695 100644
--- a/third-party/pjproject/patches/config_site.h
+++ b/third-party/pjproject/patches/config_site.h
@@ -56,7 +56,7 @@
 
 /* Defaults too low for WebRTC */
 #define PJ_ICE_MAX_CAND 32
-#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * 2)
+#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)
 
 /* Increase limits to allow more formats */
 #define	PJMEDIA_MAX_SDP_FMT   64

-- 
To view, visit https://gerrit.asterisk.org/4430
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd4f17de0ac9d3a83dddfc8bf1cb7616bc107d55
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list