<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>the log message you refer to is inside the if block:</p>
<p><span lang="EN-GB">if ($sht(pht=>$ci)!=$null) { ... }</span></p>
<p><span lang="EN-GB">but you don't set the item in memory, no
assignment like:</span></p>
<p><br>
<span lang="EN-GB">$sht(pht=>$ci) = ...;</span></p>
<p><span lang="EN-GB">The </span><span lang="EN-GB">sht_lock(</span><span
lang="EN-GB"><span lang="EN-GB">pht=>$ci</span>) is just
locking the slot where </span><span lang="EN-GB">the value of
$sht(pht=>$ci) will be stored, but don't store any valye for
that variable.<br>
</span></p>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 15/12/2016 11:46, Marino Mileti
wrote:<br>
</div>
<blockquote
cite="mid:585274a4.420e1c0a.bad68.6a38SMTPIN_ADDED_BROKEN@mx.google.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Cambria;
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Testo fumetto Carattere";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.StileMessaggioDiPostaElettronica17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.TestofumettoCarattere
{mso-style-name:"Testo fumetto Carattere";
mso-style-priority:99;
mso-style-link:"Testo fumetto";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hi guys,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I'm going out of mind </span><span
style="font-family:Wingdings" lang="EN-GB">J</span><span
lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I've this piece of
script inside an "on_reply_route" that captures only 200OK
of INVITE (i would like to save in ht the contact of who has
answered a call)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">sht_lock("pht=>$ci");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">if
($sht(pht=>$ci)!=$null){<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">
xlog("L_INFO","Before assignment..");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">
$sht(pht=>$ci)=$var(myvar);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">
xlog("L_INFO","Assigned done..."); <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> sht_unlock("pht=>$ci");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">} <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">else{ <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> xlog("L_INFO","Skipping..");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">sht_unlock("pht=>$(hdr(Call-ID))");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">The situation is that I
never see the "Assigned done" message in log file...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Is this the right use of
sht_lock/sht_unlock method?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><span
style="font-family:"Cambria","serif";color:#1F497D">Marino
Maria Mileti</span></i><i><span
style="font-size:12.0pt;font-family:"Cambria","serif";color:#1F497D"><o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span
style="font-size:9.0pt;font-family:"Cambria","serif";color:#1F497D"><a
moz-do-not-send="true"
href="mailto:marino.mileti@alice.it"><span
style="color:blue">marino.mileti@alice.it</span></a><o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span
style="font-size:9.0pt;font-family:"Cambria","serif";color:#1F497D"><o:p> </o:p></span></i></p>
<p class="MsoNormal"><i><span
style="font-size:9.0pt;font-family:"Cambria","serif";color:#1F497D"><img
id="Immagine_x0020_6"
src="cid:part2.501F0C5B.6C38855A@gmail.com"
alt="cid:006a01cb6b0e$67eecdae$_CDOSYS2.0" border="0"
height="26" width="36"></span></i><i><span
style="font-size:9.0pt;color:#1F497D" lang="EN-US">Reduce
your energy consumption and keep polar bears on ice!</span></i><span
style="font-size:7.5pt;font-family:"Tahoma","sans-serif";color:#339966"
lang="EN-US"> </span><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";color:#1F497D" lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<br>
<br>
<hr style="border:none; color:#909090; background-color:#B0B0B0;
height: 1px; width: 99%;">
<table style="border-collapse:collapse;border:none;">
<tbody>
<tr>
<td style="border:none;padding:0px 15px 0px 8px"> <a
moz-do-not-send="true"
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient">
<img moz-do-not-send="true"
src="http://static.avast.com/emails/avast-mail-stamp.png"
alt="Avast logo" border="0"> </a> </td>
<td>
<p style="color:#3d4d5a;
font-family:"Calibri","Verdana","Arial","Helvetica";
font-size:12pt;"> Questa e-mail è stata controllata per
individuare virus con Avast antivirus. <br>
<a moz-do-not-send="true"
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient">www.avast.com</a>
</p>
</td>
</tr>
</tbody>
</table>
<br>
<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-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>