Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 7:56 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Calls hang up all the time
PostPosted: Wed Jan 26, 2011 12:11 am 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
Hello,

http://wklejto.pl/87889 -> under this link you will find my Asterisk's output during my call. In this log I call a polish number 0048XXXXXX00, you can see the call goes to a2billing extension (so, settings are probably fine). I have Elastix with 1.3 version of a2billing. I uploaded rates, they all work and can be reviewed in Elastix. In freepbx I also created local trunk to a2billing and a trunk to the operator.

I followed some tutorial from sysadminman.net exactly and thoroughly, but it does not work. I have the feeling that the outbound trunk to my operator is never used. I double checked that I have the trunk name (from FreePBX) in a2billing trunk menu in Provider IP field.

Would you mind if I asked for some hints? I am out of ideas... I'll say it even though I hate it: "It's probably nothing".


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Wed Jan 26, 2011 4:32 pm 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
Ok, just to clarify:

That is my a2billing extension:

[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Hangup

In A2B I have already defined rate plan and call plan, as I said - according to what is written in the tutorial on sysadminman.net. The article is entitled: "Using A2Billing to account for extension calls in Elastix".

Anyone?


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Wed Jan 26, 2011 5:06 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Without some output from the logs (attached not pasted) with the verbosity turned up, any answers would be guesses.

Joe


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Wed Jan 26, 2011 5:54 pm 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
Hi, thanks for your interest. Sorry for the logs, just thought it is more readable the way I did it.

I added an attachment to this post.

:arrow: EDITED:
One question just crossed my mind: after calling DeadAGI(a2billing.php|1) should I not see any output of a2billing.php script? Or does it depend on verbosity? By this log Verbosity was at level 23.

:arrow: EDITED #2:
I am connected with the SIP server using X-Lite, my peer connects to FreePBX (if you can say so), not a2billing.


Attachments:
File comment: Asterisk output.
ast-logs.txt [8.98 KiB]
Downloaded 1078 times
Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Thu Jan 27, 2011 12:16 pm 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
By the way - I just checked the rate card, as you can see on the print screen, the rate for "486182" is set.
BUT - when I go to "ratecard simulator" and insert card number and the called number, it shows "Error card !!!".

In customer list (asterisk2.PNG) you can see that the customer exists and everything is ok. I, however, set "Enable SIP account" and "Enable IAX account" to NO, because I thought it is not necessary as these extensions are not hooked to a2billing but to FreePBX.

I still have no progress... :| :?


Attachments:
File comment: customer list
asterisk2.PNG
asterisk2.PNG [ 16.19 KiB | Viewed 21187 times ]
File comment: a2billing - ratecard
asterisk.PNG
asterisk.PNG [ 61.97 KiB | Viewed 21178 times ]
Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Thu Jan 27, 2011 6:19 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Have you implemented passing the call from FreePBX to A2Billing using the pre-dial hook, as described on page three here

viewtopic.php?f=4&t=2127

Joe


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Thu Jan 27, 2011 11:02 pm 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
Joe, thanks for pointing out what needed to be done but has not been because of... don't really know why. :oops:

Anyway, I did it and the problem is different now. I know you might say it's been already covered, but I tried all the hints and now I keep getting busy circuits all the time. It decides everyone is busy/congested and then chanunavail and hangupcause = 66. :cry: I attach my logs...
Attachment:
after-changes.txt [7.88 KiB]
Downloaded 1235 times
.

Thanks in advance, I know you have far more complicated things to cope with...

:arrow: EDIT:
The trunk out is defined in FreePBX and it's name is used in A2B. Afaik it should not cause problems and should work. Am I wrong?


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Fri Jan 28, 2011 10:23 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Recheck your pre-dial hook context, it does not seem to be using it.

Joe


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Fri Jan 28, 2011 6:31 pm 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
Hi Joe,

Thanks for trying to help, I really appreciate it!

I did just recheck it. I'll just post how my predial-hook (these lines are in extensions.conf) looks like this:

Code:
[macro-dialout-trunk-predial-hook]
; Modified to support outbound calling for A2B
; original line: exten => s,n(skipoutnum),Dial(${pre_num:4}${the_num}${post_num},300,${DIAL_TRUNK_OPTIONS})
; added function
exten => s,n(skipoutnum),GotoIf($["${pre_num}" = "AMP:A2B/"]?a2bdial:skipoutnumnormal) ; Checks for A2B custom trunk and dials it.
exten => s,n(a2bdial),DeadAGI(a2billing.php|2|${OUTNUM}) ; Dials out via the a2billing.php script.
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s,n(skipoutnumnormal),Dial(${pre_num:4}${the_num}${post_num},300,${DIAL_TRUNK_OPTIONS})
; end of modified additions


As I made some minor changes to predial-hook in DeadAGI (in this line: exten => s,n(a2bdial),DeadAGI(a2billing.php|2|${OUTNUM}) ), I attach the new output from Asterisk.
Attachment:
File comment: rechecked -> predial hook
rechecked.txt [7.87 KiB]
Downloaded 1074 times


Should I put it somewhere else? I don't think so, because all other files are controlled by FreePBX and are automatically generated. BTW. in Custom Trunk String I Put A2B/$OUTNUM$ - why in GotoIf() there is AMP:A2B/? When I point out a route I point it to A2B/$OUTNUM$, not to AMP:A2B/$OUTNUM.

Thanks in advance.

Jakub


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Fri Jan 28, 2011 6:37 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

I'm reading what you ave done, and I had to check that I linked to the right post, as it does not seem to bear any resemblance to what was advised.

Look again, - viewtopic.php?f=4&t=2127&start=30 Stavros' post,

Joe


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Sat Jan 29, 2011 4:43 pm 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
Hi Joe,

thanks again. I really messed up, but anyway, this time I think I did it right, but Zoiper shows "Call Rejected".

I changed Custom String in trunk configuration to "A2B/1" and assigned it to outbound route named "default". (BTW. Should this route be set as Intra-Company route?). in a2billing.conf I changed "cid_enable" to "NO".

Of course, I changed predial-hook to:

Code:
[macro-dialout-trunk-predial-hook]
exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" = "A2B/"]?custom-freepbx-a2billing,${OUTNUM},1:2)
exten => s,2,MacroExit


And added:
Code:
[custom-freepbx-a2billing]
exten => _X.,1,DeadAGI(a2billing.php|${OUT_${DIAL_TRUNK}:8})
exten => _X.,n,Hangup()


Attachments:
again-changed.txt [5.8 KiB]
Downloaded 1062 times
Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Sun Jan 30, 2011 10:58 am 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
I've analysed these logs several times and I do not get this part:

Code:
    -- Goto (custom-freepbx-a2billing,00486182XXXXX,1)
  == Channel 'SIP/1000-00000000' jumping out of macro 'dialout-trunk-predial-hook'
  == Channel 'SIP/1000-00000000' jumping out of macro 'dialout-trunk'
    -- Executing [00486182XXXXX@custom-freepbx-a2billing:1] DeadAGI("SIP/1000-00000000", "a2billing.php|1") in new stack
    -- Executing [00486182XXXXX@custom-freepbx-a2billing:2] Hangup("SIP/1000-00000000", "") in new stack


Does it not seem if the a2billing.php wasn't working at all? As it was written in the linked post, I also put card number (from a2b) in account code field in FreePBX, but it seems it does not make any difference at all.

:arrow: Edit:

The predial hook I changed in extensions.conf. I never did touch extensions_additional.conf or extensions_custom.conf. However, some time ago, in extensions_a2billing.conf I put following lines:

Code:
[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Hangup


I do not think it makes any difference (because it is not used anywhere). Or does it ?

:arrow: EDIT:
I uploaded txt file with asterisk log + sip debugging on. Sip signalling seems ok.
Attachment:
File comment: asterisk log with sip debug
with_sip_debug.txt [13.47 KiB]
Downloaded 1096 times


:arrow: EDIT:
I ran a2billing.php from console. This is the output:
Attachment:
File comment: I ran a2billing.php from console. This is the output
a2billing-run.txt [5.3 KiB]
Downloaded 1038 times


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Mon Jan 31, 2011 11:39 pm 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
Well I do not know what else to do. I've already tried googling it, but it seems that it is not calling the a2billing.php, right? As I can see in this post: viewtopic.php?f=33&t=7904 the AGI script is being launched with an information that it is being launched... here - nothing happens. Doesn't launch, no output....

Just in case I checked "sip_iax_pstn_direct_call_prefix" -> it is not null, it is 555, as it should be.

Oh, and a2billing.php is executable - just in case I chmod'ed it to 755 (it was already, but...)

I'm stuck. :(


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Tue Feb 01, 2011 4:59 pm 
Offline

Joined: Tue Jan 25, 2011 11:57 pm
Posts: 18
Location: Poland
Hi,

instead of pipe (" | ") I put a coma inside custom-freepbx-a2billing (below). Suddenly it started working, but it says it cannot find the rate in the rate card. It is totally strange, as I did upload all the rates and this rate is there for SURE. But anyway, can it stay that way? Does it make any difference?

Quote:
[custom-freepbx-a2billing]
exten => _X.,1,DeadAGI(a2billing.php,${OUT_${DIAL_TRUNK}:8})
exten => _X.,n,Hangup()


Top
 Profile  
 
 Post subject: Re: Calls hang up all the time
PostPosted: Tue Feb 01, 2011 5:27 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
If you have got the call into A2Billing, then you are part of the way there.

Things to check,

1. Check the log to see what number is being delivered to dial in A2Billing, then use the rate simulator to make sure the rate exists for the customer.

2. Note that once you put the accountcode against the FreePBX extension, you should have CID Enable set to no.

Joe


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group