› VitalPBX Community Support › General Discussion › 1 More CID lookup Question
- This topic has 5 replies, 2 voices, and was last updated 2 years, 5 months ago by
Jose Miguel Rivera.
- Post
-
- June 7, 2018 at 4:33 pm
Hey All.
Ok. I wrote something that links to our central database to lookup a number when someone calls in. in the CID lookup i’m using
query=[CIDNUM] , which works perfectly, and returns the CIDNUMBER as the CIDNAME if there is a null result.
( basicallyif(num_results == 0)
return $_REQUEST[‘query’];)
Is there any ways i can get it to show the CIDNAME set by the server before it does the lookup if there’s a null result? maybe another feild name i can send in the query like query=[CIDNUM]&original=[CIDNAME] ???
Basically, it’s set on the incoming route to Prepend a department Identifier Before the CID name when someone calls in dependant on DID used…. But obviously my CID lookup script it now amending that to the Original CID number, without prepending it with our Prefix… I was going to use the QUEUES script to Prepend it instead of the Incoming route, However the Queues section doesn’t allow Special Characters (like a : ) in the prepend, where as CID modifiers do……
Or would it be easier for me to re-write the dialplan to do the Lookup first, Then the apply the Modifier?? If so, which dialplan do i change? 😀
I’m betting that there is already a built in variable i can use for the query, but can’t find the documentation on it!!
Thanks in advance,
Mike.
0
- Replies
-
- June 7, 2018 at 5:49 pm
- June 7, 2018 at 7:54 pm
Posted by: mriveraAre you using the Caller ID Modifier to prepend a department Identifier?
Yes I am……. My understanding is that it is working as follows:
did -> inbound route -> CID modifier -> CID Lookup -> Queue -> Handsets
It may just be coincidental that all incoming calls thus far have been coming on on switchboard (which has no identifier)…. In which case, i’ve asked a stupid question!!
It’s further complicated, by some numbers being stored in our Grandstream handsets local phonebooks Also.
If it is doing the Lookup, and then running through the modifier afterwards, then I am asking a stupid question, looking for an issue that isn’t there and apologize for wasting your time :D…… Although on a side note… I would appreciate a list of any Variables we can send to the lookup query if there are any other than [CIDNUM] 🙂
0- June 7, 2018 at 9:05 pm
- June 7, 2018 at 10:59 pm
Posted by: mriveraNo, is not an stupid question, is an issue on inbound routes. The Lookup is executed after the CID Modifier.
We will fix it ASAP.
Thank you. In the meantime I’ve added an Identifier followed by an _ in the queue modifier so we can differentiate between departments (as some phones are multi-department)… Once there is a fix in place i will revert to the old way of doing it ( as having DEPT: CIDNAME is much more pleasing to the eye than DEPT_CIDNAME for people like me with mild OCD 😀 )
0- August 16, 2018 at 2:16 am
- You must be logged in to reply to this topic.