Understanding PhoneSystem.Root.CallStorage Output

Status
Not open for further replies.

Shebarn

New User
Joined
Feb 19, 2021
Messages
8
Reaction score
1
Good Day.

I understand that there is no official documentation regarding the Call Control API.

I was wondering if there is any documentation regarding the output of the PhoneSystem.Root.CallStorage cache.

I need to catch 3 events:

- Call Answered
- Call Transferred (When target operator answers the transferred call)
- Call Ended

I basically need to build up the following information:


{
"Id": "24c562241e9f",
"EventType": "Answered",
"PhoneNumber": "+31 6 12345678",
"PhoneExtension": "201",
"Direction": "Inbound",
"PhoneReferrer": "+31858770023"
}

I can successfully dump the CallStorage cache, just need to understand what to look for...

Thank you in advance!
 
Watch the recording folder, and listen for create. Don't wait for write finish, and you'll get a "on call pickup" trigger. That's how we usually do it.
 
Thank you for your prompt response!

Please forgive my ignorance, I am quite new to 3CX, but where is the "recording folder"?
I do assume it is not the folder with the .wav recordings in it...

I get the following form the CallStorage snapshot:
(as an example, there are different types of output for "State", just tried to use one that is not pages long)

Updated - 9732 - ################# Call.9732
CallStateSnapshot.9732:
ID=9732
State=Initiating
Owner=ac=Wconnection.82495
AttachedData=System.Collections.Generic.Dictionary`2[System.String,System.String]
LastChangeStatus=2021/02/18 11:28:24 AM
IsOutbound=True
IsInbound=False
DialedNumber=
ExternalParty=504
InternalParty=
Status=Dialing
HistoryIDOfTheCall=00000177B4E5F10C_9732
OriginatedBy=
ReferredBy=0
CallConnectionID=1
CallID=9732
OnBehalfOf=
DN=Wextension.127: 602
OtherCallParties=TCX.Configuration.Interop.Wconnection[]
RecordingState=Stop
ID=82495
HasAttached=False
AttachedData:
chid=00000177B4E5F10C_9732
prevCall=0
prevLeg=0
sip_dialog_set_id=[email protected]50ff52590e
extnumber=504
devcontact=sip:[email protected]:5395
directcallctrl=1
sip_displayname=602 | Avery
lookup_displayname=Avery
dn=Wextension.127: 602
dnhash=127
onbehalf=0
Destination=504
RoutingTo=[0]
TalkTo=[0]
Bargein=[0]
Transferror=
StartedAt=2021/02/18 11:28:24 AM
AnsweredAt=
Participants=[127]

I have to parse this and try and get the info out of the CallStorage snapshot as I understand.
If there is a better way, please elaborate.

I would just like to understand the output better to determine what I should use...

Thank you in advance.
 
Last edited:
Watch the recording folder, and listen for create. Don't wait for write finish, and you'll get a "on call pickup" trigger. That's how we usually do it.
Good day!

Would you mind elaborating on what exactly you do here?

After tediously studying the CallStorage snapshots and comparing it to the call logs I have determined that I can follow transfers and must watch for type of Wextension for transfers to extensions.

After studying the CDR output, I can see how I can link up the Call ID and determine that a call ended.

It does seem though that CDR output is only created for calls that was actually picked up.

So now the challenge is to determine which calls are actually picked up, so that I can filter what data to capture.

From what I have seen from the recording folder is that .wav files are created there for call recordings.
I am curious on how exactly you get the "on call pickup" trigger?

It seems that you suggest I create a file system watcher for files being created.

I am the developer for our company responsible for product integration but I am not a telephony specialist so I find it extremely difficult to do this integration without proper documentation.

The existing CRM integration tools for 3CX won't suffice since the endpoints generated are only done when calls are already ended.

Please help!

Thanking you in advance.
 
Good day!

Would you mind elaborating on what exactly you do here?

After tediously studying the CallStorage snapshots and comparing it to the call logs I have determined that I can follow transfers and must watch for type of Wextension for transfers to extensions.

After studying the CDR output, I can see how I can link up the Call ID and determine that a call ended.

It does seem though that CDR output is only created for calls that was actually picked up.

So now the challenge is to determine which calls are actually picked up, so that I can filter what data to capture.

From what I have seen from the recording folder is that .wav files are created there for call recordings.
I am curious on how exactly you get the "on call pickup" trigger?

It seems that you suggest I create a file system watcher for files being created.

I am the developer for our company responsible for product integration but I am not a telephony specialist so I find it extremely difficult to do this integration without proper documentation.

The existing CRM integration tools for 3CX won't suffice since the endpoints generated are only done when calls are already ended.

Please help!

Thanking you in advance.
Yes, a file watcher.

or wait for the Gateway service and REST API in v18 update 1 or 2 (hopefully)
 
Thank you very much.

Is the fact that a file gets created then the trigger - because only "picked up" calls get recorded?
 
Thank you very much.

Is the fact that a file gets created then the trigger - because only "picked up" calls get recorded?
Yes
 
Great!

I am now on your station.
Appreciated, thank you.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,324
Messages
591,897
Members
165,475
Latest member
lastshadow