<div dir="ltr"><div><div>Hi, based on Daniels example from:<br><a href="http://blog.miconda.eu/2010/01/best-of-new-in-kamailio-300-19-htable.html">http://blog.miconda.eu/2010/01/best-of-new-in-kamailio-300-19-htable.html</a><br><br>...<br>modparam("htable", "htable", "acalls=>size=8;")<br>...<br>route {<br> ...<br> if(is_method("INVITE") && !has_totag())<br> {<br>      # a new call<br>      if($shtcv(ht=>^$fU$)>=3)<br>      {<br>          send_reply("403", "limit exceeded");<br>          exit;<br>      }<br>      $sht(acalls=>$ci) = $fU;<br>      t_on_failure("NEW_INVITE");<br> }<br><br> if(is_method("BYE"))<br> {<br>    $sht(acalls=>$ci) = $null;<br> }<br> ...<br>}<br><br>failure_route[NEW_INVITE] {<br>  $sht(acalls=>$ci) = $null;<br>}<br><br>I use this htable variant to share data between two dialogs (store Contact from one dialog, and re-write other R-URI with it). Referenced by call-id:<br><br>...<br>$avp(referenceID) = $ci + "-" + $avp(direction);<br>$sht(a=>$avp(referenceID)) = $ct;<br>...<br>...</div><div>$avp(referenceID) = $ci + "-" + $avp(direction);<br></div><div>avp(newru) = $sht(a=>$avp(referenceID));<br>avp_subst("$avp(newru)", "/(<)(.*)(>)/\2/");<br>xlog("L_NOTICE", ">>>>>>>>  ReWrite ru with:$avp(newru)\n");<br>$ru = $avp(newru);<br>...<br><br>Is this the best method to share data between two dialogs? Because you have to take <br>care yourself with failure_route and so on, to free (set back to $null) them. Or is there<br>a more elegant way for that task?<br><br></div>Best<br></div>Kristijan<br></div>