<div dir="ltr"><div><div>Well. I found the issue.<br><br></div>I coordinated with service provider. They don't support json which was the main cause. <br></div>However, i suggest to extend example further with <br><pre class="gmail-programlisting" style="font-family:monospace;white-space:pre;background-color:rgb(252,255,252);border-width:1px;border-style:solid;border-color:rgb(153,204,204);color:rgb(0,0,0);padding-left:15pt;overflow:auto;border-radius:2.5px;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"># POST
$http_req(hdr) = "Content-Type: application/x-www-form-urlencoded";<br>$http_req(body) = "r_uri=$rU&f_uri=$fU";<br>http_async_query("<a href="http://example.com/test.php">http://example.com/test.php</a>", "HTTP_REPLY");<br clear="all"></pre><div class="gmail_extra"><div><div class="gmail_signature"><div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)">I hope this will save others time. <br></span></span></font></div><div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)"><br>--<br>regards,</span></span></font></div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)"><br>abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445</span></span></font></div></div>
<br><div class="gmail_quote">On 13 July 2017 at 16:49, Abdul Basit <span dir="ltr"><<a href="mailto:basit.engg@gmail.com" target="_blank">basit.engg@gmail.com</a>></span> wrote:<br><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><div><div><div><div>Hi, Brandon and Federico<br><br></div>Thank you for your reply.<br><br></div>Web server is not in my access and since its https request tcpdump will not help until i get specific certificates. I replaced the URL here.<br></div>Yes. 400 response is from server side.<br><span class="gmail-m_-8288569283839861488gmail-im"><pre class="gmail-m_-8288569283839861488gmail-m_4812022950792685815gmail-m_-5730796690091393150gmail-programlisting" style="font-family:monospace;white-space:pre-wrap;background-color:rgb(252,255,252);border-width:1px;border-style:solid;border-color:rgb(153,204,204);color:rgb(0,0,0);padding-left:15pt;overflow:auto;border-radius:2.5px;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font size="2"># POST
$http_req(body) = "r_uri=$rU&f_uri=$fU";
http_async_query("<a href="https://examp" target="_blank">https://<wbr>examp</a><a href="http://le.com/test.php" target="_blank">le.com/test.php</a>", "HTTP_REPLY");</font></pre></span><span class="gmail-m_-8288569283839861488gmail-im"></span>Its working fine without any header specification.<br><br></div>However, when i try to send in the example format:<br><span class="gmail-m_-8288569283839861488gmail-im"><pre class="gmail-m_-8288569283839861488gmail-m_4812022950792685815gmail-m_-5730796690091393150gmail-programlisting" style="font-family:monospace;white-space:pre-wrap;background-color:rgb(252,255,252);border-width:1px;border-style:solid;border-color:rgb(153,204,204);color:rgb(0,0,0);padding-left:15pt;overflow:auto;border-radius:2.5px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font size="2"># POST
$http_req(hdr) =</font><font size="2"> "Content-Type: application/json";<br>$http_req(method) = "POST";<br>$http_req(body) = "{'r_uri':'" + $rU + "', 'f_uri':'" + $fU + "'}";
http_async_query("<a href="https://examp" target="_blank">https://<wbr>examp</a><a href="http://le.com/test.php" target="_blank">le.com/test.php</a>", "HTTP_REPLY");</font></pre></span>It results in  <br><span class="gmail-"><span class="gmail-m_-8288569283839861488gmail-im"><font size="2"><span style="font-family:garamond,serif"><span style="background-color:rgb(207,226,243)">INFO: <script>: route[HTTP_REPLY]: status 400<br>INFO: <script>: route[HTTP_REPLY]: body Insufficient parameters.</span></span><span style="font-family:monospace,monospace"><br></span></font></span><br></span></div>where should i look? <br><div><div><div><br><div><br></div></div></div></div></div><div class="gmail_extra"><span class="gmail-"><br clear="all"><div><div class="gmail-m_-8288569283839861488gmail_signature"><div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)">--<br>regards,</span></span></font></div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)"><br>abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445</span></span></font></div></div>
<br></span><div class="gmail_quote"><div><div class="gmail-h5">On 13 July 2017 at 13:46, Federico Cabiddu <span dir="ltr"><<a href="mailto:federico.cabiddu@gmail.com" target="_blank">federico.cabiddu@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div dir="ltr">Hi,<div>this has nothing to do with the module. The reply is coming from your http server.</div><div>In the first request you are sending a json body with "Content-Type: application/x-www-form-urlenco<wbr>ded" while it should be "Content-Type: application/json". </div><div>In the second request you are sending a totally different body.</div><div>You should check your webserver's logs.</div><div><br></div><div>Best regards,</div><div><br></div><div>Federico Cabiddu</div></div>
<br></div></div><span class="gmail-">______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div></div>