<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi&nbsp;<span style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">R&#259;zvan,</span></div>

<div>&nbsp;</div>

<div>Thanks for the response.</div>

<div>The &quot;<span style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">get_statistics</span>&quot; command works fine with the comma-separated params.</div>

<div>&nbsp;</div>

<div>Facing problem with &#39;<span style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">t_uac_dlg</span>&#39; command.</div>

<div>Can&#39;t figure out how to pass the headers in the params.</div>

<div>&nbsp;</div>

<div>As per the &#39;tm&#39; module doc:</div>

<div>
<div class="titlepage" style="font-family: Helvetica, Arial; font-size: medium; line-height: normal;">
<h3 class="title"><code class="function">t_uac_dlg</code></h3>
</div>

<p style="font-family: Helvetica, Arial; font-size: 12px; text-align: justify; line-height: normal;">Generates and sends a local SIP request.</p>

<p style="font-family: Helvetica, Arial; font-size: 12px; text-align: justify; line-height: normal;">Parameters:</p>

<div class="itemizedlist" style="font-family: Helvetica, Arial; font-size: medium; line-height: normal;">
<ul type="disc">
        <li>
        <p style="font-size: 12px; text-align: justify;"><span class="emphasis"><em>method</em></span>&nbsp;- request method</p>
        </li>
        <li>
        <p style="font-size: 12px; text-align: justify;"><span class="emphasis"><em>RURI</em></span>&nbsp;- request SIP URI</p>
        </li>
        <li>
        <p style="font-size: 12px; text-align: justify;"><span class="emphasis"><em>NEXT HOP</em></span>&nbsp;- next hop SIP URI (OBP); use &ldquo;<span class="quote">.</span>&rdquo; if no value.</p>
        </li>
        <li>
        <p style="font-size: 12px; text-align: justify;"><span class="emphasis"><em>socket</em></span>&nbsp;- local socket to be used for sending the request; use &ldquo;<span class="quote">.</span>&rdquo; if no value.</p>
        </li>
        <li>
        <p style="font-size: 12px; text-align: justify;"><span class="emphasis"><em>headers</em></span>&nbsp;- set of additional headers to be added to the request; at least &ldquo;<span class="quote">From</span>&rdquo; and &ldquo;<span class="quote">To</span>&rdquo; headers must be specify)</p>
        </li>
        <li>
        <p style="font-size: 12px; text-align: justify;"><span class="emphasis"><em>body</em></span>&nbsp;- (optional, may not be present) request body (if present, requires the &ldquo;<span class="quote">Content-Type</span>&rdquo; and &ldquo;<span class="quote">Content-length</span>&rdquo; headers)</p>
        </li>
</ul>
</div>
</div>

<div><span style="line-height: 1.6em;">I want to send (say) an OPTIONS packet.</span></div>

<div>
<div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">The following fifo commands works fine:</div>

<div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">opensipsctl fifo t_uac_dlg OPTIONS &quot;sip:1000001115@10.0.0.30&quot; . . &quot;&#92;&quot;From: sip:1111111111@10.0.0.30&#92;r&#92;nTo: sip:1000001115@10.0.0.30&#92;r&#92;nContent-Type: text/plain&#92;r&#92;n&quot;&#92;&quot;</div>

<div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">&nbsp;</div>
</div>

<div>But, &#39;mi_json&#39; command won&#39;t work.</div>

<div>Have tried (without luck) with several permutations, including the follwoing:</div>

<div>curl 127.0.0.1:8888/json/<span style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">t_uac_dlg</span>?params=<span style="line-height: 1.6em;">OPTIONS,sip:1000001115@10.0.0.30,.,.,</span><span style="line-height: 1.6em;">From: sip:1111111111@10.0.0.30,</span><span style="line-height: 1.6em;">To: sip:1000001115@10.0.0.30,</span><span style="line-height: 1.6em;">Content-Type: text/plain</span></div>

<div>&nbsp;</div>

<div>Have tried with url encoing the complete params query string; but no OPTIONS packet goes out.</div>

<div><span style="line-height: 1.6em;">No errors in the log also (debug level 4).&nbsp;</span></div>

<div>&nbsp;</div>

<div>Any clues?</div>

<div>&nbsp;</div>

<div><span style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">Regards</span></div>

<div><span style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">-Gary</span></div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Monday, September 22, 2014 at 8:11 AM<br/>
<b>From:</b>&nbsp;&quot;R&#259;zvan Crainea&quot; &lt;razvan@opensips.org&gt;<br/>
<b>To:</b>&nbsp;users@lists.opensips.org<br/>
<b>Subject:</b>&nbsp;Re: [OpenSIPS-Users] mi_json parameters format</div>

<div name="quoted-content">Hi, Gary!<br/>
<br/>
As the documentation indicates, you should pass the parameters separated<br/>
by comma. You can try something like this:<br/>
<br/>
curl &quot;http://127.0.0.1:8888/JSON/get_statistics?params=tm:,dialog:&quot;<br/>
<br/>
Best regards,<br/>
<br/>
R&#259;zvan Crainea<br/>
OpenSIPS Solutions<br/>
<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a><br/>
<br/>
On 09/18/2014 11:41 PM, Gary Nyquist wrote:<br/>
&gt; Hi,<br/>
&gt;<br/>
&gt; I am trying to use the MI interface to generate SIP MESSAGE packets locally<br/>
&gt; and send out to remote SIP UA.<br/>
&gt;<br/>
&gt; The &#39;opensipsctl fifo&#39; method works fine.<br/>
&gt; The &#39;mi_datagram&#39; method works fine.<br/>
&gt;<br/>
&gt; But not able to make &quot;mi_json&quot; work with &quot;t_uac_dlg&quot;.<br/>
&gt; Basically, can&#39;t figure out how the parameters for &quot;t_uac_dlg&quot; be formatted for the mi_json query.<br/>
&gt;<br/>
&gt; Reading the manual, I understand that the &quot;parameters are to be comma-separated then URI-encoded.&quot;<br/>
&gt; The following working fine:<br/>
&gt; curl 10.0.0.30:8888/json/get_statistics?params=all<br/>
&gt;<br/>
&gt; But can&#39;t figure out how to pass the parameters for &quot;t_uac_dlg&quot; command.<br/>
&gt;<br/>
&gt; Any help / advice?<br/>
&gt;<br/>
&gt; Thanks<br/>
&gt; -Gary<br/>
&gt;<br/>
&gt; _______________________________________________<br/>
&gt; Users mailing list<br/>
&gt; Users@lists.opensips.org<br/>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br/>
<br/>
<br/>
_______________________________________________<br/>
Users mailing list<br/>
Users@lists.opensips.org<br/>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></div>
</div>
</div></div></body></html>