[Serusers] Forking based on URI. Please help.

Leo leo at ltcjp.com
Wed Jan 25 20:37:56 CET 2006


I figured it out myself. It is an interesting solution. The solution is NOT
to do anything at all with ser.cfg. Instead add a permanent user location
for 004888 in the 'location' table. This can be done with serctl ul add. I
then looked at the record with MySQL and I modified the 'contact' column to
point to sip:004990 at sip.tcto.net:49300 and then I added another user
location for 004888 this time pointing to sip:004100 at sip.tcto.net:49200. The
proxy seems to fork beautifully.

It seems that a permanent user location is added by setting the flag field
of the location table, but I cannot find information about the flag column
of this table and what it is used for.

I will post a question to the mailing list.

-----Original Message-----
From: serusers-bounces at iptel.org [mailto:serusers-bounces at lists.iptel.org] On
Behalf Of Leo
Sent: Monday, January 23, 2006 3:39 PM
To: serusers at lists.iptel.org
Subject: [Serusers] Forking based on URI. Please help.

I am running ser 0.9.4 on FC4 with MySQL and all is working.

I want to implement forking based on SIP URI.

When someone dials 004888(which is a SIP URI just used for this matching), I
want to fork the call to 004990 and 004100 in parallel.

So I put this in my ser.cfg:

if (uri==myself)
	{
	if (uri=~"^sip:004888@~*")
		{
		rewriteuri("sip:004990 at sip.tcto.net:49300");
		append_branch("sip:004100 at sip.tcto.net:49200");
		route(1);
		break;
		};
	};
Route[1]
{
	if (!t_relay())
		{
		sl_reply_error();
		};
}

Can anyone tell me what I am doing wrong? Or point me to some documentation
on forking. I have searched ONSIP and module documentation already.

Leo Papadopoulos
leo at ltcjp.com


_______________________________________________
Serusers mailing list
serusers at lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list