Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inbound DID billing not working #17

Closed
miken32 opened this issue Jan 13, 2012 · 3 comments
Closed

Inbound DID billing not working #17

miken32 opened this issue Jan 13, 2012 · 3 comments

Comments

@miken32
Copy link
Contributor

miken32 commented Jan 13, 2012

Function bill_did_aleg in Class.A2Billing.php needs $A2B to be declared so it can check the status of answer_call.

--- Class.A2Billing.php 2012-01-13 15:50:42.000000000 -0800
+++ Class.A2Billing.php 2012-01-13 15:52:09.000000000 -0800
@@ -1801,7 +1801,8 @@
     */
    function bill_did_aleg ($agi, $inst_listdestination, $b_leg_answeredtime = 0)
    {
-       
+       global $A2B;
+
        $start_time = $this -> G_startime;
        $stop_time = time();
        $timeinterval = $inst_listdestination[19];
@miken32
Copy link
Contributor Author

miken32 commented Feb 10, 2012

Actually, looking at the code I'm not sure now. I see the config being referenced as $this->agiconfig['answer_call'], $A2B->agiconfig['answer_call'] as well as $this->config['agiconf1']['answer_call'].

Probably the fix should just replace the reference to $A2B->agiconfig['answer_call'] with $this->agiconfig['answer_call'].

@miken32
Copy link
Contributor Author

miken32 commented Feb 10, 2012

diff --git a/common/lib/Class.A2Billing.php b/common/lib/Class.A2Billing.php
index fe80988..7021b1b 100755
--- a/common/lib/Class.A2Billing.php
+++ b/common/lib/Class.A2Billing.php
@@ -1853,7 +1853,7 @@ class A2Billing {
             # duration of the call for the A-Leg is since the start date

             // SET CORRECTLY THE CALLTIME FOR THE 1st LEG
-               if ($A2B -> agiconfig['answer_call'] == 1) {
+               if ($this -> agiconfig['answer_call'] == 1) {
                    $aleg_answeredtime  = time() - $this -> G_startime;
                } else {
                    $aleg_answeredtime = $b_leg_answeredtime;

@miken32 miken32 closed this as completed Aug 17, 2012
@miken32
Copy link
Contributor Author

miken32 commented Aug 17, 2012

closed and re-opened as pull request in issue 28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant