Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 12:51 pm
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: CID CALLBACK , ASTERISK 1.4.20.1 and A2Billing 1.3.3
PostPosted: Sun Jun 15, 2008 1:38 pm 
Offline

Joined: Sun Nov 18, 2007 6:48 pm
Posts: 8
Location: Kent,U.K.
Hi all. Been waiting to try out the latest stable version of asterisk and a2billing. So when i was offered a dl360 G3 , i couldn't resist the urge to scratch,i bought it immediately.I already have a trixbox +a2billing on a box at home,running for about 7months with absolutely no problem.I decided to use pbxinaflash.Everything went smoothly including a2billing install.
After doing the rate table , call plan,provider and trunk, i tried the webcallback and it didn't work. I found out that i had not hooked the ratecard to the callplan.Immediately i corrected this ,webcallback worked.I then tried cid callback,no way! I had actually cut and pasted what i had from my other box to the new,at least from the custom context. I had borrowed from scripts made available on the forum.Realising that i was dealing with a different kettle of fish here, i went over the conf. files relating to cid callback and tried to work thing thru. I have been at this for several days and nights! still nojoy.
I really would appreciate help here.The extensions_custom.conf is;

[custom-a2billing-cid-callback-uk]
exten => _X.,1,Ringing()
exten => _X.,n,Set(CALLERIDNUM =${IF($[${LEN(${CALLERIDNUM})} = 10]?44)}${CALLERIDNUM})
exten => _X.,n,DeadAGI(a2billing.php|4|cid-callback|44) ;last parameter is the callback area code
exten => _X.,n,Hangup

The log output file is attached below.
Action is : my test phone rings twice and cuts off , but callback is not achieved.
Problem seems to be the "0" behind the 44 in the destination number; 4 lines from end of attached file.I have tried several methods of getting rid of that "0", i haven't been able to correct it.


Attachments:
log1.txt [20.57 KiB]
Downloaded 513 times
Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 15, 2008 5:12 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Does all of your incoming CallerID have a zero prefix? What callerid is attached to the customer cards? 44.... ?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 15, 2008 7:47 pm 
Offline

Joined: Sun Nov 18, 2007 6:48 pm
Posts: 8
Location: Kent,U.K.
asiby wrote:
Does all of your incoming CallerID have a zero prefix? What callerid is attached to the customer cards? 44.... ?


Hi. Yes all incoming CallerID on this will have a single zero prefix e.g 01,02,07 ,084 etc. Only UK numbers.If you have a look at the attached file,you will see that both cid and cidname both begin with a zero.That is how all calls are dialled within the country.I took the precaution of adding 44YXXXXXXXXX,0YXXXXXXXXX and YXXXXXXXXX to the callerid list of the customer card; where YXXXXXXXXX= ten digits , just to enable matching.
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 15, 2008 10:03 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Can you try your code with ${CALLERID(num)} instead of ${CALLERIDNUM}?

${CALLERIDNUM} was marked as deprecated in 1.4.0.

You can also try this ...

Code:
...
exten => _X.,n,Set(CALLERID(num)=44${IF($[${CALLERID(num):0:1}=0]?${CALLERID(num):1}:${CALLERID(num)})})
...


Maybe a Captain Proton will come to the rescue cause I get easily lost when using dial plan variables.


Top
 Profile  
 
 Post subject: CID CALLBACK , ASTERISK 1.4.20.1 and A2Billing 1.3.3
PostPosted: Mon Jun 16, 2008 12:17 pm 
Offline

Joined: Sun Nov 18, 2007 6:48 pm
Posts: 8
Location: Kent,U.K.
...
exten => _X.,n,Set(CALLERID(num)=44${IF($[${CALLERID(num):0:1}=0]?${CALLERID(num):1}:${CALLERID(num)})})
...

Many thanks Asiby :D The above line worked.I only had to remove the |44 i had earlier used in the line below to make it work properly;

exten => _X.,n,DeadAGI(a2billing.php|4|cid-callback|44) ;last parameter is the callback area code.


Top
 Profile  
 
 Post subject: Need help
PostPosted: Thu Aug 14, 2008 1:16 pm 
Offline

Joined: Sun Feb 11, 2007 3:36 pm
Posts: 30
Location: Berlin, Germany
I have the same problem. I get incomming call in three form:

1) 01X. (National)
2) 00Z. (International)
3) ZZ. (International E164)

I need in form 00Z. for International and for National 0049Z.

This is correct?

Code:
exten => _X.,1,Ringing()
exten => _X.,n,Set(CALLERID(num)=${{{IF($[${CALLERID(num):0:1}=0]?0049${CALLERID(num)}{IF($[${CALLERID(num)}=00]?${CALLERID(num)}{IF($[${CALLERID(num)}=1-9]?00${CALLERID(num)}}})
exten => _X.,n,DeadAGI(a2billing.php|4|cid-callback)
exten => _X.,n,Hangup



Thanks im advance


Top
 Profile  
 
 Post subject: Re: Need help
PostPosted: Fri Feb 20, 2009 9:15 am 
Offline

Joined: Tue Aug 08, 2006 4:00 pm
Posts: 117
Location: Bitola,Macedonia
Druid wrote:
I have the same problem. I get incomming call in three form:

1) 01X. (National)
2) 00Z. (International)
3) ZZ. (International E164)

I need in form 00Z. for International and for National 0049Z.

This is correct?

Code:
exten => _X.,1,Ringing()
exten => _X.,n,Set(CALLERID(num)=${{{IF($[${CALLERID(num):0:1}=0]?0049${CALLERID(num)}{IF($[${CALLERID(num)}=00]?${CALLERID(num)}{IF($[${CALLERID(num)}=1-9]?00${CALLERID(num)}}})
exten => _X.,n,DeadAGI(a2billing.php|4|cid-callback)
exten => _X.,n,Hangup



Thanks im advance


Hi like to know did make work this and if you have please let me know how becouse also me get 3 diffrent CID ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2009 11:22 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
That doesn't look like it would work to me. You don't need to accomplish this all in one line of dialplan code.
This should rewrite numbers with 01 to start 49 and strip any leading 00, thus converting to E.164 format:
Code:
exten => _X.,n,Set(CALLERID(num)=${IF($[${CALLERID(num):0:2}=01]?49${CALLERID(num):2}:${CALLERID(num)})})
exten => _X.,n,Set(CALLERID(num)=00${IF($[${CALLERID(num):0:2}=00]?${CALLERID(num):2}:${CALLERID(num)})})
If you'd rather receive E.164 format numbers simply remove the first '00' from the second line.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 
VoIP Billing solution


All times are UTC


Who is online

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