<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Thank you, it's working!<br>
</p>
<br>
<div class="moz-cite-prefix">24.05.2016 16:53, Liviu Chircu пишет:<br>
</div>
<blockquote cite="mid:57444EDC.9060601@opensips.org" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<tt>Hi Igor!<br>
<br>
Pro tip: _any_ "Command cannot be used in the block" error can
be circumvented with the following mechanism:<br>
<br>
route [msilo_event] {</tt><br>
<tt> xlog("L_INFO","messages was deleted by msilo");<br>
rest_post(<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="http://192.168.101.4/handler.php">"http://192.168.101.4/handler.php"</a>,
"status_code=408", "application/x-www-form-urlencoded",
"$var(body)", , "$var(code)");<br>
}<br>
<br>
event_route [E_MSILO_MESSAGE_DELETE] {<br>
route(msilo_event);<br>
}<br>
<br>
Note: While we have nothing against using this kind of script
magic, please note that, unlike other parts of the code which
have<br>
received some community testing, this one has likely not
received much! In your specific case though (msilo events), it
looks quite safe.<br>
<br>
</tt>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 24.05.2016 14:45, Igor Pavlov
wrote:<br>
</div>
<blockquote
cite="mid:dd74814f-34e9-ea75-aa7f-b6ec4ee17aed@gmail.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<p>Hi all. I have opensips 1.11.6-tls (x86_64/linux). I'm trying
to execute rest_post() from event_route, but geting error:</p>
<p> </p>
<blockquote type="cite">CRITICAL:core:yyerror: parse error in
config file /etc/opensips/opensips.cfg, line 718, column
35-36: Command cannot be used in the block</blockquote>
event route section:
<blockquote type="cite">event_route[E_MSILO_MESSAGE_DELETE] {<br>
xlog("L_INFO","messages was deleted by msilo");<br>
rest_post(<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="http://192.168.101.4/handler.php">"http://192.168.101.4/handler.php"</a>,
"status_code=408", "application/x-www-form-urlencoded",
"$var(body)", , "$var(code)");<br>
}<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
____________
Best regards,
Igor Pavlov</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
____________
Best regards,
Igor Pavlov</pre>
</body>
</html>