Documentation:

7.3. is_in_profile(profile,[value])

Checks if the current dialog belongs to a profile. If the profile supports values, the check can be reinforced to take into account a specific value, if the dialog was inserted into the profile for a specific value. If no value is passed, only the membership of the dialog in the profile per se is checked. Note that if the profile does not support values, the value parameter will be silently discarded.

Code:

static int w_is_in_profile_helper(sip_msg_t *msg,
		struct dlg_profile_table *profile, str *value)
{
	if (profile->has_value) {
		if (value==NULL || value->len<=0) {
			LM_ERR("invalid value parameter\n");
			return -1;
		}
		return is_dlg_in_profile( msg, profile, value);
	} else {
		return is_dlg_in_profile( msg, profile, NULL);
	}
}

Expected result: Documentation should be corrected, or even better, code should be updated to perform as documented.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.