Hi all,
I'm using kamailio 3.1 and I have some problems with parallel
forking.
I need to implement parallel forking to different users
registered on kamailio.
So, when call arrives with R-URI= sip:003912345678@<IP_server>,
I need to fork te call to (for example) 2 users: 1001 and 1001.
To do that, I've created my usr_preferences table like this:
+----+------+------------------+--------+-----------+------+-------+---------------------+
| id | uuid | username | domain | attribute | type | value | last_modified |
+----+------+------------------+--------+-----------+------+-------+---------------------+
| 1 | | 003912345678 | | fork | 0 | 1001 | |
| 2 | | 003912345678 | | fork | 0 | 1002 | |
+----+------+------------------+--------+-----------+------+-------+---------------------+
and I've added a code to my kam.cfg like this:
if (is_method("INVITE"))
{
xlog("L_INFO", "REQUEST Invite - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
if(avp_db_load("$ru/username","$avp(s:fork)"))
{
avp_pushto("$ru/username","$avp(s:fork)/g");
}
if(!lookup("location"))
{
xlog("L_INFO", "Local user offline - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
sl_send_reply("404", "User Offline");
exit;
}
else
{
xlog("L_INFO", "Local user online - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
t_relay();
}
}
If 1001 and 1002 are registered everything works fine (1001
Ringing and 1002 ringing).
If only 1001 registered everything works fine
(1001 ringing and 1002 is offline.).
But when 1002 is registered and 1001 in offline, kamailio try
to call 1001, find that it's offline ( and I get 404 User
Offline") but no call to 1002 is attempted.
What's wrong ?
Regards,
Daniel
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users