Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 25, 2024 11:30 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Thu Aug 14, 2008 1:02 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
You'd be getting a different error message if A2B couldn't find a rate, so I doubt it's your ratetables at fault.
It's just occured to me that perhaps A2B won't even try to route a number unless it's at least 3 digits.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 18, 2008 10:46 am 
Offline

Joined: Thu Aug 07, 2008 7:51 am
Posts: 16
You're right, it won't.
So I've just added another number on the production installation (198), and when I try to call it, it doesn't ask me for the dialed number anymore. Now I only get this one:
Code:
  a2billing.php: file:Class.A2Billing.php - line:739 - ERROR ::> RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)


So I guess it's time for me to deal with those call plans once and for all. Got any tips for that? Can I use my dial plan from Asterisk?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 18, 2008 11:12 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
The wiki documents rate cards. Sadly the screenshots seems to have gone missing.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 21, 2008 11:08 am 
Offline

Joined: Thu Aug 07, 2008 7:51 am
Posts: 16
Ok I've been trying up and down, left and right, and then got a conclusion.

I do not need to divert internal calls over a2billing, because we're not charging them anyway, so I left my context voice-dial intact so asterisk is the only one dialing internal numbers.
But when it comes to external ones, then a2billing is mixed in.

Now I don't know where do I set on which IP does it terminate the call? It should be terminated as IAX2/plvoip/dialednum, because this asterisk installation is hooked up to another over IAX2 and then that one has the link to ISPs voip.
But then again, I can't figure it out, where to give it the setting to terminate the call, and I've followed that link that you gave me, and also googled much in the past few days.

Edit:
Never mind, fixed it. :D
It's working now, thanks for you help!

Only one more thing, when I call over a2billing on my mobile, and I answer it, I get some messages, if I want to immediately accept the incoming call to dial 1 etc etc. Why is that?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 21, 2008 12:36 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
xfirestorm wrote:
Only one more thing, when I call over a2billing on my mobile, and I answer it, I get some messages, if I want to immediately accept the incoming call to dial 1 etc etc. Why is that?
What messages are you getting? Have you changed the 'play_audio' or 'intro_prompt' settings in a2billing.conf.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 21, 2008 1:15 pm 
Offline

Joined: Thu Aug 07, 2008 7:51 am
Posts: 16
Both set to no.
These are the messages:
Quote:
-- IAX2/plvoip-6302 answered SIP/2490138548-0845ba40
-- <IAX2/plvoip-6302> Playing 'priv-callpending' (language 'en')
-- <IAX2/plvoip-6302> Playing 'priv-callerintros 346270722130500' (language 'en')
-- <IAX2/plvoip-6302> Playing 'screen-callee-options' (language 'en')
-- Hungup 'IAX2/plvoip-6302'


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 21, 2008 2:02 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
That's not A2B. It looks like you have privacy screening enabled in FreePBX.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 22, 2008 6:50 am 
Offline

Joined: Thu Aug 07, 2008 7:51 am
Posts: 16
I don't even have FreePBX :shock:
I've got only Asterisk BRIStuffed and A2B


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 22, 2008 12:53 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
So amend your dialplan so A2B is launched directly, rather than attempting privacy screening first.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 10:10 am 
Offline

Joined: Thu Aug 07, 2008 7:51 am
Posts: 16
Well I've got it fixed.
The problem was with a2billing and not my dial plan.
The problem was that when I created a TRUNK in the GUI I added some additional parameters, and after removing it it went on ok.

Now I have two more problems.
One are local calls.
I call another number that is on the same installation, a2billing starts, goes through sends the call to the local trunk (127.0.0.1 over SIP) and then I get a Loop Detected message and a2billing is being run all over again.
I know I have to change my dial plan somehow, but I don't know how.

Second problems are incoming calls.
I.e. if I call my number that is on a2billing, then asterisk runs a2billing and a2billing at the end says to enter the pin number...
Oh and a2billing reports DNID unknown

I'm calling a2billing before the Dial command in asterisk dial plan...
Like so:
Code:
[macro-voice-dial]

exten => s,1,Set(LANGUAGE()=si)
exten => s,2,GotoIf($["${ARG2}" != "RING"] ?|4)
exten => s,3,Playtones(ring)
exten => s,4,GotoIf($["${CALLERID(num)}" != "9901"] ?|9)
exten => s,5,Set(regx="([a-zA-Z0-9:]+)")                                ; Nastavi regularni izraz - izlocitev stevilke s protokolom
exten => s,6,Set(cid2=$["${SIPURI}" : ${regx}])                         ; Izloci klicno stevilko in protokol
exten => s,7,Set(cid3=${cid2:4})                                        ; Odrezi protokol, ki je sip:
exten => s,8,Set(CALLERID(number)=0${cid3})                             ; Dodaj vodilno niclo
exten => s,9,Wait,2
exten => s,10,AGI,a2billing.php
exten => s,11,Wait,2
exten => s,12,Dial(${ARG1},90,r)
exten => s,13,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Goto(s-NOANSWER,101)
exten => s-NOANSWER,2,Hangup
exten => s-BUSY,1,Goto(s-BUSY,101)
exten => s-BUSY,2,Hangup
exten => s-CHANUNAVAIL,1,Goto(s-CHANUNAVAIL,101)
exten => s-CHANUNAVAIL,2,Hangup
exten => s-.,1,Goto(s-NOANSWER,1)
exten => s-CHANUNAVAIL,101,Playback(message-the-number-is-unavailable); Ni zasedena
exten => s-CHANUNAVAIL,102,Goto(s-FINISH,1)                     ; Na konec
exten => s-BUSY,101,Playback(message-the-number-is-busy)        ; Ni zasedena
exten => s-BUSY,102,Goto(s-FINISH,1)                            ; Na konec
exten => s-NOANSWER,101,Playtones(info)                         ; Na konec
exten => s-NOANSWER,102,Goto(s-FINISH,1)                        ; Na konec
exten => s-FINISH,1,Wait,1                                      ; Malo pocakaj
exten => s-FINISH,2,Hangup                                      ; Odlozi
exten => s,109,Goto(s-${DIALSTATUS},1)


Added after 58 minutes:

Nevermind that. I was calling a2billing at the wrong point. Fixed it now.

Only now, incoming calls arent handled by a2billing, how would I fix that?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 12:32 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
xfirestorm wrote:
Only now, incoming calls arent handled by a2billing, how would I fix that?
Again, amend your dialplan so that A2B is launched by the appropriate inbound calls. If you're having trouble show us the Asterisk console output (with 'set verbose 15') of a failed call.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 2:43 pm 
Offline

Joined: Thu Aug 07, 2008 7:51 am
Posts: 16
Well now I changed the context from user-group-1 to a2billing in iax.conf, so when calls get accepted on the IAX2 protocol they immediately get transfered to a2billing, which is ok, and the a2billing starts like should....
But... then here is the problem:
Code:
/* Running it up first, this is ok: */
    -- Accepting UNAUTHENTICATED call from 172.25.0.2:
       > requested format = gsm,
       > requested prefs = (g729|gsm),
       > actual format = gsm,
       > host prefs = (gsm),
       > priority = mine
    -- Executing [6479@a2billing:1] Answer("IAX2/plvoip-7470", "") in new stack
    -- Executing [6479@a2billing:2] Wait("IAX2/plvoip-7470", "2") in new stack
    -- Executing [6479@a2billing:3] DeadAGI("IAX2/plvoip-7470", "a2billing.php") in new stack
/* snip snip */
/* And then the problem: */
a2billing.php: file:a2billing.php - line:92 - Array
  a2billing.php: (
  a2billing.php:     [agi_request] => a2billing.php
  a2billing.php:     [agi_channel] => IAX2/plvoip-7470
  a2billing.php:     [agi_language] => si
  a2billing.php:     [agi_type] => IAX2
  a2billing.php:     [agi_uniqueid] => asterisk-1220546453.69
  a2billing.php:     [agi_callerid] => 198
  a2billing.php:     [agi_calleridname] => Tomaz Lovrec
  a2billing.php:     [agi_callingpres] => 0
  a2billing.php:     [agi_callingani2] => 0
  a2billing.php:     [agi_callington] => 0
  a2billing.php:     [agi_callingtns] => 0
  a2billing.php:     [agi_dnid] => unknown
  a2billing.php:     [agi_rdnis] => unknown
  a2billing.php:     [agi_context] => a2billing
  a2billing.php:     [agi_extension] => 6479
  a2billing.php:     [agi_priority] => 3
  a2billing.php:     [agi_enhanced] => 0.0
  a2billing.php:     [agi_accountcode] =>
  a2billing.php: )
  a2billing.php:
  a2billing.php: file:Class.A2Billing.php - line:621 -  get_agi_request_parameter = 198 ; IAX2/plvoip-7470 ; asterisk-1220546453.69 ;  ; 6479
  a2billing.php: file:a2billing.php - line:145 - [NO ANSWER CALL]
  a2billing.php: file:Class.A2Billing.php - line:1788 - Requesting DTMF, CARDNUMBER_LENGTH_MAX 6
    -- <IAX2/plvoip-7470> Playing 'prepaid-enter-pin-number' (language 'si')
  a2billing.php: file:Class.A2Billing.php - line:1790 - RES DTMF : -1
  a2billing.php: file:Class.A2Billing.php - line:1794 - CARDNUMBER ::> -1
  a2billing.php: file:Class.A2Billing.php - line:1804 - PREPAID-INVALID-DIGITS
  a2billing.php: file:Class.A2Billing.php - line:1780 - PREPAID-INVALID-DIGITS
  a2billing.php: file:Class.A2Billing.php - line:1788 - Requesting DTMF, CARDNUMBER_LENGTH_MAX 6
[Sep  4 18:40:58] WARNING[6085]: file.c:677 ast_readaudio_callback: Failed to write frame
    -- <IAX2/plvoip-7470> Playing 'prepaid-enter-pin-number' (language 'si')
  a2billing.php: file:Class.A2Billing.php - line:1790 - RES DTMF : -1
  a2billing.php: file:Class.A2Billing.php - line:1794 - CARDNUMBER ::> -1
  a2billing.php: file:Class.A2Billing.php - line:1804 - PREPAID-INVALID-DIGITS
  a2billing.php: file:Class.A2Billing.php - line:1780 - PREPAID-INVALID-DIGITS
  a2billing.php: file:Class.A2Billing.php - line:1788 - Requesting DTMF, CARDNUMBER_LENGTH_MAX 6
[Sep  4 18:40:58] WARNING[6085]: file.c:677 ast_readaudio_callback: Failed to write frame
    -- <IAX2/plvoip-7470> Playing 'prepaid-enter-pin-number' (language 'si')
  a2billing.php: file:Class.A2Billing.php - line:1790 - RES DTMF : -1
  a2billing.php: file:Class.A2Billing.php - line:1794 - CARDNUMBER ::> -1
  a2billing.php: file:Class.A2Billing.php - line:1804 - PREPAID-INVALID-DIGITS
  a2billing.php: file:a2billing.php - line:323 - [AUTHENTICATION FAILED (cia_res:-1)]
    -- AGI Script a2billing.php completed, returning 0
    -- Hungup 'IAX2/plvoip-7470'


As you can see DNID is unknown and the callerid 198 is not created in a2billing so it plays the PIN number tone. This is my problem...

One more thing I just noticed.
When I'm adding my customers, I need to input the balance on their accounts, and when their balance runs low, they first get warned and later the call just disconnects. How would I remove this? Or can I add unlimited balance?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 3:21 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
xfirestorm wrote:
As you can see DNID is unknown
The DNID is still in place when it says 'Executing [6479@a2billing:1]' so perhaps you have use_dnid = NO? If not I'm guessing you must be discarding the DNID later on in your dialplan.
Quote:
and the callerid 198 is not created in a2billing so it plays the PIN number tone. This is my problem...
So add the CallerID? Or am I misunderstanding your problem...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 3:23 pm 
Offline

Joined: Thu Aug 07, 2008 7:51 am
Posts: 16
Well this particular CallerID is from another Asterisk instalation. Which is also my outgoing trunk, so by making a call from that asterisk to my a2billing-asterisk I'm simulating an outside incoming call.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 3:31 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
So what's wrong with adding the CallerID? You must authenticate to A2B somehow, be that via accountcode, Caller ID, PIN, or even IP address.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 35 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group