Reflector Announcement - how to?

Help with P25 issues
Post Reply
Posts: 36
Joined: Wed Apr 18, 2018 12:53 am

Reflector Announcement - how to?

Post by N6MIK » Tue May 29, 2018 4:33 am

I have a P25 reflector, and I'd like it to 'announce itself' the way "Worldwide", "North America" and others do, upon first transmission. How is this done?


Posts: 6
Joined: Mon May 07, 2018 12:57 am

Re: Reflector Announcement - how to?

Post by KR0SIV » Tue May 29, 2018 12:08 pm

Unfortunately this is not something so easily done.
I've been making some modifications to P25Reflector and P25Gateway for my own areas amateur radio linked system and have also pondered having announcements.

The way MMDVM (well P25Clients) is implemented at least for P25 is taking captured UDP voice frames, modifying the header and then injecting those frames back when you move to a given channel/talkgroup (reflector)

P25Gateway is actually compiled (hard coded) with announcements for the official channels like North America. In order to add your own announcement you would have to capture P25 voice frames, convert them to UDP frames, modify the header and then modify several C++ source files within P25Gateway and then re-compile and replace the binary on every repeater/hotspot that you wanted to have this announcement.

Perhaps someday it could be supported but I find it unlikely due to the lack of simple software allowing a quick capture and header modification of P25 voice frames. It would also require the developers completely re-write how speech is handled.

I'll link to the gateway source below and give a few examples of what I mean. ... P25Gateway

Snip of Speech.cpp source:
Below you can see several calls that are hard coded to bring up various announcements based on the talkgroup id.

Code: Select all

	case 10202U:
		m_speech = SPEECH_NA_TAC2;
		m_count = SPEECH_NA_TAC2_COUNT;
		m_id = id;
	case 10203U:
		m_speech = SPEECH_NA_TAC3;
		m_count = SPEECH_NA_TAC3_COUNT;
		m_id = id;
	case 10300U:
		m_speech = SPEECH_EU;
		m_count  = SPEECH_EU_COUNT;
		m_id     = id;
	case 10301U:
Below you can see most of the SpeechNA.h file which contains the UDP voice frames.

Code: Select all

#if !defined(SPEECH_NA_H)
#define SPEECH_NA_H

const unsigned char SPEECH_NA[] = {
	0x94U, 0x4CU, 0x82U, 0x8EU, 0x6DU, 0x65U, 0x00U, 0x0EU, 0x09U, 0x6FU, 0xD8U, 
	0x80U, 0x94U, 0x58U, 0x2EU, 0xB8U, 0xC6U, 0x4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EU, 0x9BU, 0xD4U, 0x98U, 
	0x90U, 0x48U, 0x8CU, 0xD9U, 0x77U, 0x95U, 0x00U, 0x0EU, 0x2DU, 0xBCU, 0x17U, 
	0x04U, 0x0CU, 0xFDU, 0x7BU, 0xFBU, 0x7DU, 0xF2U, 0x7BU, 0x3DU, 0x9EU, 0x44U, 
	0x04U, 0x0CU, 0xFDU, 0x7BU, 0xFBU, 0x7DU, 0xF2U, 0x7BU, 0x3DU, 0x9EU, 0x45U, 
	0x04U, 0x0CU, 0xFDU, 0x7BU, 0xFBU, 0x7DU, 0xF2U, 0x7BU, 0x3DU, 0x9EU, 0x44U, 
	0x04U, 0x0CU, 0xFDU, 0x7BU, 0xFBU, 0x7DU, 0xF2U, 0x7BU, 0x3DU, 0x9EU, 0x45U};

const unsigned int SPEECH_NA_COUNT = 90U;

Posts: 36
Joined: Wed Apr 18, 2018 12:53 am

Re: Reflector Announcement - how to?

Post by N6MIK » Wed May 30, 2018 11:50 pm

Wow. Yeah, that’s way over my head! Thank you for the explanation about how it works!

Posts: 6
Joined: Mon May 07, 2018 12:57 am

Re: Reflector Announcement - how to?

Post by KR0SIV » Thu May 31, 2018 7:14 pm

No problem, if I get the time to work out the UDP frame conversion I'll let you know.
I wouldn't mind creating an announcement or two time permitting if I get that figured.

The OP25 project by the osmocom group does have software that handles this conversion
I've also considered compiling wireshark with the P25 dissector patch and grabbing the frames as they enter my dev reflector as well.

Either way, if I get around to it I'll post back here.

Site Admin
Posts: 623
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK

Re: Reflector Announcement - how to?

Post by MW0MWZ » Thu May 31, 2018 8:23 pm

Of course the other thing to do is make your P25 reflector public, submit a pull request to put its information into the up-stream source for the P25 hosts file, and ask Jonathan nicely to add your announcement :)

73 de MW0MWZ

Post Reply