Add call_num key/value to the Call JSON object.#1118
Add call_num key/value to the Call JSON object.#1118gofaster wants to merge 1 commit intoTrunkRecorder:masterfrom
call_num key/value to the Call JSON object.#1118Conversation
…_start` and `call_end` messages contain the `call_num` key/value, this helps consumers match call events with audio.
Example new `audio` MQTT message (without encoded audio for brevity):
```
{
"type": "audio",
"call": {
"audio_wav_base64": "",
"audio_m4a_base64": "",
"metadata": {
"call_num": 145,
"freq": 460162500,
"freq_error": -11,
"signal": -12,
"noise": -56,
"source_num": 0,
"recorder_num": 0,
"tdma_slot": 0,
"phase2_tdma": 0,
"start_time": 1775355557,
"stop_time": 1775355566,
"start_time_ms": 1775355557368,
"stop_time_ms": 1775355566939,
"emergency": 0,
"priority": 0,
"mode": 0,
"duplex": 0,
"encrypted": 0,
"call_length": 10,
"call_length_ms": 9571,
"talkgroup": 27,
"talkgroup_tag": "Town FD Dis",
"talkgroup_description": "",
"talkgroup_group_tag": "Fire Dispatch",
"talkgroup_group": "Town Fire",
"color_code": -1,
"audio_type": "analog",
"short_name": "AnyName",
"freqList": [
{
"freq": 460162500,
"time": 1775355557,
"pos": 0.0,
"len": 9.571,
"error_count": 0,
"spike_count": 0
}
],
"srcList": [
{
"src": 551290,
"time": 1775355557,
"pos": 0.0,
"emergency": 0,
"signal_system": "",
"tag": "",
"tag_ota": ""
}
]
}
},
"timestamp": 1775355574,
"instance_id": "InstanceA"
}
```
|
Seems reasonable. Considering that Each call could have: "call_id": "cd953e47-dfbc-4d72-a8a3-7f09099103d5"or a less UUID-ish combination of unix time, talkgroup, and frequency like we do with the filename. |
|
Being able to unequivocally correlate a call recording file, MQTT This PR would at least make it easier to match a call recording file (which by default contains the call_num in the filename) with the above MQTT event msgs. It is a little fuzzy currently since the start/stop times in the messages and the filename doesn’t exactly match up. |
|
If you're going a pseudo UUID route, I'd highly recommend the time series version of it, with a sha256 to fill out the rest. UUIDv7 is time series based, and is a IETF 4122 proposal. You'd set rand_b to the sha256 of the wav form. That should give you enough uniqueness. Granted you'd be throwing away most of the sha256 bytes.
|
da57cee to
02c5101
Compare
As the MQTT
call_startandcall_endmessages contain thecall_numkey/value, this helps consumers match call events with audio.Example new
audioMQTT message (without encoded audio for brevity):