asterisk2billing.org http://forum.asterisk2billing.org/ |
|
Calls hang up all the time http://forum.asterisk2billing.org/viewtopic.php?f=16&t=8536 |
Page 1 of 2 |
Author: | sopel1000 [ Wed Jan 26, 2011 12:11 am ] |
Post subject: | Calls hang up all the time |
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". |
Author: | sopel1000 [ Wed Jan 26, 2011 4:32 pm ] |
Post subject: | Re: Calls hang up all the time |
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? |
Author: | jroper [ Wed Jan 26, 2011 5:06 pm ] |
Post subject: | Re: Calls hang up all the time |
Without some output from the logs (attached not pasted) with the verbosity turned up, any answers would be guesses. Joe |
Author: | sopel1000 [ Wed Jan 26, 2011 5:54 pm ] | ||
Post subject: | Re: Calls hang up all the time | ||
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. 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. EDITED #2: I am connected with the SIP server using X-Lite, my peer connects to FreePBX (if you can say so), not a2billing.
|
Author: | sopel1000 [ Thu Jan 27, 2011 12:16 pm ] | |||
Post subject: | Re: Calls hang up all the time | |||
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...
|
Author: | jroper [ Thu Jan 27, 2011 6:19 pm ] |
Post subject: | Re: Calls hang up all the time |
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 |
Author: | sopel1000 [ Thu Jan 27, 2011 11:02 pm ] |
Post subject: | Re: Calls hang up all the time |
Joe, thanks for pointing out what needed to be done but has not been because of... don't really know why. 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. I attach my logs... Attachment: .Thanks in advance, I know you have far more complicated things to cope with... 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? |
Author: | jroper [ Fri Jan 28, 2011 10:23 am ] |
Post subject: | Re: Calls hang up all the time |
Hi Recheck your pre-dial hook context, it does not seem to be using it. Joe |
Author: | sopel1000 [ Fri Jan 28, 2011 6:31 pm ] |
Post subject: | Re: Calls hang up all the time |
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: 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 |
Author: | jroper [ Fri Jan 28, 2011 6:37 pm ] |
Post subject: | Re: Calls hang up all the time |
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 |
Author: | sopel1000 [ Sat Jan 29, 2011 4:43 pm ] | ||
Post subject: | Re: Calls hang up all the time | ||
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()
|
Author: | sopel1000 [ Sun Jan 30, 2011 10:58 am ] |
Post subject: | Re: Calls hang up all the time |
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. 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 ? EDIT: I uploaded txt file with asterisk log + sip debugging on. Sip signalling seems ok. Attachment: 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 1045 times |
Author: | sopel1000 [ Mon Jan 31, 2011 11:39 pm ] |
Post subject: | Re: Calls hang up all the time |
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. |
Author: | sopel1000 [ Tue Feb 01, 2011 4:59 pm ] |
Post subject: | Re: Calls hang up all the time |
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() |
Author: | jroper [ Tue Feb 01, 2011 5:27 pm ] |
Post subject: | Re: Calls hang up all the time |
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 |
Page 1 of 2 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |