<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    I haven't read full thread, but I noticed in the config snippet
    below that you use $shv(...) - this is single value variable that
    stores the value in shared memory. The $ci is not replaced in
    definition of $shv($ci), but is used as literal token '$ci'.<br>
    <br>
    You should use htable module, defining a hash table, say 'overlap'
    and then use $sht(overlap=>$ci).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 04/02/14 17:47, Moritz Graf wrote:<br>
    </div>
    <blockquote cite="mid:52F119BE.5090308@g-fit.de" type="cite">
      <pre wrap="">Hi,

nah, that's not what I wanted to hear ;). And it's not really
complicated. I hacked it down (my third choice in the initial mail) with
$shv(). See (find also attached):

####################################################
### Hacky section
xdbgl("Shared Variable of current ( Call-ID = $ci ) is $shv($(ci)) ");
$var(numberLength) = $(var(calledNumber_normalized){s.len});
xdbgl("Length of string ( $var(calledNumber_normalized) )is
$var(numberLength) characters.");
if ( $shv($(ci)) < $var(numberLength) ) {
      xdbgl("I detected, that the old value is lower, setting it to the
new value.");
      $shv($(ci)) = $var(numberLength);
}
# sleeping to wait for potentially new invites
sl_send_reply("100", "Trying..."); # So no retransmits happen
usleep("500000");     #half a second, this is the timer i was speaking about
if( $var(numberLength) < $shv($(ci)) ) {
      xdbgl("Detected newer INVITE, aborting this transaction with 484
response");
      route("address_incomplete");
      break;
}
######################################################

Do you see any problems with this?

So this is not really smooth, probably someone has a better solution for
this??

greetz



Am 04.02.2014 16:16, schrieb Alex Balashov:
</pre>
      <blockquote type="cite">
        <pre wrap="">I'm not sure this is a task for a proxy like Kamailio, even with its
fancy new async relay features. To truly customise how successive
INVITEs are dealt with like this, I think it needs to be handled by a
UAS that has complete latitude in terms of how it computes state.


On 4 February 2014 10:13:33 GMT-05:00, Moritz Graf
<a class="moz-txt-link-rfc2396E" href="mailto:moritz.graf@g-fit.de"><moritz.graf@g-fit.de></a> wrote:

    Hi,

    sure. That's why it's called "transaction oriented".
    On a SIP-Theory basis, the second INVITE opens a new transaction!! For
    correlation the Call-ID keeps the same! This is how all of the big
    carriers I know handle OverlapDialing.

    The problem is:
    * I am receiving an INVITE.
    * At this point I don't know if there will be a second INVITE or not. So
    I have to wait.
    * If the timer elapses, ok handle this INVITE.
    * But if there IS a second (third..) INVITE, I have to cancel the first
    and then handle the second.

    Sounds like nobody has done this before... any suggetions appriciated.

    greetz


    Am 04.02.2014 15:56, schrieb Alex Balashov:

        Indeed, Section 3.1 in the referenced RFC covers this pretty well.

        On 4 February 2014 09:47 :38 GMT-05:00, "Olle E. Johansson"
        <a class="moz-txt-link-rfc2396E" href="mailto:oej@edvina.net"><oej@edvina.net></a> wrote:


        On 04 Feb 2014, at 15:43, Moritz Graf <a class="moz-txt-link-rfc2396E" href="mailto:moritz.graf@g-fit.de"><moritz.graf@g-fit.de></a> wrote:


        Shortly explained what RFC3578 is: In a open numbering plan you
        never
        know if the INVITE you received is already complete, or if there are
        more numbers coming in. One way of accomplishing this is to set up a
        timer. If the timer elapses you assume the number is complete.
        If not,
        you are receiving a new INVITE with one digit more. Now you have to
        close the old transaction with a "484 - Address
        Incomplete"-response and
        start the timer again. (Find the algorithm I want to implement
        attached)

        You are not allowed to have two open INVITEs, the second one
        SHOULD get
        a 491 response. The client should not send a new INVITE if the
        ol d INVITE
        transaction is not complete.

        I don't th
        ink
        overlap dialing in SIP was ever meant to be timer based. Consider
        that the first INVITE can go to a different proxy than the
        second. There's no
        dialog, no route set.

        /O
        ------------------------------------------------------------------------


        SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
        mailing list
        <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
        <a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>


        --
        Sent from my Nexus 10, with all the figments of autocorrect that
        might
        imply.

        Alex Balashov - Principal
        Evariste Systems LLC
        235 E Ponce de Leon Ave
        Suite 106
        Decatur, GA 30030
        United States
        Tel: +1-678-954-0670
        Web: <a class="moz-txt-link-freetext" href="http://www.evaristesys.com/">http://www.evaristesys.com/</a>, <a class="moz-txt-link-freetext" href="http://www.alexbalashov.com/">http://www.alexbalashov.com/</a>



--
Sent from my Nexus 10, with all the figments of autocorrect that might
imply.

Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: <a class="moz-txt-link-freetext" href="http://www.evaristesys.com/">http://www.evaristesys.com/</a>, <a class="moz-txt-link-freetext" href="http://www.alexbalashov.com/">http://www.alexbalashov.com/</a>
</pre>
      </blockquote>
      <pre wrap="">

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>