Monday, July 21, 2008

Holy Crap - More info on unblocking private Caller-ID

Wow so I sent a video to youtube of Kevin Mitnick's presentation at the HOPE conference and it seems to have exploded on some sites. some people have complained that its too hard to read so i want to try to help out! I don't have the time right now to do a fully detailed post on this (i can do that later when i have some time), but here is the most important snippet of code that Kevin used.

This is the custom snippet (I added some comments that will help people understand) that he adds to do the actual caller-ID unblocking. It's only 8 lines and you add it to your asterisk extensions.conf file:

[inbound]
;For Asterisk 1.4

;workaround to prevent rtp deadlock
exten => 12089068200,1,Playback(silence/1|noanswer)
;save the callerid to a variable
exten => 12089068200,2,Set(passertedid=${SIP_HEADER(P-Asserted-Identity)})
;save the privacy bit to a variable (if it is set)
exten => 12089068200,3,Set(privheader=${SIP_HEADER(Privacy)})

;check if callerid is private
exten => 12089068200,4,GotoIf($[${LEN(${privheader})} > 1]?8)

;send out regular callerids without modification
exten => 12089068200,5,Set(CALLERID(all)=${CUT(passertedid,@,1):5})
exten => 12089068200,6,Dial(SIP/18053414555@flowroute)

;prepend 900 to blocked callerids before unmasking
exten => 12089068200,8,Set(CALLERID(all)=+900${CUT(passertedid,@,1):5})
exten => 12089068200,9,Dial(SIP/18053414555@flowroute)

You gotta change the "18053414555" to your whatever phone number you want to forward calls to is. Also change "12089068200" to whatever number you purchased from flowroute.

i hope that helps and i'll be back soon with more

9 comments:

mthode said...

do you know if bandwidth.com trunks can do this also?
email me at
m th ode [a] mthode.org

Ross said...

There is a hurdle to overcome in order to make this immediately useful. If someone is calling your cell phone from a blocked number and you want to apply this method in order to find out who that person is, is there a way to do that while still being able to receive calls on the phone? It seems like there should be a way to selectively forward blocked numbers or some numbers without diverting all calls.

chadle said...

Cool. Thanks for this. It will help me find my stalker.

Reck said...

Is there anyway I can use my current phone number for this? Also, how does this work out with pricing? Do I end up having to pay the 1.2 cents a minute or whatever?

Michael said...

I have managed to take the RPID, strip to to a 10-digit number, and set it as the CallerID(all) variable, however, my SIP phones still show the number as restricted. Any idea why this is happening? I also tried pre-pending 900 to the CID to see if it would not let the phone look at the privacy bit, but that didn't work.

StephanB said...
This comment has been removed by the author.
Maxim said...

it seems like flowroute no longer supports this "feature". Are there other sip trunking providers that are recommended here?

Independent World said...

I can confirm that Flowroute and no longer providing this data also. Also curious if any other providers offer it?

zizo said...

Any idea guys how this can be done?
when i set the dial out patter to use flowroute i am getting busy signal, but if i send to the dialout termination at step 6 and 9 to my extension it rings but still private