[SR-Users] htable lock - unlock

Marino Mileti marino.mileti at alice.it
Thu Dec 15 11:46:32 CET 2016


Hi guys,

 

I'm going out of mind J

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)

 

sht_lock("pht=>$ci");

if ($sht(pht=>$ci)!=$null){

    xlog("L_INFO","Before assignment..");

    $sht(pht=>$ci)=$var(myvar);

    xlog("L_INFO","Assigned done...");    

    sht_unlock("pht=>$ci");

}               

else{           

    xlog("L_INFO","Skipping..");

}

sht_unlock("pht=>$(hdr(Call-ID))");

 

The situation is that I never see the "Assigned done" message in log file...

 

Is this the right use of sht_lock/sht_unlock method?

 

Marino Maria Mileti

 <mailto:marino.mileti at alice.it> marino.mileti at alice.it

 

cid:006a01cb6b0e$67eecdae$_CDOSYS2.0Reduce your energy consumption and keep
polar bears on ice! 

 



---
Questa e-mail รจ stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161215/b08a0f0e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 691 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161215/b08a0f0e/attachment.jpg>


More information about the sr-users mailing list