1 More CID lookup Question

VitalPBX Community Support General Discussion 1 More CID lookup Question

Up
0
Down
  • Post
    TrustedbyU
    Participant

    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.
    ( basically

        if(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
Viewing 5 replies - 1 through 5 (of 5 total)
  • Replies

    Are you using the Caller ID Modifier to  prepend a department Identifier?

    0
    TrustedbyU
    Participant
    Posted by: mrivera

    Are 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

    No, is not an stupid question, is an issue on inbound routes. The Lookup is executed after the CID Modifier.

    We will fix it ASAP.

    0
    TrustedbyU
    Participant
    Posted by: mrivera

    No, 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

    Already fixed up in latest versions of VitalPBX

    0
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.