Asterisk based DIY P25 repeater and RoIP

This forum is for discussions regarding System Infrastructure and Related Equipment. This includes but is not limited to repeaters, base stations, consoles, voters, Voice over IP, system design and implementation, and other related topics.

Moderator: Queue Moderator

Post Reply
User avatar
Astro Spectra
Posts: 669
Joined: Sat Sep 22, 2001 4:00 pm

Asterisk based DIY P25 repeater and RoIP

Post by Astro Spectra »

Hi All,

DIY P25 repeater technology seems to be one of the forum's holy grails. While Quantars are nice you need a DIU to interface to a phone patch in P25 mode and RS-232 modem cards for repeater linking. Not only does this cost a deal of money but delivery isn't overnight.

A while ago I came across the web site http://www.zapatatelephony.org/app_rpt-old.html [ now http://ohnosec.org/drupal/node/135 ] which stuck in my mind. This is some free radio linking software to add on to another free PABX software project called Asterisk. To get started there is some great documentation at https://allstarlink.org/about.html and note that for a stand alone system you don't need Allstar link registration. To get a proper feel for all this stuff explore all the links on the pages I've listed. If you don't speak Linux get a tame geek who does. There has been a mention or two here on the board about Asterisk but I've not heard of anyone actually building something.

The other day I needed a P25 phone patch and an HF remote in a hurry (as you do).

Using some ready made USB interfaces (from http://dmkeng.com/URI_Order_Page.htm), a surplus one rack unit high IBM x330 server (1.4 GHz PIII-S 1.5GB RAM), and two VHF W3 100W Astro Spectra radios we had a pretty good system up and running in less than a week. The dial tone service was SIP over the IP backhaul.

Everything was stock except the custom Y cable (consisting of three DB25P male connectors) to go between the Spectras and the URI interface. I removed the W3 HHC mics from the original cable harness that connects to the LHS P5 connector and plugged them directly into the centre J6 connector on both Spectras trays and wired the transceiver ends of the DB25P Y cable to have +12 on the IGN pin 3 and of course tied the EMER pin 13 to DIG GND pin 8. That way you can remove the HHC if you want and the radio will power up on whatever the last mode it was set to. The overall cable screen went to DIG GND pin 18 and the DB25 shell.

On the transceiver being used as the repeater receiver I used DET audio on pin 9 for receive audio with the screen to ANA GND pin 10. For the COR I pulled the command board and jumpered the audio IC (special Motorola pin out version of the TDA7256) enable pin 10 (pin 1 is on the LHS of the IC) to J5 pin 16. This gives you a COR output, +12V on idle and gnd on receive. The idea for this came from Pyramid Communications and I think it’s better than trying to look at the DC voltage on the speaker leads. If you want a monitor speaker it hooks to pins 25 and 24.

The URI interface support more complex arrangements like separate CTCSS input and outputs CTCSS detect and even DSP squelch but since this application was P25 the simple logic COR was all that was needed.

The transmit unit needed no mods, audio goes to MIC HI pin 12, screen to MIC LO pin 11, and PTT to pin 1. Again the overall cable screen went to DIG GND pin 18 and the DB25 shell.

The Astro Spectra’s I used needed no other jumpers or mods. YMMV.

On the common DB25P that goes to the URI the following pins are used: PTT to PTT pin 1, COR to COR pin 8, MIC HI to LEFT_AC pin 9, DET to MIC_AC pin 21, audio screens to 19 and 20, overall cable screen to the DB25P shell.

The usbradio.conf file needs to match the radio configuration along the lines of:

[usb]
rxboost=0
rxctcssrelax=1
;txctcssdefault=88.5 disable CTCSS
;rxctcssfreqs=88.5 disable CTCSS
;txctcssfreqs=88.5 disable CTCSS
carrierfrom=usb
ctcssfrom=no
rxdemod=flat
txprelim=no
txmixa=voice
txmixb=no
invertptt=0

In autopatch mode the audio is fine. In repeater mode the back to back vocoding is not spectacular but perfectly adequate for comms. The radio are set to low power and run about 40W out without overheating.

The obvious question people ask is how to dial when in P25 mode. Well right now you can't without a bit of a work around. What I did was set up the repeater receiver in mixed mode. On the mobiles I set two adjacent modes, one analog TX and mixed RX to place the call and a second mode, ASTRO both ways, for the conversation. To limit hacking I protected the analog mode with DPL. Not ideal but it works. The pirates probably can't hear the autopatch prompts anyway as they are in P25 and there are a few other tricks that can be pulled to limit access like variable PIN prompts or account codes.

Ideally you'd want to be picking out the Astro dial string from the SB9600 bus, but that's another whole can of whatever. It would probably require a licence if done on a commercial basis and if you're going to go that far then buy a Quantar and a DIU.

While I used a server there is a nifty project for an embedded version here: http://limeylinux.org/

What else can you do with this stuff? Well apart from repeaters, autopatch and remote base applications IP linking of repeaters is made easy as is a mini software based desktop software (see http://www.xelatec.com/xipar/iaxrpt). There is even some MDC 1200 code around if you like that sort of stuff.

[Updated Jan 2014 to fix broken links]
Last edited by Astro Spectra on Sat Jan 18, 2014 1:32 am, edited 3 times in total.
CTAMontrose
was grem467
Posts: 1145
Joined: Mon Jul 21, 2003 12:46 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by CTAMontrose »

are you noticing any degridation of audio quality going from P25->P25 via double vocoding, or have you just used FM->P25 thus far?
User avatar
Astro Spectra
Posts: 669
Joined: Sat Sep 22, 2001 4:00 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by Astro Spectra »

It is double vocoding going from mobile to mobile and single vocoding going from the phone to mobile and vice versa.

Yes, it not great from mobile to mobile but it is still way better than the old CVSD style encryption. I would say on par with the first generation of digital phones (IS-95 or original GSM).

I'm waiting on a couple of XTL2500 radios to replace the current Astro Spectra units which only have DSP 7 firmware and hoping for a small audio improvement.
User avatar
HarrisonRHW
Posts: 61
Joined: Thu Mar 06, 2008 6:28 am
What radios do you own?: Waris Stuff

Re: Asterisk based DIY P25 repeater and RoIP

Post by HarrisonRHW »

I know I know.. thread revival... I didn't wanted to start a new thread though..

This is very interesting, I have just started playing with the capabilities of Asterisk recently - the thing I want to do with it is create an interface to create a dispatch console set where the main console would be the computer, and I could use a SIP phone such as a Cisco (even though it isn't really SIP) as a desk set like an MC1000 for different locations in the station for convenience, but at the same time take advantage of asterisk features to do things such as have an audible recording of the call sign transmitted, so the station could do double duty as a repeater and a base station using different radios.

I feel like a Tone Remote Interface would do well in your situation and mine.

I would like to know what you meant by MDC1200 codes around... I know it is just about as easily decoded as DCS, but if you used both I feel it could help curb hacking of your repeater, or get stricter by creating a criteria such as when each MDC should be used. Were you thinking about MDC for emergency modes or something.

Unfortunately I have neither the time nor the proper resources to go crazy with this stuff, so I hope it all goes well with yours, and that it can be a good learning tool for others wanting to use Asterisk.
User avatar
Astro Spectra
Posts: 669
Joined: Sat Sep 22, 2001 4:00 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by Astro Spectra »

The decoding of CTCSS, DTMF, and MDC1200 signaling is done in the app_rpt code so no extra hardware is needed. I’ve not played with DMC1200 but I understand that you can program your dialplan to handle calls form MDC enabled mobiles is a whole range of creative ways. I'm looking at the P25 ID and dial issues.

With respect to the console there is already a PTT soft console for the PC called IAXRPT you can get more info on Steve Henke’s site here:

http://www.xelatec.com/xipar/iaxrpt/

It supports display of ID including from MDC1200. Using the dialplan you can translate raw ID info into something more interesting. I think using commercial off the shelf PC hardware is better than dedicated tone remote functionality. If you still want a real desk set we use the Cisco/Linksys SPA942 supports secure RTP.

There is quite a good Power Point presentation on the whole interoperability and Asterisk/ROIP by Solomon Technology here:

www.napco.org/Presentations/STACS_Presentation.ppt

And a couple of SAFECOM papers here:

http://www.safecomprogram.gov/SAFECOM/l ... ableon.htm
User avatar
HarrisonRHW
Posts: 61
Joined: Thu Mar 06, 2008 6:28 am
What radios do you own?: Waris Stuff

Re: Asterisk based DIY P25 repeater and RoIP

Post by HarrisonRHW »

Hey thanks a lot for the PPT... has some great stuff.

I am a tech guy so my only knowledge of Asterisk before your posts was basically using it as a free PBX.. Didn't really think that it had much use for radio communications, but I have been proven dead wrong.

Sometimes you wish you had your own little city where you could set this up and play with things and mess with it, but until then I will test the limitations of various programs, including Asterisk and its add ons.

What would be nice is if we got a good Windows build of Asterisk (as I understand the current one isn't very good) that way it could be better integrated with stuff out there because as you learn in Computer Science courses, keep it simple, and don't reinvent the wheel if you don't have to.

With the rise of P25.. you would think there would be a good way to use NAC codes (or at least its principals) to create an easy to decode protocol for PTT ID that is placed at the header of the packets so a typical packet sniffer could be modified to use it.
peteinsf
Posts: 31
Joined: Sat Jun 29, 2002 11:46 am

Re: Asterisk based DIY P25 repeater and RoIP

Post by peteinsf »

This is interesting...

I have been experimenting with this with similar results (app_rpt w/2 - W5 420 radios). I love the idea of a W3 radio running with no control head. Can you only do that with a W3? Also is there anything else I would need to know other than connecting +12 to IGN and D-DNG to EMER?
It would be a single mode radio.

Thanks for this it will clearly free up a few of my control heads.
vk4fq
New User
Posts: 3
Joined: Sat Oct 01, 2011 1:59 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by vk4fq »

Would love to know how you connected the spectra's together. Also on how to interface to asterisk
I have bought a DMK Engineering Dongle

Thanks
Sam
VK4FQ
User avatar
Astro Spectra
Posts: 669
Joined: Sat Sep 22, 2001 4:00 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by Astro Spectra »

Sam, all the connections are in the first post. This system has been replaced by a Quantar to implement P25 dialling.
spectrum3100
New User
Posts: 9
Joined: Tue Oct 23, 2012 1:04 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by spectrum3100 »

How did you implement P25 dialing with the Quantar? And where does the analog audio come from to feed into the URI?
User avatar
Astro Spectra
Posts: 669
Joined: Sat Sep 22, 2001 4:00 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by Astro Spectra »

This system did not use a Quantar. Why not is set out in the first paragraph. It was built from two mobiles. This was like four years ago and since then Quantars have become much more affordable.

The audio connections are right up there in the first post:

"DET audio on pin 9 for receive audio with the screen to ANA GND pin 10."

"The transmit unit needed no mods, audio goes to MIC HI pin 12, screen to MIC LO pin 11, and PTT to pin 1. Again the overall cable screen went to DIG GND pin 18 and the DB25 shell."
spectrum3100
New User
Posts: 9
Joined: Tue Oct 23, 2012 1:04 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by spectrum3100 »

You said in the above post, "This system has been replaced by a Quantar to implement P25 Dialing". My question was how do you get dialing out of the P25 stream. Maybe this is obvious to someone with a quantar, but I dont have one as of yet.
User avatar
Astro Spectra
Posts: 669
Joined: Sat Sep 22, 2001 4:00 pm

Re: Asterisk based DIY P25 repeater and RoIP

Post by Astro Spectra »

Sorry my bad, the P25 dialing is decoded by a DIU3000 attached to the Quantar.
Post Reply

Return to “Base Stations, Repeaters, General Infrastructure”