[OpenSER-Users] call forking

bernard.le at orange-ftgroup.com bernard.le at orange-ftgroup.com
Tue Aug 21 16:28:44 CEST 2007



Hi

I'm trying to do some call forking but I can't manage to make it work well.
I explain quickly what it is :
If user A call user B and user B is registered more than once (on different
system), the proxy will fork natively to all registered user B.

What I want to do now is if user A call user B then the proxy fork to user
C, user D and so on.
I have found the command append_branch("sip:userC at domain").

The thing is that it is not working well.
For the first time (when the server restart), I make a call from user A,
only user B receive the call, then ignored the call from the user B and
wait for about 15sec then the call ring on user C and D.
I make the 2nd try, user A call B, B, C & D receive the ring.
Then I wait some minute, the problem came back again

what is wrong with the first call, a bug or configuration error ?

please help
Bernard

here is my config file :
# ----------- global configuration parameters ------------------------
debug=3            # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no    # (cmd line: -E)
children=4

listen=192.168.17.107
port=5060
# ------------------ module loading ----------------------------------
#set module path
mpath="/usr/local/lib/openser/modules/"

loadmodule "mysql.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
# ----------------- setting module-specific parameters ---------------
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
modparam("usrloc", "db_mode", 3)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)
# -------------------------  request routing logic -------------------
# main routing logic
route{
      if (!mf_process_maxfwd_header("10"))
      {
            sl_send_reply("483","Too Many Hops");
            exit;
      };

      if (msg:len >=  2048 )
      {
            sl_send_reply("513", "Message too big");
            exit;
      };

      if (!method=="REGISTER")
            record_route();

      if (loose_route())
      {
            # mark routing logic in request
            append_hf("P-hint: rr-enforced\r\n");
            route(1);
      };

      if (!uri==myself)
      {
            # mark routing logic in request
            append_hf("P-hint: outbound\r\n");
            route(1);
      };

      if (uri==myself)
      {
            if (method=="REGISTER")
            {
                  route(2);
            };

            if (method=="INVITE")
            {
                  route(3);
            };

            lookup("aliases");
            if (!uri==myself)
            {
                  append_hf("P-hint: outbound alias\r\n");
                  route(1);
            };

            if (!lookup("location"))
            {
                  sl_send_reply("404", "User not found");
                  exit;
            };
            append_hf("P-hint: usrloc applied\r\n");
      };

      route(1);
}


route[1]
{
      if (!t_relay())
      {
            sl_reply_error();
      };
      exit;
}

route[2]
{
      if (!www_authorize("etraliSIP.fr", "subscriber"))
      {
            www_challenge("etraliSIP.fr", "1");
            exit;
      };
      save("location");
      exit;
}

route[3]
{
      if (!proxy_authorize("etraliSIP.fr", "subscriber"))
      {
            proxy_challenge("etraliSIP.fr", "1");
            exit;
      };
      if (from_uri=="sip:leb at etraliSIP" && to_uri=="sip:patrice at etraliSIP"
&& !search("P-hint: ok call forking"))
      {
            append_hf("P-hint: ok call forking\r\n");
            append_branch("sip:test at etraliSIP");
            append_branch("sip:tony at etraliSIP");
      };
}





*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************




More information about the Users mailing list