<div dir="ltr"><div><div><div><div><div><div><div>Hi Daniel <br></div>We need to modify Kamailio in a proper way to have separate connection per call. We need your guidance and we will share the details so that it will be useful for somebody else.<br>


<br></div>Now how do we proceed. My thought is<br></div>1. In Kamailio, there might be a structure or object that might be storing per call information. Let's call it <b>call_context</b>. Also there might be another data structure that might be storing registration information.Let's call it <b>reg_context</b>.<br>
<br></div>2. In tcp_main.c , tcp_do_connect() creates socket . So I want to store tcp_connection structure in call_context. So that there are separate sockets per call.<br><br></div>3. Same thing should be done for registration, like storing tcp_connection structure in per reg_context.<br>
<br></div>Now my question is it the right approach, or kindly advise what is the right approach.<br><br></div>If what I have mentioned is right approach, pls give some information regarding data structures and how can I store specific tcp_connection structure in a call_context or reg_context.<br>
<div><div><div>
<div><div><div><div><div><br></div><div>We are totally dependent on you. Kindly guide us. First time I will be modifying Kamailio code, kindly give more details, that will help us great way.<br><br></div><div>Thanks<br></div>
<div>kamal<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, May 13, 2013 at 1:18 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    there is a limit in the operating system of the ports that can be
    used - a port is short int value, 2^16.<br>
    <br>
    If it is for testing purposes, perhaps you can create many virtual
    machines, with a load balancers in front of it.<br>
    <br>
    Anyhow, it might be easier to patch kamailio not to reuse the
    connection, look at tcp*.{c,h} files.<br>
    <br>
    Cheers,<br>
    Daniel<div><div><br>
    <br>
    <div>On 5/11/13 6:27 AM, Kamal Palei wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hi Daniel<br>
                </div>
                Thanks for reply.<br>
                <br>
              </div>
              Just curious to know, how many number of calls we can
              achieve using the solution you have recommended. <br>
              <br>
              <br>
            </div>
            Also the solution, you have recommended, I am not very clear
            on that how to do it. Kindly can you explain in detail. <br>
            <br>
          </div>
          Best Regards<br>
        </div>
        Kamal<br>
        <div>
          <div>
            <div>
              <div><br>
                <br>
                <br>
                <div><br>
                  <br>
                  <br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Fri, May 10, 2013 at 12:52 PM,
          Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
            <br>
            how many active calls do you expect to have?<br>
            <br>
            At this moment, kamailio does not create local sockets
            dynamically, they have to be specified in the configuration.<br>
            <br>
            But if the number of active calls is not big, then you can
            create as many sockets as expected calls and then use force
            send socket to select on. You can use htable to keep the
            relation between  a call and a local socket.<br>
            <br>
            Cheers,<br>
            Daniel
            <div>
              <div><br>
                <br>
                On 5/10/13 5:45 AM, Kamal Palei wrote:<br>
                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                  Dear Kamailio experts<br>
                  I have a typical use case where I want Kamailio to
                  behave as a B2BUA.<br>
                  <br>
                  What I mean here is (assume Kamailio is using TCP for
                  SIP call establishment)<br>
                  <br>
                  1. For each call it should create a separate TCP
                  connection with next proxy in path.<br>
                  <br>
                  2. When call ends, it should close that connection. If
                  that call is active for 10hrs, then connection should
                  stay alive till 10hrs.<br>
                </blockquote>
                <br>
              </div>
            </div>
            <span><font color="#888888">
                -- <br>
                Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
                <a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a>
                - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
                Kamailio Advanced Training, San Francisco, USA - June
                24-27, 2013<br>
                  * <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a>
                *<br>
                <br>
                <br>
                _______________________________________________<br>
                SIP Express Router (SER) and Kamailio (OpenSER) -
                sr-users mailing list<br>
                <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
                <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
              </font></span></blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
  * <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a> *</pre>
  </div></div></div>

</blockquote></div><br></div></div></div></div></div></div></div>