CRM - inbound number and extension answered via webhook or API

Hello everyone,
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[0]: from-pstn
contexts[1]: from-internal
contexts[2]: macro-dial-one
contexts[3]: 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.

Good luck. Since it’s a paid module we attempted to work with Sangoma support on this but were met with silence.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.