<!-- 
RSS generated by JIRA (8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a) at Sat Feb 10 07:16:55 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Jira</title>
    <link>https://jira.astppbilling.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.13.3</version>
        <build-number>813003</build-number>
        <build-date>14-01-2021</build-date>
    </build-info>


<item>
            <title>[ASTPPCOM-415] Max call length appears to be calculated wrong, depending on settings</title>
                <link>https://jira.astppbilling.org/browse/ASTPPCOM-415</link>
                <project id="10608" key="ASTPPCOM">ASTPP Community</project>
                    <description>&lt;p&gt;The system Call Max Length that is set in Configuration &amp;gt; Settings defaults to 144000 (24 minutes).  It appears to interact with Origination rates to cause an incorrect calculation,  depending on the origination rate.&lt;/p&gt;

&lt;p&gt;If the call origination rate is 0.0200 6/6, max_call_length is correctly calculated as 24 minutes. This can be observed from &lt;tt&gt;fs_cli&lt;/tt&gt; while making the call.&lt;/p&gt;

&lt;p&gt;If I increase Call Max Length to 6000000, max_call_length is calculated as approx. 5000 minutes if I have a $50 credit in the prepay account.&lt;/p&gt;

&lt;p&gt;It appears the problem code is located here;&lt;br/&gt;
&lt;a href=&quot;https://github.com/iNextrix/ASTPP/blob/46f16a598b093842a1d8ca16a385dcb3d6f71bd2/freeswitch/scripts/astpp/lib/astpp.functions.lua#L326&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/iNextrix/ASTPP/blob/46f16a598b093842a1d8ca16a385dcb3d6f71bd2/freeswitch/scripts/astpp/lib/astpp.functions.lua#L326&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (tonumber(rates[&lt;span class=&quot;code-quote&quot;&gt;&apos;cost&apos;&lt;/span&gt;]) &amp;gt; 0 ) then
		      maxlength = ( balance -  rates[&lt;span class=&quot;code-quote&quot;&gt;&apos;connectcost&apos;&lt;/span&gt;] ) / rates[&lt;span class=&quot;code-quote&quot;&gt;&apos;cost&apos;&lt;/span&gt;]
		      
		      &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( config[&lt;span class=&quot;code-quote&quot;&gt;&apos;call_max_length&apos;&lt;/span&gt;] and (tonumber(maxlength) &amp;gt; tonumber(config[&lt;span class=&quot;code-quote&quot;&gt;&apos;call_max_length&apos;&lt;/span&gt;]) / 1000)) then
				maxlength = config[&lt;span class=&quot;code-quote&quot;&gt;&apos;call_max_length&apos;&lt;/span&gt;] / 1000 / 60
			      Logger.info(&lt;span class=&quot;code-quote&quot;&gt;&quot;[FIND_MAXLENGTH] LIMITING CALL TO CONFIG MAX LENGTH &quot;&lt;/span&gt;..maxlength..&lt;span class=&quot;code-quote&quot;&gt;&quot;!!!&quot;&lt;/span&gt;)
		      end
		&lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
		      Logger.info(&lt;span class=&quot;code-quote&quot;&gt;&quot;[FIND_MAXLENGTH] Call is free - assigning max length!!! :: &quot;&lt;/span&gt; .. config[&lt;span class=&quot;code-quote&quot;&gt;&apos;max_free_length&apos;&lt;/span&gt;] )
		      maxlength = config[&lt;span class=&quot;code-quote&quot;&gt;&apos;max_free_length&apos;&lt;/span&gt;]
		end      
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It appears that when the calculation sets &lt;tt&gt;maxlength = config&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;call_max_length&amp;#39;&amp;#93;&lt;/span&gt; / 1000 / 60&lt;/tt&gt;, it correct calculated system max call length.  Otherwise it is set to &lt;tt&gt;maxlength = ( balance -  rates&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;connectcost&amp;#39;&amp;#93;&lt;/span&gt; ) / rates&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;cost&amp;#39;&amp;#93;&lt;/span&gt;&lt;/tt&gt;, which is based on the account balance.   I assume this is to adjust the max call length to the lesser of the two calculations.  However, the calculation does not appear to be correct.&lt;/p&gt;</description>
                <environment></environment>
        <key id="12235">ASTPPCOM-415</key>
            <summary>Max call length appears to be calculated wrong, depending on settings</summary>
                <type id="10201" iconUrl="https://jira.astppbilling.org/secure/viewavatar?size=xsmall&amp;avatarId=10700&amp;avatarType=issuetype">New Feature</type>
                                                <status id="10001" iconUrl="https://jira.astppbilling.org/images/icons/status_generic.gif" description="">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="samir.doshi">Samir Doshi</assignee>
                                    <reporter username="powerpbx">powerpbx</reporter>
                        <labels>
                    </labels>
                <created>Sat, 28 Apr 2018 23:44:22 +0530</created>
                <updated>Thu, 1 Apr 2021 18:58:05 +0530</updated>
                            <resolved>Thu, 1 Apr 2021 18:58:05 +0530</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                <comments>
                            <comment id="13349" author="smrdoshi" created="Thu, 3 May 2018 13:35:18 +0530"  >&lt;p&gt;Found the problem and it is fixed now in latest source. &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10703" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>415</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10006" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i00b73:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>