<!-- 
RSS generated by JIRA (8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a) at Sat Feb 10 07:13:46 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-54] Inbound calls from provider should not be rated through origination rates</title>
                <link>https://jira.astppbilling.org/browse/ASTPPCOM-54</link>
                <project id="10608" key="ASTPPCOM">ASTPP Community</project>
                    <description>&lt;p&gt;Calls that are inbound via a provider should not get rated using the origination rates. These calls should only get rated via the DID table.&lt;/p&gt;

&lt;p&gt;Further more the CDR for inbound is inserting 2 records into the table and should only insert the CDR for the customer and not the provider.&lt;/p&gt;

&lt;p&gt;This is causing inaccurate reporting for the provider and customers.&lt;/p&gt;</description>
                <environment></environment>
        <key id="11874">ASTPPCOM-54</key>
            <summary>Inbound calls from provider should not be rated through origination rates</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="fozzygo4">fozzygo4</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Aug 2016 13:32:21 +0530</created>
                <updated>Thu, 1 Apr 2021 19:00:40 +0530</updated>
                            <resolved>Thu, 1 Apr 2021 19:00:40 +0530</resolved>
                                                    <fixVersion>v3.5</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                <comments>
                            <comment id="12597" author="fozzygo4" created="Fri, 12 Aug 2016 16:21:45 +0530"  >&lt;p&gt;I have made the following changes in /html/fs/lib/astpp.cdr.php that prevents the outbound CDR entry being added to CDR of the provider when the call is inbound from provider. Please let me know if this makes sense.&lt;/p&gt;

&lt;p&gt;At line: 118&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;($account_type != 3)
+   {
    $query = &lt;span class=&quot;code-quote&quot;&gt;&quot;INSERT INTO cdrs (uniqueid,accountid,type,callerid,callednum,billseconds,trunk_id,trunkip,callerip,disposition,callstart,debit,cost,provider_id,pricelist_id,package_id,pattern,notes,rate_cost,reseller_id,reseller_code,reseller_code_destination,reseller_cost,provider_code,provider_code_destination,provider_cost,provider_call_cost,call_direction,calltype,profile_start_stamp,answer_stamp,bridge_stamp,progress_stamp,progress_media_stamp,end_stamp,billmsec,answermsec,waitmsec,progress_mediamsec,flow_billmsec)  values ($cdr_string)&quot;&lt;/span&gt;;
    $logger-&amp;gt;log($query);
    $db-&amp;gt;run($query);
+   }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="12598" author="fozzygo4" created="Fri, 12 Aug 2016 17:00:46 +0530"  >&lt;p&gt;I have further modified the IF statement as follows:&lt;br/&gt;
&lt;tt&gt;if($account_type == 0 &amp;amp;&amp;amp; $dataVariable&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;provider_id&amp;#39;&amp;#93;&lt;/span&gt; != 0)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;This now works correctly on CDR reports. It does the following:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;If the call is inbound from provider, the CDR record is entered into the DB as 1 record for the customer.&lt;/li&gt;
	&lt;li&gt;If the call is inbound from customer A to customer B using a DID, the same applies to the CDR record as above.&lt;/li&gt;
	&lt;li&gt;No CDR record of outbound is sent to the DB if the call is a DID call.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This now works well on the basis that one does not bill customer A to customer B. Not sure how one would implement that.&lt;/p&gt;

&lt;p&gt;Also I have noticed that the balance of customer A is effected with call charge even though it is a free DID call.&lt;/p&gt;</comment>
                            <comment id="12599" author="fozzygo4" created="Sun, 14 Aug 2016 16:36:20 +0530"  >&lt;p&gt;After doing some further testing I have come to the following conclusion and some scenarios:&lt;/p&gt;

&lt;p&gt;I now understand the principle of the inbound call being rated through origination rates based on the fact that if a provider charges for inbound calls then you would want to pass that charge onto the customer. If not then you can simply add the DID to the origination rate and the call will not be billed but this still adds extra records to the CDR table which still makes the duration total inaccurate. The solution to this is to remove the extra DID entry from the CDR table but the record for the CDR from the provider will have a disposition of &quot;STANDARD&quot; and not DID. This also adds room for error if one adds a DID to a customer and forgets to add the DID to all the origination rates. So my conclusion is this is not practical.&lt;/p&gt;

&lt;p&gt;Another scenario and this is more practical but I feel needs extra work done on the DID rating system else it does not give the ability to have inbound charges calculated to the provider.&lt;br/&gt;
As mentioned in the above posts I feel the inbound calls should not be rated through an origination rate and rather be rated through the DID entry.&lt;/p&gt;

&lt;p&gt;Currently you can add a per min charge and intervals to the DID but this will bill the customer who owns the DID. perhaps add a cost field to the DID for the provider or a checkbox to enable or disable billing of the provider.&lt;/p&gt;

&lt;p&gt;Hope this makes sense to everyone. At this point as we are not charging for inbound calls in my country, I have made the following changes the the astpp.cdr.php file that makes my scenario work for me.&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-comment&quot;&gt;// *** Function by Fozzy ***
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;($account_type == 0 &amp;amp;&amp;amp; $dataVariable[&lt;span class=&quot;code-quote&quot;&gt;&apos;provider_id&apos;&lt;/span&gt;] != 0)
    {
    $query = &lt;span class=&quot;code-quote&quot;&gt;&quot;INSERT INTO cdrs (uniqueid,accountid,type,callerid,callednum,billseconds,trunk_id,trunkip,callerip,disposition,callstart,debit,cost,provider_id,pricelist_id,package_id,pattern,notes,rate_cost,reseller_id,reseller_code,reseller_code_destination,reseller_cost,provider_code,provider_code_destination,provider_cost,provider_call_cost,call_direction,calltype,profile_start_stamp,answer_stamp,bridge_stamp,progress_stamp,progress_media_stamp,end_stamp,billmsec,answermsec,waitmsec,progress_mediamsec,flow_billmsec)  values ($cdr_string)&quot;&lt;/span&gt;;
    $logger-&amp;gt;log($query);
    $db-&amp;gt;run($query);
    } &lt;span class=&quot;code-comment&quot;&gt;// End Function by Foz
&lt;/span&gt;    &lt;span class=&quot;code-comment&quot;&gt;//Update customer balance
&lt;/span&gt;    &lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;($debit &amp;gt; 0 &amp;amp;&amp;amp; $dataVariable[&lt;span class=&quot;code-quote&quot;&gt;&apos;calltype&apos;&lt;/span&gt;] != &lt;span class=&quot;code-quote&quot;&gt;&quot;FREE&quot;&lt;/span&gt;) 
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;// Function modified my Fozzy 
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;($debit &amp;gt; 0 &amp;amp;&amp;amp; $dataVariable[&lt;span class=&quot;code-quote&quot;&gt;&apos;calltype&apos;&lt;/span&gt;] != &lt;span class=&quot;code-quote&quot;&gt;&quot;FREE&quot;&lt;/span&gt; &amp;amp;&amp;amp; $account_type == 0 &amp;amp;&amp;amp; $dataVariable[&lt;span class=&quot;code-quote&quot;&gt;&apos;provider_id&apos;&lt;/span&gt;] != 0)
    {
        update_balance($accountid, $debit, 0, $logger, $db);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="12600" author="smrdoshi" created="Tue, 5 Sep 2017 18:11:43 +0530"  >&lt;p&gt;We made it configurable. If you want to avoid it then you need to set variable INB_FREE=&quot;true&quot; in /var/lib/astpp/astpp.lua. That will avoid billing of DID calls for provider. &lt;/p&gt;

&lt;p&gt;Update to ASTPP 3.5 and test it out. &lt;/p&gt;</comment>
                            <comment id="12601" author="eightsixeight" created="Fri, 2 Mar 2018 17:43:18 +0530"  >&lt;p&gt;i have same issue as fuzzy, i need to know my COST from provider on the DID...&lt;/p&gt;

&lt;p&gt;right now inbound call never show any cost in /reports/customerReport/&lt;/p&gt;</comment>
                            <comment id="12602" author="smrdoshi" created="Mon, 5 Mar 2018 20:06:34 +0530"  >&lt;p&gt;We do not have DID buy rate option at the moment. Becuase of that you will not be able to get any value in COST field in DID calls. &lt;/p&gt;

&lt;p&gt;If you want to know the cost for the provider then you can create origination rate with DID prefix and define the amount in that. Then assign that rate group to provider. So whenever, we will get call from that provider, system will check origination rates and then route the call to DID. &lt;/p&gt;

&lt;p&gt;That way you will get 2 entries. 1 with provider account with debit value and 2nd with customer to whom DID is assigned. &lt;/p&gt;

&lt;p&gt;Note: Make sure you do not have INB_FREE configured in astpp-config.lua. &lt;/p&gt;
</comment>
                            <comment id="12603" author="eightsixeight" created="Sun, 11 Mar 2018 18:57:46 +0530"  >&lt;p&gt;i did that put the full DID in the originator rate, i get this as cdr&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://prntscr.com/ipo08k&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://prntscr.com/ipo08k&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and astpp logs&lt;/p&gt;

&lt;p&gt;`&lt;br/&gt;
action application=&quot;set&quot; data=&quot;fax_enable_t38_request=true&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;action application=&quot;set&quot; data=&quot;origination_rates_did=ID:5|CODE:^.1418xxxxxx.*|DESTINATION:1418xxxxxx|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.01875|INC:0|INITIALBLOCK:0|RATEGROUP:0|MARKUP:150|ACCID:5&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;action application=&quot;set&quot; data=&quot;origination_rates=ID:371167|CODE:^1418xxxxxx.*|DESTINATION:DID|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.0125|INC:6|INITIALBLOCK:6|RATEGROUP:1|MARKUP:150|ACCID:4&quot;/&amp;gt;`&lt;/p&gt;

&lt;p&gt;but doesnt show in cost still.. any other idea ?&lt;/p&gt;

&lt;p&gt;hard to figure my costs when all inbound shows no cost&lt;/p&gt;</comment>
                            <comment id="12604" author="smrdoshi" created="Mon, 12 Mar 2018 19:06:22 +0530"  >&lt;p&gt;Again, for DID calls, you will never get cost field. Cost field will have&lt;br/&gt;
value when call will be routed via any trunk / carrier. For inbound calls,&lt;br/&gt;
we are not routing call via trunk / carrier, so that field will never get&lt;br/&gt;
populated.&lt;/p&gt;





&lt;p&gt;&amp;lt;&lt;a href=&quot;https://mailtrack.io/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mailtrack.io/&lt;/a&gt;&amp;gt; Sent with Mailtrack&lt;br/&gt;
&amp;lt;&lt;a href=&quot;https://mailtrack.io?utm_source=gmail&amp;amp;utm_medium=signature&amp;amp;utm_campaign=signaturevirality&amp;amp;&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mailtrack.io?utm_source=gmail&amp;amp;utm_medium=signature&amp;amp;utm_campaign=signaturevirality&amp;amp;&lt;/a&gt;&amp;gt;&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;BestRegards&quot;&gt;&lt;/a&gt;Best Regards&lt;/h2&gt;
&lt;p&gt;Samir Doshi&lt;br/&gt;
&lt;em&gt;iNextrix Technologie&lt;/em&gt;&lt;em&gt;s Pvt. Ltd&lt;/em&gt;.&lt;br/&gt;
&lt;a href=&quot;http://www.inextrix.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.inextrix.com&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;em&gt;Disclaimer:&lt;/em&gt;&lt;br/&gt;
The information contained in this communication is confidential and may be&lt;br/&gt;
legally privileged. It is intended solely for the use of the individual or&lt;br/&gt;
entity to whom it is addressed and others authorized to receive it. If you&lt;br/&gt;
are not the intended recipient you are hereby notified that any disclosure,&lt;br/&gt;
copying, distribution or taking action in reliance on the contents of this&lt;br/&gt;
information is strictly prohibited and may be unlawful. Please notify the&lt;br/&gt;
sender immediately and destroy all copies of this message and any&lt;br/&gt;
attachments contained in it.&lt;/p&gt;

&lt;p&gt;On Sun, Mar 11, 2018 at 6:57 PM, Frank &amp;lt;notifications@github.com&amp;gt; wrote:&lt;/p&gt;

&lt;p&gt;&amp;gt; i did that put the full DID in the originator rate, i get this as cdr&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; &lt;a href=&quot;http://prntscr.com/ipo08k&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://prntscr.com/ipo08k&lt;/a&gt;&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; and astpp logs&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; action application=&quot;set&quot; data=&quot;fax_enable_t38_request=true&quot;/&amp;gt;&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; but doesnt show in cost still.. any other idea ?&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; hard to figure my costs when all inbound shows no cost&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; &#8212;&lt;br/&gt;
&amp;gt; You are receiving this because you modified the open/close state.&lt;br/&gt;
&amp;gt; Reply to this email directly, view it on GitHub&lt;br/&gt;
&amp;gt; &amp;lt;&lt;a href=&quot;https://github.com/iNextrix/ASTPP/issues/54#issuecomment-372115550&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/iNextrix/ASTPP/issues/54#issuecomment-372115550&lt;/a&gt;&amp;gt;, or mute&lt;br/&gt;
&amp;gt; the thread&lt;br/&gt;
&amp;gt; &amp;lt;&lt;a href=&quot;https://github.com/notifications/unsubscribe-auth/AA6gcU4Kne2uRrvjBM2SVqZyaD5Q1SYkks5tdSZSgaJpZM4Ji29j&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/notifications/unsubscribe-auth/AA6gcU4Kne2uRrvjBM2SVqZyaD5Q1SYkks5tdSZSgaJpZM4Ji29j&lt;/a&gt;&amp;gt;&lt;br/&gt;
&amp;gt; .&lt;br/&gt;
&amp;gt;&lt;/p&gt;</comment>
                            <comment id="12605" author="eightsixeight" created="Thu, 29 Mar 2018 05:58:25 +0530"  >&lt;p&gt;its a call from trunk..&lt;/p&gt;

&lt;p&gt;landline --&amp;gt; telco --&amp;gt; pri --&amp;gt;provider SIP as 14185551212@astppIP  (astpp) gets this from trunk provider aka gateway carrier etc&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>54</customfieldvalue>

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

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