Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 1:20 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Called number digits manipulation
PostPosted: Mon Jun 01, 2009 8:17 am 
Offline

Joined: Wed May 13, 2009 7:19 am
Posts: 24
Hello !

I need to make a digits replacement in called numbers.
For my region standart prefix for long distance calls is 8, (pstn) many customers will dial long distance numbers with prefix 8 and i need to replace it by my country prefix (7) for send it to the trunk.
(Exampe: customer dial 84951234567, but expected number is 74951234567)
This rules need only apply to numbers, corresponding to template 8XXXXXXXXXX, not for all numbers.
I think it not the same with "international_prefixes", that may only be sripped off.
How to set replacement rules with A2B?
Thanks!


Top
 Profile  
 
 Post subject: Re: Called number digits manipulation
PostPosted: Mon Jun 08, 2009 7:50 am 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
Hello,

Make your life easy and consider doing it in the Asterisk callplan before calling the A2B

Regards


Top
 Profile  
 
 Post subject: Re: Called number digits manipulation
PostPosted: Tue Jun 09, 2009 7:47 am 
Offline

Joined: Wed May 13, 2009 7:19 am
Posts: 24
Please give me any example how to do this.

Thanks


Top
 Profile  
 
 Post subject: Re: Called number digits manipulation
PostPosted: Tue Jun 09, 2009 9:11 pm 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
Hello,

The following line at the begining of the [a2billing] context might do the trick:

Code:
exten => _8X.,1, set(EXTEN=7${EXTEN:1})


If not, then plz post your [a2billing] context.


Top
 Profile  
 
 Post subject: Re: Called number digits manipulation
PostPosted: Wed Jun 10, 2009 5:33 am 
Offline

Joined: Wed May 13, 2009 7:19 am
Posts: 24
Thanks for your response,
[a2billing]
exten => _8X.,1,Goto(7${EXTEN:1},1)
exten => _7X.,1,DeadAGI,a2billing.php
exten => _X.,1,Answer
exten => _X.,n,NoOp(${EXTEN})
exten => _X.,n,Wait,2
exten => _X.,n,DeadAGI,a2billing.php
exten => _X.,n,Wait,2
exten => _X.,n,Hangup

That method works fine.

Thanks


Top
 Profile  
 
 Post subject: Re: Called number digits manipulation
PostPosted: Wed Jun 10, 2009 4:07 pm 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
Hello,

Good to hear that it worked for you..

But i think the use of GoTo to jump to the next line is too much..!!
also you might need to put Hangup between the two parts.

Do this test please :
call a number then let him answer and hangup while you keep holding the phone.. i think the dialplan will continue to the next section and a2b will be called again.!

Also try using the following line (only) at the begining of your original code:

Code:
exten => _X.,1,Set(EXTEN=${IF($[ ${EXTEN:0:1} =8]?7${EXTEN:1}:${EXTEN})})


But you have to check the syntax, i always get confused in such cases.

Regards


Top
 Profile  
 
 Post subject: Re: Called number digits manipulation
PostPosted: Thu Jun 11, 2009 10:38 am 
Offline

Joined: Wed May 13, 2009 7:19 am
Posts: 24
Hi!

You right to put Hangup between the two parts, but in my tests a2billing.php was not called again after
i hangup on any side of call.

I think construction :
exten => _X.,1,Set(EXTEN=${IF($[ ${EXTEN:0:1} =8]?7${EXTEN:1}:${EXTEN})})
is the same to
exten => _8X.,1,Set(EXTEN=7${EXTEN:1}), channel variable EXTEN cannot change by the SET command.
value ${EXTEN} stay 8XXXXXXXXXX.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 
Predictive Dialer


All times are UTC


Who is online

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