<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \,serif";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle27
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:910654852;
        mso-list-type:hybrid;
        mso-list-template-ids:214177932 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Liviu, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">How can I point to opensips to use &quot;libcurl-openssl-dev&quot; instead of &#8220;gnutls-dev&#8221; -?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Would be great if you guide me here.
</span><tt><span style="font-size:10.0pt"><o:p></o:p></span></tt></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Regards,<br>
Agalya<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Liviu Chircu [mailto:liviu@opensips.org]
<br>
<b>Sent:</b> Tuesday, November 08, 2016 12:29 PM<br>
<b>To:</b> Ramachandran, Agalya (Contractor) &lt;Agalya_Ramachandran@comcast.com&gt;; OpenSIPS users mailling list &lt;users@lists.opensips.org&gt;<br>
<b>Subject:</b> Re: Support for https in async<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p>Hi Agalya!<span style="font-size:12.0pt"><o:p></o:p></span></p>
<p><span style="color:#1F497D">&gt; handle https queries</span><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Regarding HTTPS queries, could you try to build your rest_client with &quot;libcurl-openssl-dev&quot; instead of &quot;libcurl-gnutls-dev&quot; as a possible fix?</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">&gt; </span></tt><span style="color:#1F497D">why is curl_multi_wait is not used</span><o:p></o:p></p>
<p>We don't want to block OpenSIPS after issuing an async query, but rather use the core async interface in order to quickly resume processing the next SIP message.<o:p></o:p></p>
<p><span style="color:#1F497D">&gt;&nbsp;</span><span style="font-size:7.0pt;color:#1F497D">&nbsp;
</span><span style="color:#1F497D">What is the use of read_fds[] in rest_methods.c</span><o:p></o:p></p>
<p>Helps us find the needle in the haystack. If we find the needle (i.e. the new fd), we can throw it into the reactor and successfully exit. Otherwise, the connect operation is still going, and we need to wait a bit more.<o:p></o:p></p>
<p><span style="color:#1F497D">&gt; Why select() is not used ?</span><o:p></o:p></p>
<p>We don't want to do select() in the module code. The core reactor already does that for us. The module's only job in the async pattern is to produce file descriptors and feed them to the core async engine.<o:p></o:p></p>
<p>Regards,<o:p></o:p></p>
<pre>Liviu Chircu<o:p></o:p></pre>
<pre>OpenSIPS Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 08.11.2016 19:10, Ramachandran, Agalya (Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D">Hi Liviu, </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Thank you for response. I have few questions, can you please clarify me on these.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style="color:#1F497D">Is there is a roadmap in future targeting async() to handle https queries?</span><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style="color:#1F497D">In start_async_http_request(), why is curl_multi_wait is not used to overcome 1024 fds limitation? and is there plan to use it in future?</span><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style="color:#1F497D">What is the use of read_fds[] in rest_methods.c and who uses it?
</span><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style="color:#1F497D">Why select() is not used ?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Agalya</span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Liviu Chircu [<a href="mailto:liviu@opensips.org">mailto:liviu@opensips.org</a>]
<br>
<b>Sent:</b> Monday, October 31, 2016 12:27 PM<br>
<b>To:</b> Ramachandran, Agalya (Contractor) <a href="mailto:Agalya_Ramachandran@comcast.com">
&lt;Agalya_Ramachandran@comcast.com&gt;</a>; OpenSIPS users mailling list <a href="mailto:users@lists.opensips.org">
&lt;users@lists.opensips.org&gt;</a><br>
<b>Subject:</b> Re: Support for https in async</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Hi, Agalya!</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">We have not done any development in that direction, and I assume it won't work out of the box, as we need to instruct libcurl on where to find the CA certificate before we can expect it to establish the TLS connection.
 As an alternative, we could add the option of disabling host/peer verifications like here [1]</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">[1]: <a href="https://curl.haxx.se/libcurl/c/https.html">
https://curl.haxx.se/libcurl/c/https.html</a></span></tt><o:p></o:p></p>
<pre>Liviu Chircu<o:p></o:p></pre>
<pre>OpenSIPS Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 31.10.2016 16:41, Ramachandran, Agalya (Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:blue">Hi team, </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Have you tried with </span><b><span style="color:red"><a href="https://url"><span style="color:red">https://url</span></a></span></b><span style="color:red">
</span><span style="color:blue">with async and does that work without issue ?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">When I try, resume_async_http_req is called, but crash is occurring at libcurl library. So helpless to debug further.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">async(rest_put</span><span style="color:red">(<b><a href="https://url">&quot;https://url&quot;</a>,
</b></span><span style="color:blue">&quot;$fU,$tU,$ci &quot;, &quot;application/json&quot;, &quot;$var(body)&quot;, &quot;$var(ct)&quot;, &quot;$var(rcode)&quot;),resume);</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">My question is crash occring only in my scenario or &nbsp;OpenSIPS doesn&#8217;t support async as https?
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Here is my dump just in case for reference.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><i><span style="color:#A50021">#0&nbsp; 0x00007f567248da1e in Curl_raw_nequal () from /lib64/libcurl.so.4</span></i><o:p></o:p></p>
<p class="MsoNormal"><i><span style="color:#A50021">#1&nbsp; 0x00007f567245bd0f in Curl_checkheaders () from /lib64/libcurl.so.4</span></i><o:p></o:p></p>
<p class="MsoNormal"><i><span style="color:#A50021">#2&nbsp; 0x00007f567245d1e5 in Curl_http () from /lib64/libcurl.so.4</span></i><o:p></o:p></p>
<p class="MsoNormal"><i><span style="color:#A50021">#3&nbsp; 0x00007f567246db4b in Curl_do () from /lib64/libcurl.so.4</span></i><o:p></o:p></p>
<p class="MsoNormal"><i><span style="color:#A50021">#4&nbsp; 0x00007f567247da1b in multi_runsingle () from /lib64/libcurl.so.4</span></i><o:p></o:p></p>
<p class="MsoNormal"><i><span style="color:#A50021">#5&nbsp; 0x00007f567247e121 in curl_multi_perform () from /lib64/libcurl.so.4</span></i><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#6&nbsp; 0x00007f56726b75ca in resume_async_http_req (fd=9, msg=0x7f56739c0640 &lt;faked_req.10404&gt;, _param=0x7f56b3e354d0)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">&nbsp;&nbsp;&nbsp; at rest_methods.c:380</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#7&nbsp; 0x00007f56737771ff in t_resume_async (fd=0x7f56b3e26840, param=0x7f567405c3e8) at async.c:125</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#8&nbsp; 0x0000000000509975 in handle_io (fm=0x7f56b3e26840, idx=1, event_type=1) at net/net_udp.c:267</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#9&nbsp; 0x00000000005082b3 in io_wait_loop_epoll (h=0x806e00 &lt;_worker_io&gt;, t=1, repeat=0) at net/../io_wait_loop.h:221</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#10 0x0000000000509c30 in udp_rcv_loop (si=0x7f56b3dd6808) at net/net_udp.c:308</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#11 0x000000000050a1c8 in udp_start_processes (chd_rank=0x7d30e8 &lt;chd_rank.10706&gt;, startup_done=0x0) at net/net_udp.c:372</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#12 0x0000000000492304 in main_loop () at main.c:671</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#13 0x0000000000494d8f in main (argc=7, argv=0x7fff38a979f8) at main.c:1261</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Agalya</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Ramachandran, Agalya (Contractor) <br>
<b>Sent:</b> Thursday, October 27, 2016 4:24 PM<br>
<b>To:</b> <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>; 'Liviu Chircu'
<a href="mailto:liviu@opensips.org">&lt;liviu@opensips.org&gt;</a><br>
<b>Subject:</b> Support for https in async<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Hi team,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Just a quick question.. Does async(), method supports https request?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">When I try to use https, resume_async_http_req is called, but I never got the response and rather OpenSIPS crashed at libcurl.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Regards,<br>
Agalya</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman ,serif&quot;,serif">&nbsp;</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><o:p>&nbsp;</o:p></span></p>
</div>
</body>
</html>