Hello,
I am looking for help to know how to gotoif the caller ID coming from outside starts by a specific series of numbers. As I am looking to use aliases to transfer to a specific IVR instead of buying a SIP trunk to use aliases as it would cost a lot.
The scheme:
I got one VOIP line: 0123232323
I got 3 aliases:
Work alias: 0123232325
Home alias: 0123232326
Public alias: 0123232327
For now, I wanted each alias to be detected and transferred to them IVR. There is two problems that I would make that work.
1st: confusion, to make that work I actually make a rule when you call the alias it calls the voip line number and shows its alias number not the number of the caller. I can choose to show both.
2nd: don’t know how to show caller id when ringing to a phone because for the moment it shows only the alias number when ringing to a phone. That’s normal because I choose to show the alias number when it calls the voip line in order to detect them in Asterisk.
It’s a little bit confusing sorry for that. I am making the things complicated but I really do not want to buy a SIP trunk if I can make the things work as they are.
This is what I am already using and that works:
exten => s,1,GotoIf($["${CALLERID(num)}" = "XXXXXXX34"]?dial1) // detecting if that's the work phone number alias then transfer dial1 priority
exten => s,n,GotoIf($["${CALLERID(num)}" != "XXXXXXX34"]?home1) // if the number is calling is different than my work number transfer to my home ivr
exten => s,n(home1),Goto(home,8002,1)
exten => s,n(dial1),GotoIfTime(10:00-11:59|mon-fri|*|*?open,s,1)
exten => s,n,GotoIfTime(14:00-18:00|mon-fri|*|*?open,s,1)
exten => s,n,Goto(closed,s,1)
That scheme actually works well. I really think it is not the better way to make it working. I am a beginner in all that things.
As now, I added a new alias to that scheme. The problem is that actually there is only one number I am detecting and if it is not it transfers to my home ivr. But now, I want it to detect if that is my work alias, the house alias or the public alias which is making more difficult.
Is there anyone that know how we can proceed that scheme to the extensions. I tried a lot of things to detect the both entire aliases and transfer to priority each one but it does not work.
I stay fully available for any further questions,
Best