Caller ID Spoof (On Demand)
Using Asterisk and a VoIP provider you can set your caller ID to anything. I leave mine set to my real number, but when I had a cell phone I would occasionally change it to my cell number. The most common use for this type of feature is if you have a business and you do some of your work from home. Instead of making that occasional business call using your home phone number it might be more professional to change it to your business number before making the call. Obviously this feature also has great potential for abuse, but I figure that anyone who takes the time to setup their own PBX should be mature enough not to abuse caller ID and if not they would be able to do it without any help from this article anyway.
Edit file: extensions_custom.conf
[from-internal-custom]
include => spoof
[spoof]
exten => _*555NXXNXXXXXX,1,Set(CALLERID(all)=Private <1${EXTEN:4}>)
exten => _*555NXXNXXXXXX,2,Answer
exten => _*555NXXNXXXXXX,3,Playback(pls-entr-num-uwish2-call&beep)
exten => _*555NXXNXXXXXX,4,WaitExten(10)
exten => _*555NXXNXXXXXX,5,Dial(IAX2/callwithus:${EXTEN})
exten => _*555NXXNXXXXXX,6,Hangup()
The way it works is that you dial *555# where # is the 10 digit number that you want displayed as your caller ID.
The first command sets the caller ID name to private which usually isn’t forwarded and sets the caller ID number to the number that you dialed by removing the first 4 characters (*555) and prepending a 1. The second command just answers which is followed by the third command which plays “Please enter the number you wish to call” and then beeps. The fourth command waits for you to put in a number and then the fifth command dials it.
Most people are only going to need to change your caller ID to one other number so this would be a little faster in this regard.
[spoof]
exten => _*555,1,Set(CALLERID(all)=Business Name<####>)
exten => _*555,2,Answer
exten => _*555,3,Playback(pls-entr-num-uwish2-call&beep)
exten => _*555,4,WaitExten(10)
exten => _*555,5,Dial(IAX2/callwithus:${EXTEN})
exten => _*555,6,Hangup()
Whenever you would dial *555 then it sets caller ID to “Business Name” and your business number, represented by #### in the command. The rest of the commands are the same.
Tony,
I haven’t fond your email and I would like to talk to you about a asterisk job.
Please, contact me.
Thank you
I’m having problems implementing the first one. The second one works fine. What version of Elastix are your running? I’m running version 1.6. Have any ideas?
Thanks
I used
[spoof]
exten => 555,1,Wait(1)
;always use a password – dont be a moron
exten => 420,n,Authenticate(12345678901234567890|j|20)
; enter in 10 digit number that you are spoofing
exten => 555,n,Background(enter-phone-number10)
exten => 555,n,Read(SPOOF||10|i|2|30)
exten => 555,n,NoOp(${SPOOF})
exten => 555,n,Set(CALLERID(num)=${SPOOF})
exten => 555,n,NoOp(${CALLERID(num)})
exten => 555,n,Set(CALLERID(name)=”Spoofed Name”)
exten => 555,n,NoOp(${CALLERID(name)})
exten => 555,n,Wait(2)
; enter in the number you are dialing
exten => 555,n,Background(enter-phone-number10)
exten => 555,n,Read(SPOOFDIAL||11|i|2|30)
exten => 555,n,NoOp(${SPOOFDIAL})
exten => 555,n,Wait(1)
exten => 555,n,Background(pls-wait-connect-call)
exten => 555,n,Dial(SIP/voip_provider/${SPOOFDIAL}|30)
exten => 555,n,Hangup()
; just dial “spoof” :-D
exten => spoof,Goto(spoof|555|1)
It says to enter 10 digit phone #, the first time its the CID you want to spoof. The second time its the # you want to call and its actually an 11 digit number.
Thanks for the input and providing your script monoxyde. Your script works very well. The first script does not work if you have a trunk CID set but if you leave the trunk CID blank and you only use extension CIDs then it should work. The problem is that the way the script is set up is not very good. The trunk CID gets called after the spoof CID is set so it messes it up.