<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta content="text/html; charset=utf-8">
</head>
<body>
<div id="nine_body_n18e6b1-3840a" class="nine_body mceEditable" dir="auto" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12.0pt; line-height:1.3; color:#1f497d">
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">Tip,</div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">If you want to use vars in the dialog, use $dlg_var()</div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">Those are valid from create_dlg()  to the last BYE  </div>
<div class="nine-pg" dir="auto">but dont forget to use loose_route() or match_dialog()</div>
<div class="nine-pg" dir="auto">before refering to them again...</div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">(Note: They are vslud  in all the in-dialog messages such as re-invite )</div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">Tip 2 ... Buy the book</div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto"><a href="https://www.oreilly.com/library/view/building-telephony-systems/9781785280610/">https://www.oreilly.com/library/view/building-telephony-systems/9781785280610/</a></div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">Excellent </div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg blank sign" dir="auto"><span style="font-family:calibri,arial,helvetica,sans-serif; font-size:11pt"> Regards</span><span style="font-family:calibri,arial,helvetica,sans-serif; font-size:11pt">_</span></div>
<div id="nine-sign-n18e6b1-3840a" class="nine_signature" dir="auto" style="font-size:11pt; font-family:'calibri' ,'arial' ,'helvetica' ,sans-serif; line-height:1.3">
<div class="nine-pg" dir="auto">
<div class="nine-pg MsoNormal" dir="auto">Stefan</div>
<div class="nine-pg MsoNormal" dir="auto"></div>
<div class="nine-pg" dir="auto"><br>
</div>
</div>
</div>
<div class="nine-pg blank msg" dir="auto"><br>
</div>
</div>
<div class="quoted_output_body">
<div id="quoted_header_n18e6b1-3840a" class="quoted_header_editor fold" dir="auto">
<hr style="border:none; height:1px; color:#e1e1e1; background-color:#e1e1e1">
<div dir="auto" style="border:none; padding:3.0pt 0cm 0cm 0cm"><span style="font-size:11.0pt; font-family:Calibri,Arial,Helvetica,sans-serif"><b>From:</b> Prathibha B <prathibhab.tvm@gmail.com><br>
<b>Sent:</b> Saturday, 23 March 2024 12:26<br>
<b>To:</b> OpenSIPS users mailling list<br>
<b>Subject:</b> Re: [OpenSIPS-Users] variables not working as expected<br>
</span></div>
</div>
<br type="attribution">
</div>
<div>
<div dir="ltr">unable to access the script variable in the route block<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, 23 Mar 2024 at 15:39, Prathibha B <<a href="mailto:prathibhab.tvm@gmail.com">prathibhab.tvm@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div> if ( !create_dialog("B") ) {<br>
            send_reply(500,"Internal Server Error");<br>
            exit;<br>
        }<br>
        else<br>
            dlg_on_answer("dlg_answered");<br>
<br>
</div>
<div><br>
</div>
route[dlg_answered] {<br>
        $var(payload) = "{'type':'ANSWERED', 'from':" + $fU +", 'to':" + $tU+ "}";<br>
<div>}</div>
<div><b>Result:</b></div>
<div>{'type':'ANSWERED', 'from':<b>from</b>, 'to'<b>:to</b>}<br>
</div>
<div><br>
</div>
<div>$fU - from URI</div>
<div>$tU - to URI</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Regards,</div>
<div>B.Prathibha<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Regards,</div>
<div>B.Prathibha<br>
</div>
</div>
</div>
</div>
</body>
</html>