<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    $shv(...) is referred as shared memory variable because it stores
    the value in shared memory. That means if you set $shv(x) in one
    process, you can read its value from another process. You have to be
    sure you don't have races in setting the variable, that could be
    achieved with locks from cfgutils.<br>
    <br>
    $var(...) is referred as private memory variable because it stores
    the value in private memory. That means its value is valid in the
    context of the same process (e.g., use it while processing the same
    sip message on a single routing block type, like running the main
    request route block, or reply route block, etc). It is not safe to
    use it for transactions, like setting it in request route block and
    reading it in failure route block (use avps for that case).<br>
    <br>
    $var(...) is faster to use and does not need locking at all. These
    are usually referred as script variable, but this term can be
    confused with all the config file variables.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 2/12/13 3:13 PM, Mino Haluz wrote:<br>
    </div>
    <blockquote
cite="mid:CAFA7yDR6E+YVoft8aocfPuqd5VypFqWbvCE4JfmaLXnS2TYFKw@mail.gmail.com"
      type="cite">
      <div dir="ltr"><span
          style="font-family:arial,sans-serif;font-size:13px">Hi,</span>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">what is
          the difference between shared and script variable ? Thanks</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">Mino</div>
      </div>
      <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>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
  </body>
</html>