Calls API - Metadata Upload Error

Status
Not open for further replies.

slvp25

Newbie
Joined
Jan 20, 2019
Messages
3
Location
Monte Vista, CO
I recently got the approval for Alamosa, Colorado Calls API and added the fields to my trunk-recorder.

I am using the latest trunk-recorder build available from Git:
Code:
/trunk-recorder$ trunk-recorder --version
Trunk-Recorder: 4.5.0
        commit ee002acd4cfe85161e2b523fa12735cf914a363a (master)
        describe LTS-86-gee002ac
        Author: Luke Berndt <lukekb@gmail.com>
        Date: 2023-01-30 21:38:37 -0500

        Merge pull request #764 from CrimeIsDown/unit-id-regex
Adding support for regex in unitTagsFile

I have added the URL, System ID, and the API key to the relevant sections (URL global, ID and Key to the system)

Upon setting it up I have had one single file upload. One. Only one. No idea why.

I have searched around and tried re-downloading the talkgroups file from radioreference.com. I had a very old one and the format has changed. I tried it with and without the header row, no difference.
Code:
Decimal,Hex,Alpha Tag,Mode,Description,Tag,Category
1222,4c6,"CO SAR Cord",D,"Statewide SAR Coordinators",Emergency Ops,"Colorado Search and Rescue"
2808,af8,"AM1-Lifeguard",D,"AirMed 1 - Flight for Life (Centura Health)",EMS Dispatch,"Colorado Medical Helicopters"
2813,afd,"AM6-REACH Air",D,"AirMed 6 - REACH Air Medical",EMS Dispatch,"Colorado Medical Helicopters"
8087,1f97,"Alamosa PD Disp",D,"Police & Adams State College Police (ARCC 2)",Law Dispatch,"Alamosa (City)"
8089,1f99,"ConejosCo LE Dis",D,"County LE Dispatch",Law Dispatch,"Conejos County"
8180,1ff4,"AlamosCo MAC",D,"County Mutual Aid Channel",Interop,"Alamosa County"
8181,1ff5,"AlamosCoEMS E Ds",D,"EMS East Dispatch",EMS Dispatch,"Alamosa County"
8183,1ff7,"AlamosCoEMS W Ds",D,"EMS West Dispatch",EMS Dispatch,"Alamosa County"
8185,1ff9,"AlamosCo FD",D,"County Fire Dispatch",Fire Dispatch,"Alamosa County"
8194,2002,"NPS GSD Rangers",D,"Great Sand Dunes National Park & Preserve Rangers",Federal,"National Park Service"
8199,2007,"Alamos SO Disp",D,"Sheriff Dispatch",Law Dispatch,"Alamosa County"
8230,2026,"Costilla Co MAC",D,"County Mutual Aid Channel",Interop,"Costilla County"
8231,2027,"CostillaCo FD Ds",D,"Fire/EMS Dispatch",Fire Dispatch,"Costilla County"
8233,2029,"Costilla SO Disp",D,"Sheriff Dispatch",Law Dispatch,"Costilla County"
8255,203f,"ConejosCo MAC",D,"County Mutual Aid Channel",Interop,"Conejos County"
8256,2040,"ConjosCo Fire",D,"County Fire Departments",Fire Dispatch,"Conejos County"
8198,2006,"SaguacheCo EMS",D,"EMS",EMS Dispatch,"Saguache County"
8330,208a,"SagucheCo MAC",D,"County Mutual Aid Channel",Interop,"Saguache County"
8332,208c,"SaguacheCo FD Ds",D,"Fire Dispatch",Fire Dispatch,"Saguache County"
8335,208f,"SaguacheCo SO",D,"Sheriff Dispatch",Law Dispatch,"Saguache County"

I have tried the credential check using CURL and it says I'm good to go
Code:
$ curl -s https://api.broadcastify.com/call-upload -F "test=1" -F "apiKey=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -F "systemId=XXXX"
OK

But still I can't figure out why I have these errors uploading:
Code:
[2023-02-04 09:24:10.551264] (error)   [SLVP25ALA]      TG: 8087        Freq: 851.825000 MHz    Broadcastify Metadata Upload Error:
[2023-02-04 09:24:10.551588] (error)   Plugin Manager: call_end -  broadcastify_uploader failed
[2023-02-04 09:24:11.010070] (error)   [SLVP25ALA]      43C Failed to conclude call - TG:       8087 (        Alamosa PD Disp)  Sat Feb  4 09:20:17 2023 MST


I would just assume I'm doing it entirely wrong, if it weren't for that single Alamosa PD call that got uploaded successfully.

Any suggestions or advice would be appreciated.
 

slvp25

Newbie
Joined
Jan 20, 2019
Messages
3
Location
Monte Vista, CO
I have resolved the issue.

I was operating under the assumption that the Broadcastify Calls API would fire off in parallel to the upload script.

It does not.

The upload script must complete and return before the Calls API executes.

I clean up the directory since I don't archive the WAV files or the original JSON. I was sleeping 30 seconds in my upload script to allow the Calls API to complete, then I was renaming the .json to have a time/date stamp on the head of it so it sorts in the directory chronologically instead of grouped by Talkgroup ID.

So I was deleting the .json and other files out from under the API. By the time my script returned the files were GONE.

So I fixed that but forgot about the sleep 30, and all my calls were skewed to 34+ seconds.

Removed the sleep 30, and everything is uploading.

NOTE: Anything you do in the upload script WILL AFFECT your skew. Any delays, audio processing and conversion, sleep/wait, or blocking of any kind adds to the skew time. This might help when troubleshooting Broadcastify Calls API skew too long issues.

Hope that helps someone else in the future.
 
Status
Not open for further replies.
Top