Special IVR for calls without caller id

vmoreno
Posts: 116
Member Since:
2006-08-02

Hello,
I have trixbox 1.2.3 up and running well with tdm400 with several extension and ivr menus.

Some of the incoming calls (less that 1%) have no caller id, and i will like to send this call to special IVR instead of the normal IVR of my company.
How can i do this?
Thanks



jpwspo
Posts: 40
Member Since:
2006-06-21
Re: Special IVR for calls without caller id

What are you asking -- how to do the transfer, or how to detect there is no caller id, or something else?

The more specific your question, the more likely the answer -- although I find answers are pretty hard to come by in general on this forum. :(



vmoreno
Posts: 116
Member Since:
2006-08-02
Re: Special IVR for calls without caller id

Yes,
you right,
some times is difficult to explain.
Beside, most of the people is not using their own language :)

I want to dectect the incoming calls that have no caller id, ir order to play a specific IVR, instead of the actual IVR running.
Thank you.



jpwspo
Posts: 40
Member Since:
2006-06-21
Re: Special IVR for calls without caller id

I had to do somethign like that myself, only using contexts instead of the "digital receptionist" IVR.

What I did was
1) have the call come into the first context.
2) at the very beginning of that context, look at the caller id.
3) If no "real" caller id, then jump to another context.

The trick was that here in the US, if caller id is blocked it is still NOT empty -- it might be "blocked" or "anonymous"

So I used a regular expression to "return" the numeric portion of the caller id, and if THAT was empty (or did not match a complete phone number) then I knew there was no caller id.

BTW I found different voip providers would sometimes put a "+" at the beginning of their 'numeric' callerid, so it was a good idea to run the filter below anyway.

The regular expression I used is this:

exten => s,n,set(cid=${CALLERID(num)})
exten => s,n,gosub(stripcidtext,1) ; it's empty if no numeric portion

...
exten => stripcidtext,1,noop()
; the quotes below are important!!!!!
; 0 or more nondigits followed by digits, returns the digits
exten => stripcidtext,n,Set(regx="[^0-9]*([0-9]+)")
; returns first numeric portion of the string
exten => stripcidtext,n,Set(cid=$["${cid}" : ${regx}])
exten => stripcidtext,n,noop(cid=/${cid}/) ; display for debugging
exten => stripcidtext,n,return

Hope that helps. Good luck.



bubbapcguy
Posts: 3774
Member Since:
2006-06-02
Re: Special IVR for calls without caller id

look at the Privacy Manager

I guess you could modify the app to send to IRV



vmoreno
Posts: 116
Member Since:
2006-08-02
Re: Special IVR for calls without caller id (edited)

OK,
I found the Privacy Manager,
In the freePBX I just can select Yes/No

Where can i configure Privacy Manager,
for instance in Spain phone number are 9 digits not 10.
Thanks



dickson
Posts: 1831
Member Since:
2006-06-02
Re: Special IVR for calls without caller id (edited)

Here's how I would do it.
I'm going to assume (with this code) that you aren't going to use privacy manager for other extensions? We can use the feature of privacy manager to detect no CLID and force the call to the IVR of your choice.

open your extension.conf file

scroll down to the section [macro-privacy-mgr]

look for the line
exten => s,n(CLEARCID),Set(CALLERID(num)=)

change it to look like the following:

exten => s,n(CLEARCID),Goto(ivr-X,s,1)

the "X" corresponds to the IVR number in your extension_additional file that contains the choices that a call with no CLID will goto. Look at that file and find out which IVR number FreePBX has assigned to it, and put that number in place of X.

Save the changes

in the cli, type asterisk -rx reload

test way and let us know.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.