Caller ID URL Lookup for Different Tenants

Status
Not open for further replies.

AIC2000

Member
Feb 15, 2018
162
3
18
35
Hi,

I'm looking into the possibility of performing a bespoke CID URL lookup per tenant, however, FusionPBX and FreeSWITCH guides point to the fact this can only be a global source?

If each tenant has a different CRM / customer database, I don't want to give caller ID to a tenant that doesn't and shouldn't have it. Are we looking at needing different servers for this?
 

AIC2000

Member
Feb 15, 2018
162
3
18
35
Sure, so we distribute a bespoke commercial CRM to all our clients - we utilise the CID Lookup functionality of FreeSWITCH which submits the phone number to the CRM (as part of the lookup), the CRM then returns the matching customer name to the CRM. Unlike FreePBX (where you can have multiple URL lookups per inbound route), you can only do this via a central CID lookup URL instead of having it in a dial plan for example.

I came up with a concept of being able to append an ID number to each of the caller ID's in the dial plan, which a proxy of sorts could then strip the 4 digit ID and match the rest of the phone number with the relevant CRM / database, however, this feels clunky.

Also - if using the FreeSWITCH CID lookup module and the HTTP server is down for whatever reason or returns an error, the call fails which adds a big point of failure.
 

Dan

Member
Jul 23, 2017
69
12
8
34
Also - if using the FreeSWITCH CID lookup module and the HTTP server is down for whatever reason or returns an error, the call fails which adds a big point of failure.
Looks like cidlookup is synchronously run, which will collapse a call when the API is down. It may also delay a call from being sent to the extension, IMO the caller ID lookup should be triggered by a call, but allowed to run at its own pace and update the active call once the API its hitting returns the caller ID.

If you want to make a pull request to fix this, I would highly recommend it! Here is the lua file that handles this task, though making this non-blocking will likely require editing whats calling it too.

I came up with a concept of being able to append an ID number to each of the caller ID's in the dial plan, which a proxy of sorts could then strip the 4 digit ID and match the rest of the phone number with the relevant CRM / database, however, this feels clunky.
Yeah, this seems clunky, can't the Caller ID settings be scoped to each domain when defining them using the context variable? Check this out to see what I'm referencing (Warning, apparently this site runs cryptominer by default if you don't have uBlock Origin & uMatrix).
 

AIC2000

Member
Feb 15, 2018
162
3
18
35
If you want to make a pull request to fix this, I would highly recommend it! Here is the lua file that handles this task, though making this non-blocking will likely require editing whats calling it too.

I think this is a FreeSWITCH issue more than a FusionPBX issue I think - hence my original question wondering whether I could just ping a URL from a dial plan.

Yeah, this seems clunky, can't the Caller ID settings be scoped to each domain when defining them using the context variable? Check this out to see what I'm referencing (Warning, apparently this site runs cryptominer by default if you don't have uBlock Origin & uMatrix).

That's what I did to set it up originally, the cidlookup.conf.xml configuration is central - hence my first plan was to maybe add an ID number to each of the phone numbers within the individual dial plans, then run it through a home-made 'proxy' which strips that ID from the number, sends the request on to the correct CRM / database and returns the caller ID.

This is a tricky one!
 
Status
Not open for further replies.