Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Mar 19, 2024 5:02 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: passing Caller ID (CID) to a2b from an extension
PostPosted: Mon Mar 05, 2007 6:05 pm 
Offline

Joined: Mon Dec 04, 2006 1:40 am
Posts: 14
Our network:
I have an internal network here at our mission hospital. We are using FreePBX with A2B 1.2.3. We make outgoing calls from the hospital extensions. We also have calls being made from wireless clients linked toour network from homes. The homes are 200-300, the hospital offices are 500-600. The calls are billed to the callers pin number when making an outbound call. We also bill inbound calls to the pin number of the owner of the inbound DID.

The problem:
When an extension dials out the CID passed to A2B is the extension number that dialed the call. Even though the FreePBX extension has an outbound CID entered this CID is not passed to A2B. In other words when extension 203 dials an outbound call I want a valid CID to be passed to a2b based on the extension dialed. For example if I dial 01740281xxxx I want my CID of 1740587xxxx so that when the part answers the see the number that the call came from and not 0000000000 as it is now. Now I could have my voip provider assign a CID to my account but that means that everyone making a call would appear to be from the same phone number. We have about 15 phone numbers through the same Vitelity.net account. Vitelity.net allows unlimited sub-accounts which would be a solution as each sub-account may have an attached CID. This would mean configuring 15 different outbound trunks.

I searched the forum for a solution. I was unable to find an answer. Below is my solution. If there is a better way to do this please let me know.


Notice I used CALLERID(all) but CALLERID(number) would be just as complete as the text name is not used. I have zeroed out the last 4 digits for security

extensions_custom.conf

[a2billing]
exten => _01NXXNXXXXXX,1,Answer
exten => _01NXXNXXXXXX,2,Wait,2
exten => _01NXXNXXXXXX,3,Set(Var_TO=${CALLERID(number))

# set Kenton Caller ID
exten => _01NXXNXXXXXX,4,GotoIf($["${Var_TO}" = "525"]?5:8)
exten => _01NXXNXXXXXX,5,Set(CALLERID(all)="Kenton Brown <7402810000>")
exten => _01NXXNXXXXXX,6,Goto(300)

exten => _01NXXNXXXXXX,8,GotoIf($["${Var_TO}" = "202"]?9:12)
exten => _01NXXNXXXXXX,9,Set(CALLERID(all)="Kenton Brown <7402810000>")
exten => _01NXXNXXXXXX,10,Goto(300)

exten => _01NXXNXXXXXX,12,GotoIf($["${Var_TO}" = "203"]?13:20)
exten => _01NXXNXXXXXX,13,Set(CALLERID(all)=Kenton Brown <7402810000>)
exten => _01NXXNXXXXXX,14,Goto(300)

# set Ted Caller ID
exten => _01NXXNXXXXXX,20,GotoIf($["${Var_TO}" = "204"]?21:30)
exten => _01NXXNXXXXXX,21,Set(CALLERID(all)="Ted Faull <8153150000>")
exten => _01NXXNXXXXXX,22,Goto(300)

# set Ted Caller ID
exten => _01NXXNXXXXXX,30,GotoIf($["${Var_TO}" = "206"]?31:40)
exten => _01NXXNXXXXXX,31,Set(CALLERID(all)="Dr. Ted Faull <3303150000>")
exten => _01NXXNXXXXXX,32,Goto(300)

# set Hospital Caller ID
exten => _01NXXNXXXXXX,40,GotoIf($["${Var_TO}" = "506"]?41:50)
exten => _01NXXNXXXXXX,41,Set(CALLERID(all)=Hospital Loma de Luz <2282060000>)
exten => _01NXXNXXXXXX,42,Goto(300)


# set Ted Caller ID
exten => _01NXXNXXXXXX,50,GotoIf($["${Var_TO}" = "204"]?51:60)
exten => _01NXXNXXXXXX,51,Set(CALLERID(all)="Ted Faull <8153150000>")
exten => _01NXXNXXXXXX,52,Goto(300)

# set next Caller ID
exten => _01NXXNXXXXXX,60,Goto(300)

# pass to a2billing
exten => _01NXXNXXXXXX,300,DeadAGI(a2billing.php|2)
exten => _01NXXNXXXXXX,301,Wait,2
exten => _01NXXNXXXXXX,302,Hangup


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 09, 2007 2:00 pm 
Offline

Joined: Tue Mar 27, 2007 5:23 am
Posts: 93
can you please repost this with the CODE command to ensure nothing is lost in the translation. Seems like your current code will not work properly.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 01, 2007 4:58 am 
Offline

Joined: Tue Mar 27, 2007 5:23 am
Posts: 93
Ok I have made a fix for this so you DO NOT need to hack up your config files to hardcode each extension. Check over here if you need the fix.
http://forum.asterisk2billing.org/viewtopic.php?t=2127

This will let you pass Caller ID from FreePBX to Asterisk2Billing from an extension. If you are not using freePBX, you can use the code as a guideline to fix up your own codes.


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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