I am working on linking from FreePBX to a clients custom developed CRM. They want to be able to retrieve the customer’s number based on the current call from the extension of the operator.
For example, if my desk is 200 and customer 07123456789 calls, I want to be able to pull the customer number whilst I am on the phone with them. The webhook only gives me the destination extension after the call has finished.
While the call is active:
Body uuid: 1663430670.41091 direction: inbound disposition: UNKNOWN source: 07460020566 destination: 01227123123 recordingfile: duration: 0 calldate: 1663430670 timestamp: 1663430670 clid: cnam: cnum: type: START voicemail: owner: 0
When the call has finished:
uuid: 1663430670.41091 direction: inbound source: 07123456789 destination: 200 recordingfile: duration: 25 disposition: ANSWERED calldate: 1663430696 timestamp: 1663430677 contexts: from-pstn contexts: from-internal contexts: macro-dial-one contexts: ext-local clid: XXXXX cnum: 07123456 transferer: callend: 1 type: END voicemail: destNumber: owner: 0
With the API, the UUID again only gives me the destination after the call has finished. Has anyone else come up with a solution for this? Thanks in advance.