Freepbx - Sangoma CRM API - Initiating calls.
Hello! We have a Freepbx 16 box running FOP2. We also on that box run the Sangoma CRM api to track and manage recordings on a separate website.
It's come to my attention that when a call is initiated using FOP2 (we had to set the originate channel attribute as per https://forum.fop2.com/discussion/4823/dial-from-fop2-doe-snot-support-calling-to-multiple-pjsip-aors) that the Sangoma CRM api is not receiving the SIP "END" Event which makes the call not be tracked. Can you point me in the right direction as to whether or not this is a configuration issue, or is it a limitation of the client?
In other words. Customer initiates call using fop2 which rings to Polycom phone. The "start" event is sent via Sangoma CRM API to 3rd party tool. Customer hangs up phone. No end event is sent from Sangoma CRM API.
If customer places a call using only polycom phone. The sangoma CRM API sends a "start" even and "end" as expected.
Any help would be appreciated!
FOP2 use native Asterisk commands to perform origination, and then the dialplan will be followed to reach the proper device. Then everything is handled via dialplan (FOP2 only crafts and sends an Originate command).
Looking at FreePBX dialplan it seems that CRM management is 'signaled' by calling the function func-apply-sipheaders and I think, but I am not sure, that a variable needs to be set:
So, you can add variables to FOP2 Originate commands, either via individual Button configuration in the FOP2 manager or globally in /usr/local/fop2/fop2.cfg
I have no idea if this will work or not, but you might want to try to add an originate_variable entry in fop2.cfg, something like
Maybe something like this (or similar to this) might work for you.
We found another potential solution to the issue/difference with USER A (that's not working) vs the other 2 users dialing with fop2. Basically USER A has 2 things slightly different. USER A is enabled for SIP softphone (ZULU). As well she had this field added "Originate Channel" local/7217@from-internal so she could make calls using fop2 to polycom. Apparently this won't work if ZULU is enabled. The 2 other users don't have zulu enabled. The users are able to dial using fop2 without the originate channel field completed. The 2 users calls do send end events and show up in the CRM api. Any other ideas what we can do for users enabled with zulu ?
We still haven't found a solution for this. Any ideas would be appreciated.
When dialing with FOP2 we always get a start event. We still aren't getting the end event when we configure the "originate channel" field. Example crm log showing call with start and end event when NOT using fop2. When making a call with fop2 we do get a start event.