Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Sep 17, 2019 4:28 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: selecting the ratecard depending upon access no
PostPosted: Thu Jan 15, 2009 8:26 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
Hi all,

I want to select different rate card according to access no dialed.
Thats why i made two different rate card and attach under same call plan.
where i put DNID prefix as first 4 digits of my access no. one is 1866
other 1469 under respected rate card.
In real time when i dial the access no it dont do that after dialing destination number shows error similar like i have not created any rate for that country i am dialing.
If i put "all" in DNID prefix it goes well but always choose one rate card
no differentiation.

I could not solve this problem. so i came to get suggestion from you guys.

Rahman


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2009 8:29 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Synchronicity strikes again.
Just five minutes ago I sent an email to Areski containing:
Quote:
There's one big one which has me really puzzled,  so I haven't touched it:  
it's the rate-engine's dnid and cid sub queries.  It seems to say:  WHERE ...
AND  0 = (expression that returns a primary key _id)

WTF?

When I've finished what I'm currently working on I'll try to remember to take a look at that. You could open a ticket too, so we don't forget about this problem.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2009 10:12 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
Thanks stavros.
I posted a ticket on this in www.asterisk2billing.org/cgi-bin

I appreciate your concern on this. Is there any help
in the development part or developing a patch for this particular reason could i do for you please ask me.

Mushfiq


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2009 10:21 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Well if you could take a look yourself, and see if you can phrase the query so it works.

The problem is on lines 124-142 of Class.RateEngine.php, or if you're using trunk lines 131-148.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2009 3:31 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Here is a tip ... the DNID value in asterisk is not always populated as expected. I believe that that's why a2billing is working around it. You can read the following in Class.A2billing.php at lines 691~692
Code:
//$this->dnid   = $agi->request['agi_dnid'];
$this->dnid     = $agi->request['agi_extension'];


As you can see, A2Billing is using the extension instead. The problem is that when the access number sends a call to the a2billing extension, at that time, it is unfortunately not yet the time to take about rate card cause the caller will need to dial the destination number. This means that the dnidprefix will only work well if you dial the number directly from a SIP client. But if you reach the IVR and enter a number from there, then that will be way pass the time when A2Billing detects the DNID/Extension.

The feature you need should be called DIDprefix instead of DNIDPrefix

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 5:25 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
Hello,
Sorry for late reply.
I start to work with this project again. Anyway First of all thanks to asiby
for giving some reply. DNID stands for Dialed number identification.
so in case of sip client why would it be needed to dial an access no?
but it is really something to thinkable.
To stavros i am working on phrasing those query but with no result.
Did you get chance to see it again ?as you were busy with something that time.
I thought something different .
I will create two agi-conf. one for 1866 and one for 1469 so that if anybody call 1866 a2billing.php will run following agi-conf 2.
in that case i have to declare something different in agi-conf like
owndnid=1866 and link in a2billing.php file request['owndnid']
and will identify the access no prefix now and pass it to rate engine so that it can choose that exact rate table.
But it did not work same thing around.
I was assuming just declaring two different rate table in same call plane
distinct by access no will not be helpful may be there is something to do with a2billing.conf to make two different incoming context two call agi-conf. But anyway i could be wrong and i am actually so please help to solve it .

Thanks
Mushfiq


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 5:41 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
mushfiq wrote:
so in case of sip client why would it be needed to dial an access no?
For SIP clients all DIDs are effectively access numbers. This is why you set 'use_dnid = YES' in order to use the number they dialled without prompting.
Quote:
Did you get chance to see it again ?as you were busy with something that time.
I'm still busy with that currently. I was very tired when I read the query involved, and now I see that the clause I was previously dubious of is necessary and correct.
Quote:
But anyway i could be wrong and i am actually so please help to solve it .
You could start by turning up A2B's debug to 3 and attach (as a .txt file, or the forum will reject it) the output of a call to each DNID here. Be sure to use search & replace to obscure your card number, password, secret, uipass, personal details, etc. We'll also need to know exactly which version you're running, and whether you're using MySQL or Postgres.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 9:46 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
Ok this is a2billing 1.3.4

There is one another way. There is extracharge_did , extracharge_fee
But how this agi_conf will understand which acess no actually dilaed
and select this extracharge did? Thats why i thought in that way a mentioned.
Because in Class.Rateengine.php file there is one para

// if an extracharge did is called increase rates with the extracharge fee

but my question is how it will realize which access no has been called?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 10:07 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Using the Asterisk channel variable ${EXTEN}.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 10:46 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
Hello stavros,

Just saw your reply.
Good to say that i solved it now.
Ya conception is it's not capturing the did i am calling from but the did
i am calling to.
But i am happy to figure it out.
Thanks for all of your help. Also asiby.

Have a nice day
Mushfiq


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

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