Freepbx send caller ID to CRM

hello everyone. i do have a small PC running freepbx for my SoHo business.
there is another PC in the LAN that has the CRM (custom made php, mysql). I do need to send the caller ID of each incoming call to the CRM. could someone give me guidance, please?
there is no need to place calls from the CRM. only receive the callers name from the freepbx and send it to CRM.

CallerID Superfecta can be configured in your inbound route(s) to “Send to URL” as well as numerous other destinations.

may i have an example how to configure superfecta, please?

there’s documentation on using Superfecta on github below.

HTH

Mike

what i would like to do is the opposite. i would like to sent the caller ID to a CRM.

Although this module is not designed for your purpose, it will work for your purpose.

The script is designed to send the caller ID to a CRM , then retreive the CNAM information (caller ID’s name) from the CRM, which will then show up on the handset. the process is basically as follows at the moment…
asterisk gets the callerid.
it sets the caller ID Name as the Caller ID number
it checks its internal CNAM database for a name (basically extensions).
If it finds a match it changes the CNAM field of the call (caller name) to the CNAM record rather than the number…
eg:

incoming call from 0123456789
asterisk sets CNAM - 0123456789 CNUM - 0123456789
Asterisk checks its database for 0123456789
It finds no match so leaves it at that, passes the call to SIP handset with
name:0123456789
number:0123456789

what this module (and probably others like it, i’m only fixating on this one as @lgaetz metioned it) is inject a little bit to the inbound route to let you look up an external database… To do this, it has to pass on the caller ID, if you dont want asterisk to know the name that matches that record you dont have to!
If i was wanting to acheive what you do (i am a php developer, so i’m talking from a developers standpoint here) i would write a bit into the CRM to handle this. Basically the new flow process would be this:

incoming call from 0123456789
asterisk sets CNAM - 0123456789 CNUM - 0123456789
Asterisk checks its database for 0123456789
Asterisk now checks superfecta with your "custom web lookup"
it send your webpage something like callerid.php?theNumber=0123456789
Your Custom CRM can then capture that request and timestamp (in php it would be $theNumber= $_REQUEST['theNumber;]; as an example.
it can then log in the database that the call was received by callerID at x time.
You could then either just echo back the $number variable so asterisk continues as normal… Or you could actually do something like an sql query to match that callerid to a client in your CRM and then echo out the clients name… For the sake of functionality, i will pretend that my custom URL has found 0123456789 in its databse, it’s addedd a call record for the timestamp asterisk asked for the name… now it’s echoed out the username Miribis
Asterisk has now read that reply from your custom web page and as well as the CRM now having a call record, asterisk now sets CNAM to Miribis
it now sends the call to the SIP handset with:
name:Miribis
number:0123456789

Does this make sense? Or an i completely misreading what you are trying to acheive??

HTH

Mike.

1 Like