[sr-dev] [kamailio] rtpengine: hash table to keep the selected nodes (#390)

Richard Fuchs notifications at github.com
Wed Nov 11 17:15:52 CET 2015


> +
> +/*
> + * Main balancing routine. This DO try to keep the same proxy for
> + * the call if some proxies were disabled or enabled (e.g. kamctl command)
> + */
> +static struct rtpp_node *
> +select_rtpp_node(str callid, int do_test, int op)
> +{
> +	if(!active_rtpp_set) {
> +		LM_ERR("script error - no valid set selected\n");
> +		return NULL;
> +	}
> +
> +	// calculate and choose a node
> +	if (op == OP_OFFER) {
> +		// run the selection algorithm

"Offer" doesn't necessarily mean that this will be a new entry. A re-invite will also do an "offer" but needs to do a lookup into the hash table first. I think a lookup should always be done first, with fallback to creating a new entry in case of an offer.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/390/files#r44550420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151111/c8b033f0/attachment.html>


More information about the sr-dev mailing list