asterisk2billing.org
http://forum.asterisk2billing.org/

DNID Prefix BUG
http://forum.asterisk2billing.org/viewtopic.php?f=16&t=4930
Page 2 of 2

Author:  square [ Thu Aug 19, 2010 1:44 am ]
Post subject:  Re: DNID Prefix BUG

By the way my a2billing version is :

A2Billing - Version 1.5.1 (Lignum Vitae) - Released : 19 January 2010, A2Billing is software licensed under the AGPL 3.
Copyright (C) 2004-2009 - Star2billing S.L. http://www.star2billing.com/

Any insight/help/suggestions will be highly appreciated.

Thanks again

Author:  jroper [ Thu Aug 19, 2010 7:57 am ]
Post subject:  Re: DNID Prefix BUG

Hi

Multiple ratecards in one call-plan is possible, and has been for some years. Something else is amiss with your configuration.

However, I note you posed in the 1.3 bugs section, maybe you should upgrade to 1.7.1?

Joe

Author:  square [ Thu Aug 19, 2010 5:40 pm ]
Post subject:  Re: DNID Prefix BUG

Greetings,

I tried several times without success. Here is my config:

1) One Call Plan called Value
contain two rate cards
- ValueWorld
- TollFree1800

2) ValueWorld rate card
- Tariff Name - ValueWorld
- TRUNK - TrunkA
- DNID Prefix - 011
- CallerID Prefix - all

3) TollFree1800 rate card
- Tariff Name - TollFree1800
- TRUNK - TrunkB
- DNID Prefix - 1800
- CallerID Prefix - all

I do not have any other Call Plan or Rate Cards.

The calls for the first cards go through all the time, the calls for the second always fail.
Am I missing here something in my configs?
Has anyone tried such implementation?

The main purpose is to separate the 911 calls from the rest, 911 calls will have its own trunk,
and rest of the calls with have one or more trunks.

Please let me know if you have any comments/suggestions/work arounds

Thanks again for your supoprt

Author:  jroper [ Thu Aug 19, 2010 5:50 pm ]
Post subject:  Re: DNID Prefix BUG

Hi

Just for interest, what do you understand by the term DNID?

Can you explain your logic for why you have one rate card which is selected when the DNID is 011, and another where the DNID is 1800?

I take it your customers are connecting using VoIP?

Joe

Author:  square [ Thu Aug 19, 2010 6:04 pm ]
Post subject:  Re: DNID Prefix BUG

Thanks Joe,

What I understand from DNID is the number dialed by the customer. Our setup is not calling card centre, it is residential VOIP.
Customers call / receive calls from their friends/offices etc. They also need emergency services available when needed.

My understanding is DNID is the number dialed by the customer, I could be wrong here, please correct me.
With this logic in mind, what is needed to be achieved is:

1) when customer dials 911, based on the ratecard it gets routed to the desired trunk
2) when customer dials 18001234567, based on 1800 DNID match (1800 is just an example) it should get routed to the desired trunk.

If my understanding is wrong, please correct, looks like I could be very well wrong, as this implementation is failing.

Please have your comments/suggestions

Thanks again for your support

Author:  jroper [ Thu Aug 19, 2010 6:28 pm ]
Post subject:  Re: DNID Prefix BUG

No

The DNID is the number dialled by the customer to access the platform. So in a calling card environment, the DNID would be the access number.

Where VoIP is concerned no access number is dialled , so the DNID is largely irrelevant.

So both your rate tables need to have "all" in the DNID field.

The rate, and therefore the ratetable is selected on the basis of the dialled digits.

So the rates and dialcodes in your rate tables determine the trunk.

You can have multiple rate tables under the same call-plan, and the system will look at all the dialcodes, and select the best match for the dialled digits.

Joe

Author:  square [ Thu Aug 19, 2010 7:41 pm ]
Post subject:  Re: DNID Prefix BUG

Thanks Joe, this tip helped me.

Indeed, what I thought of DNID was wrong. OK...this is what I've done now to make it work:

1) created two separate rate lists (in recommended cvs format)

Rate List A
- 93;Afghanistan;0.3064;0.1532;30;6;60;30
............
............
26311;Zimbabwe Mobile;0.4236;0.2118;30;6;60;30

Rate List B
- 1800;TollFree1800;0.0;0.0;30;6;60;30

2) Created two Rate Cards

ValueWorld rate card
- Tariff Name - ValueWorld
- TRUNK - TrunkA
- DNID Prefix - all
- CallerID Prefix - all

TollFree1800 rate card
- Tariff Name - TollFree1800
- TRUNK - TrunkB
- DNID Prefix - 1800
- CallerID Prefix - all

3) Imported the rate lists created in step 1 as follows:

- Rate Card to Import - ValueWorld
Choose Trunk to use - Trunk A
Selected mandatory and chosen fields
Imported ratecard/list - RateList A ----> created in step 1

Like wise imported the second rate card with Chosen trunk B

3) Created one single CallPlan Value and included these two rate cards created in step 2.

DONE
DONE


Bingo,,,,1800xxxxxxx calls were sent to TRUNK B and the other are sent to TRUNK A

I will implement similar config for 911 where 911 calls will be sent to dedicated 911 trunk.

Phew....I thank all of you (especially Joe) for helping (and teaching the fundamentals).

Great work guys...this forum is LIVE and HELPFUL

I have tried to be as clear as possible while describing my config.

My sincere thanks once again

Author:  square [ Thu Aug 19, 2010 7:51 pm ]
Post subject:  Re: DNID Prefix BUG

I made a small typo :

3) TollFree1800 rate card
- Tariff Name - TollFree1800
- TRUNK - TrunkB
- DNID Prefix - 1800 --------------> it is all not 1800
- CallerID Prefix - all

Author:  Druid [ Fri Oct 22, 2010 3:33 pm ]
Post subject:  Re: DNID Prefix BUG

Hi all,

i have found this old topic, because I have the same problems with 1.3.3 (time to upgrade to new version not possible).

Well i found by this Ticket512 and here partial solution to my problem. But I need other than evaluation of DNID and evaluation of CID.

I have 1 CallPlan with 3 RateCard:
1_RateCard: From Mobil and Local CID=all to Local DNID=493
2_RateCard: From Landline CID=493 to ToolFree DNID=49800
3_RateCard: From Mobil CID=491 to ToolFree DNID=49800

All DNID and CID ONLY Prefix, not full number!

So my question. If the following change in A2billing.php work?

instead of:
Code:
         if ($agi->request['agi_extension']=='s'){
            $A2B->dnid = $agi->request['agi_dnid'];
         }else{
            $A2B->dnid = $agi->request['agi_extension'];
         }



this
Code:
         if ($agi->request['agi_extension']=='s'){
            $A2B->dnid = $A2B->agiconfig['our_own_custom_forced_dnid'];
            $A2B->CallerID = $A2B->agiconfig['our_own_custom_forced_cid'];
         }else{
            $A2B->dnid = $agi->request['agi_extension'];
         }



and I made 3 agi-conf with add two new variable:
Code:
our_own_custom_forced_dnid =
our_own_custom_forced_cid =


Thanks in advance!

Sorry for my bad Englisch.

Author:  cyford [ Fri Apr 24, 2015 7:28 pm ]
Post subject:  Re: DNID Prefix BUG

Hi, I have the same issue i have the call plans strip all prefix , so rates can be matched... i have 2 rate cards

one says all but the rates in (all) are like - _[2-8]XXXXXXXXX

the other is 011 - dialprefix 39331

in simulator i test 011393318280194 it works and shows the 1 011 rate card

but when i actually dial it with the same person i used in simulator, it is dialing out of the (all) rate card even when dialing the exact number.. F.Y.I the (all)
is a cheaper rate,

i am guessing either the LCR is over powering the Dnid Prefix

or the (all) Prefix is taking priority over calls that have dnid set --

i am using

A2Billing v2.1.0

Author:  cyford [ Thu Jun 04, 2015 6:14 am ]
Post subject:  Re: DNID Prefix BUG

i make the dnid prefix = 1

in asterisk set the dnid ---- exten => _X.,1,Set(CALLERID(dnid)=${EXTEN})
${EXTEN} = 15599349999


i get this error


a2billing.php,2,did: file:Class.A2Billing.php - line:1058 - uniqueid:1433397915.835 - ERROR ::> The phone number (5599349999) cannot be dialed by the Rate engine, check that the Ratecard and Call Plan are well configured!


i set to ( all ) and it works


A2Billing v2.1.0

Author:  cyford [ Thu Jun 04, 2015 6:47 am ]
Post subject:  Re: DNID Prefix BUG

i have another call plan setup similar and it works as expected...

the only difference is how the rates are formatted

working is formatted NPANXX

not working is _[2-8]XXXXXXXXX (works with dnid set too all, but not when i set it manually)

Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/