Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Oct 19, 2018 5:52 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: DNID Prefix BUG
PostPosted: Fri Feb 27, 2009 12:16 am 
Offline
User avatar

Joined: Thu Feb 26, 2009 11:42 pm
Posts: 46
Location: Brazil
Hi to all,

First let me tell you, that this is a great community and an example for the open source projects. I can always find a solution to some problem I have with A2B, but this time I think this must be a bug and I could not find anyone mentioning it. Let me explain.

Let say we have 2 Rate Cards, one has DNID Prefix "all" and the other one let say "44". We create Calling Plan and assign the "all" Rate Card to it. Then we assign that Calling Plan to a customer.
Now, if that customer tries to call a number that starts with 44 we get "ERROR ::> RateEngine didnt succeed to match the dialed number......".
You can call any other number that does not start with 44, but 44 will be blocked until you remove all Rate Cards that has DNID Prefix 44 from A2B.
This problem exists ONLY when using access ( incoming) numbers that enters the system for the calling cards. It does not exist if we use SIP accounts registered in Asterisk*
How do we solve this ?

Many thanks to all members of this community.

Koki


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 27, 2009 12:48 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I believe the only way to reproduce the symptoms you describe would involve $A2B->DNID being set to the number starting '44'.
With this in mind I would start by carefully examining any assignment to $A2B->DNID in a2billing.php.

Quote:
This problem exists ONLY when using access ( incoming) numbers that enters the system for the calling cards.
Can you please confirm these calls are using an agi-conf section with 'use_dnid = NO'. Could you also please show us how you are invoking A2B for these calls.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 27, 2009 1:48 am 
Offline
User avatar

Joined: Thu Feb 26, 2009 11:42 pm
Posts: 46
Location: Brazil
Hi,

It first appeared on my working platform when I created one Rate Card with DNID "all" and I already had all other ratecards set to some DNID Prefix, so I did a clean install on another server and created only those 2 ratecards and one customer for test and here it is again the same problem.

my extensions.conf
[a2billing]
; CallingCard application
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Hangup

and the a2billing.conf is with only DB change to match my settings.
and 'use_dnid = NO'

I use Asterisk 1.4.23.1 and A2B 1.3.4

P.S. Actually 44 is only an example, it applies to any number prefix.

Thanks for any kind of help.

Koki


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 12, 2009 6:33 am 
Offline
User avatar

Joined: Thu Feb 26, 2009 11:42 pm
Posts: 46
Location: Brazil
Hi ,

Any comments from the gurus here ? Sorry I can't be of any help , I am not a programmer.

The only way I see to overcome this problem will be to create 10 RateCards with equal tariffs and with DNID Prefixes from 0 to 9 in order the user to make calls using this specific CallPlan...I find this very inconvenient.
We have for example 0800 access numbers and this automatically renders all calls to numbers that starts with 0 impossible. ( those are inside the country calls where we dial 0+city prefix + number)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 12, 2009 3:14 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Yes, it certainly sounds like you've discovered a bug. Can you please confirm which SQL server you're using: MySQL or Postgres?
The rate-engine code involved in the DNID and CID lookups is drastically different between the two, so this promises to be a 'fun' one to fix.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 12, 2009 10:57 pm 
Offline
User avatar

Joined: Thu Feb 26, 2009 11:42 pm
Posts: 46
Location: Brazil
Hi Stavros,

I am using MySQL Ver 14.12 Distrib 5.0.45.

There is another funny thing I found out. Lets continue the story and assign that customer a RateCard that has DNID prefix 44, create a SIP settings for him and log in Astereisk with some softphone. USE_DNID = NO.
Now, whatever we dial we will go to IVR announcing the balance and asking for destination , here is the funny part. Asterisk gets the DNID of the number we dialed first and since we have the RateCard set to DNID 44 if we dial ANY number the DOES NOT start with 44 on the second stage dialing we will get the message "ERROR ::> RateEngine didnt succeed to match the dialed number......".

All this is not a bug, is just how the engine works , but still gives you some limitations to accounts that you want to use as CallingCards and SIP users.


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Tue May 12, 2009 11:36 am 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
I have been trying to reproduce your issues on 1.4 without any success.
- ratecard with DNID prefix = 44
- Callplan with this ratecard assigned to a customer
- add a rate for UK dialprefix 44

Result : the call is outbounded correctly and rated with the correct rates defined.

The query to retrieve the rate is :

SELECT
tariffgroupname, lcrtype, idtariffgroup, cc_tariffgroup_plan.idtariffplan, tariffname,
destination, cc_ratecard.id, dialprefix, destination, buyrate,
buyrateinitblock, buyrateincrement, rateinitial, initblock, billingblock,
connectcharge, disconnectcharge, stepchargea, chargea, timechargea,
billingblocka, stepchargeb, chargeb,timechargeb, billingblockb,
stepchargec, chargec, timechargec, billingblockc,cc_tariffplan.id_trunk AS tp_id_trunk,
tp_trunk.trunkprefix AS tp_trunk, tp_trunk.providertech AS tp_providertech,tp_trunk.providerip AS tp_providerip, tp_trunk.removeprefix AS tp_removeprefix,cc_ratecard.id_trunk AS rc_id_trunk,
rt_trunk.trunkprefix AS rc_trunkprefix, rt_trunk.providertech AS rc_providertech,rt_trunk.providerip AS rc_providerip, rt_trunk.removeprefix AS rc_removeprefix, musiconhold,
tp_trunk.failover_trunk AS tp_failover_trunk, rt_trunk.failover_trunk AS rt_failover_trunk,tp_trunk.addparameter AS tp_addparameter_trunk, rt_trunk.addparameter AS rt_addparameter_trunk, id_outbound_cidgroup,
id_cc_package_offer,tp_trunk.status, rt_trunk.status, tp_trunk.inuse, rt_trunk.inuse,
tp_trunk.maxuse, rt_trunk.maxuse,tp_trunk.if_max_use, rt_trunk.if_max_use,cc_ratecard.rounding_calltime AS rounding_calltime,
cc_ratecard.rounding_threshold AS rounding_threshold,cc_ratecard.additional_block_charge AS additional_block_charge,cc_ratecard.additional_block_charge_time AS additional_block_charge_time, cc_ratecard.additional_grace AS additional_grace, cc_ratecard.minimal_cost AS minimal_cost,disconnectcharge_after,announce_time_correction

FROM cc_tariffgroup
RIGHT JOIN cc_tariffgroup_plan ON cc_tariffgroup_plan.idtariffgroup=cc_tariffgroup.id
INNER JOIN cc_tariffplan ON (cc_tariffplan.id=cc_tariffgroup_plan.idtariffplan )
LEFT JOIN cc_ratecard ON cc_ratecard.idtariffplan=cc_tariffplan.id
LEFT JOIN cc_trunk AS rt_trunk ON cc_ratecard.id_trunk=rt_trunk.id_trunk
LEFT JOIN cc_trunk AS tp_trunk ON cc_tariffplan.id_trunk=tp_trunk.id_trunk

WHERE cc_tariffgroup.id=211 AND ((dialprefix='4412121212' OR dialprefix='441212121' OR dialprefix='44121212' OR dialprefix='4412121' OR dialprefix='441212' OR dialprefix='44121' OR dialprefix='4412' OR dialprefix='441' OR dialprefix='44' OR dialprefix='4' OR dialprefix='defaultprefix') OR (dialprefix LIKE '&_%' ESCAPE '&' AND '4412121212' REGEXP REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(CONCAT('^', dialprefix, '$'), 'X', '[0-9]'), 'Z', '[1-9]'), 'N', '[2-9]'), '.', '.+'), '_', '')))
AND startingdate<= CURRENT_TIMESTAMP AND (expirationdate > CURRENT_TIMESTAMP OR expirationdate IS NULL)
AND startdate<= CURRENT_TIMESTAMP AND (stopdate > CURRENT_TIMESTAMP OR stopdate IS NULL)
AND (starttime <= 2243 AND endtime >=2243)
AND idtariffgroup='211'
AND ( dnidprefix=SUBSTRING('4412121212',1,length(dnidprefix)) OR (dnidprefix='all' AND 0 = 1))
AND ( calleridprefix=SUBSTRING('16198178474',1,length(calleridprefix)) OR (calleridprefix='all' AND 0 = 0))
ORDER BY LENGTH(dialprefix) DESC


and in my case the following result will be retrieve :
Areski-test 0 211 1 MY RATECARD 44 7393 44 44 1.00000 0 0 2.00850 0 0 0.00000 0.00000 0.00000 0.00000 0 0 0.00000 0.00000 0 0 0 0 0 0 1 011 IAX2 areskiax 1 011 IAX2 areskiax -1 -1 -1 -1 1 1 0 0 -1 -1 0 0 0 0 0.00000 0 0 0.00000 0 1.000


Yours,
/Areski


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Thu May 14, 2009 4:51 am 
Offline
User avatar

Joined: Thu Feb 26, 2009 11:42 pm
Posts: 46
Location: Brazil
Hello Areski,

You did not test it properly. The problem appears when you have 2 ratecards, Card1 with DNID prefix of let say 44 and Card2 set to ALL. The client that is using ONLY ratecard set to ALL , will not be able to call any number that starts with 44 prefix. Try it this way and you will be able to reproduce the bug.

Cheers,
Koki


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Thu May 14, 2009 11:41 am 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
Well I v been testing this scenario as well and I don't see any problem with this.

Anybody can confirm or tell exactly which values to reproduce ?

Yours,
/Areski


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Thu May 14, 2009 6:53 pm 
Offline
User avatar

Joined: Thu Feb 26, 2009 11:42 pm
Posts: 46
Location: Brazil
I just did another test on 1.4 and always with the same results . The system returns this error
"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)". Before you say "........check if I have the prefix listed in the ratecard...." let me say , yes I have. Please see the scenario bellow. All is clean install, and latest trunk ( ver. 2042 by the time of writing this)

Since I leave in Brazil I have tested it with 55 prefix. Scenario as follow.

1.)
RateCard with DNID = ALL (name "RC_all") - Rates: 55(Brazil) and 44(UK)
RateCard with DNID = 55 (name "RC_55") - Rates: 55(Brazil) and 44(UK)

2.)
CallPlan = "TEST" with RateCard "RC_all"

3.)
Customer "A" using CallPlan "TEST"

Dialing 4421212121 - No Problem

Dialing 5521212121 - "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)"

If I remove/change RateCard "RC_55" ( delete it or set prefix to "all" ) calls to 55xxxxxxxxx wont be a problem anymore.
I think there is some problem between DNID and CID.

Now imagine this. You want to give your clients the ability to use ATA as well. With the RateCard set to DNID = 55 and 44 they will be able to dial ONLY numbers starting with 55 and 44. In order this user to be able to dial all destinations we need to create another RateCard with DNID = "all". The fact that DIND is affecting ATA users is already a problem. I think for ATA users the system should look in CID PREFIX and ignore DIND Prefix.
Continuing the saga.
Now lets say we have another customer that is using another CallPlan and RateCards with DNID ="all" . This customer CAN NOT call any destinations that start with 55 and 44. In order to correct this i have to create RateCards with DNID set to 55 and 44 and any other prefix that we are using for CallingCards together with the one set to "all" .

Please check this again , I am 100% sure ( tested many many times all possible scenarios ) that there is a problem.

Regards,

Koki


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Mon Mar 22, 2010 7:44 pm 
Offline

Joined: Tue Sep 23, 2008 9:15 am
Posts: 36
Hello Koki,

have you solve your problem ?

I've the same problem with my a2b 1.4.... any suggest for me ??

Thx

Alex


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Wed May 26, 2010 1:02 am 
Offline
User avatar

Joined: Thu Feb 26, 2009 11:42 pm
Posts: 46
Location: Brazil
Problem is still there. No change.


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Wed May 26, 2010 5:37 am 
Offline

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

What version of A2Billing are you using.

Joe


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Sat Jun 19, 2010 7:33 pm 
Offline

Joined: Thu Jun 10, 2010 12:02 pm
Posts: 11
hi,
you have to chose DNID or caller id for the second ratecard as well "all" wouldn't work if you have more than 1 rate card with DNID asigned.

good luck


Top
 Profile  
 
 Post subject: Re: DNID Prefix BUG
PostPosted: Thu Aug 19, 2010 1:12 am 
Offline

Joined: Fri Feb 19, 2010 4:29 pm
Posts: 50
1) I created two rate cards and assigned two separate DNID Prefix to them, 1519 to the first and 1800 to the second rate card.
I kept TRUNK same for the both.

- Calls starting with 1519 went through
- Calls starting with 1800 failed, I got engage tone.

Looks like 1800 number calls looped back and call tried to terminate on my own sip server instead of the TRUNK's sip server

I found out that if you add second rate card to your call plan it just doesn't work, this is no good. This means

1) I cannot have two separate rate cards

2) I cannot have two separate trunks to be chosen based on DNID

3) I cannot implement E911 because E911 (911) provider is separate trunk

This is not good...

Has some one implemented two different TRUNKS? For example

1) Trunk A for DNID prefix of 911
2) Trunk B for the rest?

Please let me know....

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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