Esempio n. 1
0
static int ki_get_redirects_all(sip_msg_t* msg)
{
	int n;

	msg_tracer(msg, 0);
	/* get the contacts */
	n = get_redirect(msg, 0, 0, NULL, bflags);
	reset_filters();
	/* reset the tracer */
	msg_tracer(msg, 1);

	return n;
}
Esempio n. 2
0
static int ki_get_redirects(sip_msg_t* msg, int max_c, int max_b)
{
	int n;

	msg_tracer(msg, 0);
	/* get the contacts */
	n = get_redirect(msg, max_c, max_b, NULL, bflags);
	reset_filters();
	/* reset the tracer */
	msg_tracer(msg, 1);

	return n;
}
Esempio n. 3
0
static int w_get_redirect(struct sip_msg* msg, int *max_t, int *max_b)
{
	int n;

	msg_tracer( msg, 0);
	/* get the contacts */
	n = get_redirect(msg , max_t ? *max_t : 0, max_b ? *max_b : 0);
	reset_filters();
	/* reset the tracer */
	msg_tracer( msg, 1);

	return n;
}
Esempio n. 4
0
static int w_get_redirect2(struct sip_msg* msg, char *max_c, char *reason)
{
	int n;
	unsigned short max;

	msg_tracer( msg, 0);
	/* get the contacts */
	max = (unsigned short)(long)max_c;
	n = get_redirect(msg , (max>>8)&0xff, max&0xff, (struct acc_param*)reason);
	reset_filters();
	/* reset the tracer */
	msg_tracer( msg, 1);

	return n;
}
Esempio n. 5
0
static int ki_get_redirects_acc(sip_msg_t* msg, int max_c, int max_b,
		str *reason)
{
	int n;
	acc_param_t accp;

	if(reason && reason->len>0) {
		memset(&accp, 0, sizeof(acc_param_t));
		accp.reason.s = reason->s;
		accp.reason.len = reason->len;
	}
	msg_tracer(msg, 0);
	/* get the contacts */
	n = get_redirect(msg, max_c, max_b, (reason && reason->len>0)?&accp:NULL,
			bflags);
	reset_filters();
	/* reset the tracer */
	msg_tracer(msg, 1);

	return n;
}
Esempio n. 6
0
static int w_set_accept(struct sip_msg* msg, char *re, char *flags)
{
	msg_tracer( msg, 0);
	return (add_filter( ACCEPT_FILTER, (regex_t*)re, (int)(long)flags)==0)?1:-1;
}
Esempio n. 7
0
static int w_set_deny(struct sip_msg* msg, regex_t *re, void *flags)
{
	msg_tracer( msg, 0);
	return (add_filter( DENY_FILTER, re, (int)(long)flags)==0)?1:-1;
}