Showing posts with label SIP. Show all posts
Showing posts with label SIP. Show all posts

Monday, August 3, 2015

DMR <-> SIP Translation

When I first got interested in D-Star, there were some discussions on building a D-Star to SIP bridge.

This was back in 2011, now DMR seems to be taking off as I just wrote in my last blog entry titled AMBE proxy.  Once again that nasty AMBE problem?

However Trbonet (http://trbonet.com/) software dispatch thingy does allow you to dispatch from a PC.  So unless this software has some DVSI/AMBE licenseed code in it, there must be a way to address both sides of the AMBE vocoder in the Mototrbo repeater and or radio.  If there is a way to address the input side of the AMBE+2 vocoder in the radio, then you can jack the audio in that way, instead of through a bastardized speaker mic (as an analog hack)

There are a number of interesting DMR related projects on gihub.    The first we stated to play with locally was KD8EYF's TRBO-NET perl scripts:



Showing some interactive text based commands sent from a DMR portable, and the replies from the KD8EYF powered information gateway. Weather reports, sending APRS messages, last heard status of a station, etc.

DMR does actually seem more well suited for a SIP to private call bridge.  D-Star really has no way to know when the call ended to be able to tear down the SIP connection.  It also has no real way to know if a particular D-Star radio is even on.  DMR on the other hand can do all this.

Other ideas:   When mobile it might be nice to have the various responses to the quick texted queries  actually spoken with a text to speech engine.  And since your radio affiliates when you turn it on, maybe even custom repeater greetings/reminders.

When you try and send a text to someone who doesn't have their radio on, obliviously that times out.  In theory it should be possible to see there isn't a reply happening and have server accept the message on their behalf, and when that server sees the user next affiliate, send the message to them then.  (Much like how it works in the cellular world)

The same could apply to a private call that isn't being acknowledged.  The server recognizes this and asks using a text to speech voice if you'd like to leave them a message.  Again playing the message to the user it was original intended for when they next turn on their radio and it phones home to the repeater.

This one seems to incorporate some audio related things:

https://github.com/n0mjs710/DMRlink:
 playback.py: As of this writing, a large multi-national ham radio group has deployed this on TGID 9998 and dubbed it the "parrot". This application can listen to group and/or private voice transmissions and if you trasmit to the group and/or private IDs it's programmed to use, it will record the digital packet stream and then re-play it back. Handy for listening to your audio to see what you actually sound like on the air

Interesting:

Tutorial for Setup of Hytera Phone Patch via SIP:

Sunday, January 10, 2010

VOIP / Asterisk / Phone Interfacing



For nearly a decade I tinkered to my hearts content with various applications and packet radio. I learned an immense amount about TCP/IP. From DOS based NOS packages, which lead to ethernet networking the shack, later to Linux.

Well, I have been tinkering with Asterisk for about 6 years with the same enthusiasm. Much to my surprise, I learned that one of the original founders of our ham technology club has man of the same interests. So much love that Mike Kassner has the vanity callsign, K0PBX to reflect that.

When it comes to interacting with other people not in the hobby, messages (sometimes emergency) are relayed person (ham) to person, and the second most common way is by telephone.

As a mater of fact, telephone communication is probably the largest part of non-face to-face communication.

So like a good ham, being knowledgeable in how the telephone system works and is changing is always beneficial.

With some quick research you'll learn that SIP has become a widely adopted defacto protocol. You'll also learn that an open source Linux based application called Asterisk is a very powerful tool that many hams are playing with.

I was most pleased to notice that the second edition of Jonathan Taylor, K1RFD's VOIP book does elude to a whole new world using Asterisk and app_rpt.

In my opinion, the ham radio tie-ins are just starting.... What a perfect time to get jump on board and help develop something new.

http://nerdvittles.com/ - You'll find an immense amount of tinkering ideas here.

Southeastern Asterisk Radio Networks - Digital Amateur Projects Association (DARPA).

Monday, May 4, 2009

WeComm Digital Audio Repeater Linking


Wisconsin Emergency Communications (WeComm) is developing a statewide repeater system / voice network to provide base coverage throughout Wisconsin. Another imitative is to implement a modern high speed digital network. Both are for state, district and local ARES/RACES, skywarn, public service, and normal amateur radio communications.

The wide area analog repeaters are interlinked using SIP analog radio adapters. The Asterisk based conferencing software is virtually limitless. It provides the flexibility to connect individual repeaters into a statewide configuration, or to disconnect them to serve smaller areas or districts meeting specific needs.

This is a private VOIP network / reflector, unlike; IRLP and EchoLink. (Although the capability to link to such networks is still possible). Using IRLP, EchoLink or some other Wide Area Network linking services doesn't allow the control and flexibility that creating ones own off-network conferencing bridge. The aforementioned systems have a limited number of reflectors available and you are bound to their rules. Once the modern high speed digital network gets in gear the VOIP audio can actually be carried over these links instead of the internet.

SIP / digital audio repeater linking allows you to route / (think digipeat) . This is a great way to connect repeaters together that have quite a distance between them (or poor radio path).

SIP radio linking is also compatible with telephone circuits, and 21st century digital radio systems such as APCO-25, and D-Star. Such high speed multi-media interconnecting backbones can support radio linking of today as well as of the future.

Wednesday, January 14, 2009

Satoshi, 7M3TJZ/AD6GZ's D-Star Node and DV Adapter


Satoshi Yasuda, 7M3TJZ/AD6GZ, has two different constructions projects available. The one that is the main focus of this yahoo group - the node adapter - is basically a GMSK smart modem tailored to D-STAR.

The node adapter has two modes - simplex and repeater. In simplex mode, node adapter only serves to decode/encode the GMSK modulation used by D-STAR radios and turn it into a bit stream that can be fed into a computer. In repeater mode, the node adapter serves as a bit regenerative repeater. However, while in repeater mode, the node adapter does not have the capability to pass any data in/out of the computer. So, in repeater mode, the node adapter can not be linked to any D-STAR gateways/reflectors. This node adapter has no provisions to convert D-Star Digital Voice To Analog Voice. This hardware software combination operates in 100% digital mode.

He began by looking into the UT-118 works. It is entirely of his own design. Mr. Yasuda is/was a member of the D-Star standardization committee.

The main component is the CMX589A GMSK modem chip. The same chip used in many
of the Icom radios.

Probably the next most important chip is the 18F2550 PIC that runs his firmware.
This takes care of formatting/ recognizing the actual D-Star protocol, USB
communications etc.


More information can be found on Satoshi's web site.

Mark, KB9KHM uses his node adaptor in simplex mode with his D-STAR Hot Spot software that Mark wrote to provide a simplex RF point of presence to the D-STAR network. (He uses his D-Star HT with the adaptor hooked to an analog radio's packet port to pass D-Star digitally to a gateway server over the internet.)

In this video, Erik Finskas OH2LAK, of Finland shows his D-Star Hot Spot / node adaptor while holding a QSO:

And here is a slide-show overview of the GMSK Node Adapter:


In a later revision of Mark's hotspot software he added a routine that provides a way around the combination problem repeater mode and linking. Now you only need one pic, as the data received can be sent back out like a loopback, while still keeping a data stream to external D-Plus gateways.




His AMBE DV adaptor on the other hand is a full blown adapter to turn an analog radio in to a D-STAR radio and does include provisions to encode/decode AMBE.

In this video Peter, DJ6ZR/AI4UE and Don, WD4CWE test D-Star on 6 meter and 10m with the Satoshi DV Adapter. With more info at http://dstarradioclub-international.com/default.aspx



Mark, G7LTT/NI2O also has had 10 and 6 Meter successful D-Star QSO's using Satoshi's AMBE DV adapters interfaced to two Yaesu FT-8900 quad band FM rigs.

Satoshi's AMBE DV adapter does decode and encode raw D-Star tailored GMSK unlike the the DV Dongle that Moe, AE4JY and Robin, AA4RC have in production.

Satoshi's does seem better suited for the D-Star to SIP translation project that is being investigated.

Thursday, December 11, 2008

D-Star <-> SIP Translation





One of the interesting things about D-Star is it's ability to route calls between radios by callsign. There are two types of calls with D-Star; directed calls and non-directed calls. Non-directed are much like we are all used to. A CQ type listening mode, where you basically hear all general CQ style traffic on the channel. In the directed call mode, you can ignore all this (think of it as call sign squelch), kind of do-not disturb mode, but either way you can be summoned by anyone making a directed call to you. The radios display the callsign of who you are talking to kind of like a caller id type of thing.

When systems are linked a gateway server tracks where various callsigns are coming from so that directed calls can route out to the appropriate radio end point as you mobile from city to city, etc.

The Session Initiation Protocol (SIP), works very similar. It has become a standard for VOIP and other text and multimedia sessions. The sip username/ secret can represent the D-Star callsign or device / radio endpoint. SIP usernames are usually represented numerically, as in extension 200, but they can also be alphanumeric. A meetme/ conference call/room can act like that big CQ style reflector that we are used to with IRLP and Echolink.

SIP devices can register dynamically with an Asterisk Sever The best example is a SIP based Wifi phone where you may travel from hotspot to hotspot, but the server keeps track of how to route calls back to you. Much like how a D-Star gateway can track and route calls to you.

In either example, D-Star or SIP, under each packets SIP data, the callsign or extension information, there is then the Real-time Transport Protocol (RTP) audio stream carrying ones voice. With D-Star this is AMBE encoded, and with SIP it's typically encoded U-law/G.711.

John, K7VE has a D-Star dream of convergence with SIP, an established real- world protocol using by VOIP networks.

To accomplish such an Asterisk/SIP to D-Star/AMBE bridge/translation, the patented D-Star codec would have to be decoded with a $20 hardware solution, such as the DV dongle developed by Moe Wheatley, AE4JY. It can then be transcoded to more common g.711 a-law/u-law codec.

He points out that once a channel driver is properly created the whole power of Asterisk can be brought to play as a D-Star radio can then be used like any other digital IP phone endpoint; conference bridges, interactive voice response, call out, autopatch, voice recognition, etc. Basically instead of an IP phone as a digital endpoint, we could use a D-Star radio.

Using the AMBE-2020 chips in a PCI card or USB dongle will allow the conversion of the DSTAR Digital Voice to/from alaw or ulaw 8k digital voice and the chip decodes/encodes DTMF ... this combined with the datastream (containing callsigns) should enable making DSTAR radios extensions on a Asterisk PBX (or even assign a DID to them) -- total 2-way ROIP/VOIP integration that can route to/through the PSTN. (Example: dial 1-800-4KB9MWR and get a call you can pick up on your DSTAR radio and vice-versa.) Pretty powerful for EMCOMM and personal use. All enabled by open source


http://www.mail-archive.com/dstar_digital@yahoogroups.com/msg02975.html

-Update May 1st, 2009-
Scott, KI4LKF announced today that he has written an asterisk channel driver (chan dstar) that can connect to D-STAR repeaters and reflectors.

Keep your eyes peeled as this is further developed. http://asteriskradio.net/wp/2009/04/29/digital-integration-to-pstn/

And here are some thoughts on using a SIP phone/client on an Iphone or Android phone to connect to D-Star.

Here is a bit more of John's thinking. A cut and paste from an inquiry to the rtpDir yahoo group:

Subject: Re: Question on Dstar-Asterisk Integration
Date: Thursday, July 23, 2009 3:56 PM



--- In rtpDir@yahoogroups.com, "Tom Power" wrote:

Question for the Group:

Does Scott, KI4LKF's Dstar to Asterisk integration allow the passing of the Dstar integrated callsign in the Dstar Stream to Inbound Caller ID on Asterisk/SIP?

Wondering the level of integration with Asterisk.

Thinking of doing some experimenting....
Was thinking on a PBX integration point. Basically two ID-1's with one of the ID-1's having an asterisk server on one end and using it as a Autopatch, announcement system, SMS Gateway etc.

Thanks,
Tom

As Scott said, that is not what his code does, but it is something several folks have a strong interest in seeing implemented.

Now that open source (Scott's and G4ULF) gateway implementations are coming about, the integration should be a lot more approachable.

Here is what I would like to see.

A driver on Asterisk that has the following functionality:

* It creates a channel to D-STAR where an extension or DID could be mapped to a D-STAR callsign. This channel would do a few things:

Route the stream through an AMBE device (such as the DV Dongle) and bi-directionally transcode between the source CODEC (GSM, G.711, etc.) and AMBE.

It would initiate a "ring" to the D-STAR network through a gateway, setting the UR field to the destination callsign and the MY field to a callsign assigned to the PBX (e.g. KX1XXX T - T for telephony interconnect). The "caller ID" would be placed in the Icom defined 20 character short message field, so that it would show up on the display of D-STAR radios on the radio side of things. It could also send an "audio" indicator of a ring in the stream.

When the radio receives the "ring", the radio user sends back a DTMF command such as "*" to answer, "#" to hangup, "1" send to voicemail, "2" send to my landline, etc.

If no command is received within a certain amount of time, the call is sent to Voicemail.

The conversation takes place (with predefined timout).

If there is also text from the same session (e.g. Jabber/SIP) it is put into the data stream on D-STAR, so it will be available on the data port on the radio. (Bi-Directional)

At the end of the conversation, the radio user sends a DTMF hangup command (e.g. "#") - since this is connectionless, if the "telephone" user hangs up, the DTMF is unnecessary.

Conversely the radio user, sets up a call by setting up his radio:

UR: KX1XXX T
RPT1: KX1XXX A (the repeater)
RPT2: KX1XXX G (the gateway -- I think this should be removed in the future, but its how it works now)
MY: K7VE

The radio user sends a DTMF sequence to start the patch, such as "*123", then dial the number/extension you want to call and proceed like a "regular" telephone call. Then hangup using a DTMF command.

BTW, all of this should work through the D-STAR network. So you could actually go to a remote "registered" Telephony Interconnect. E.g:

UR: KX1XXX T (Boston Interconnect)
MY: K7VE (I'm in Seattle)
RPT1: K7LWH C (2 meter Bellevue WA Repeater)
RPT2: K7LWH G (Bellevue WA Gateway)

Pretty cool?

Once this is all working it is simple to use the Asterisk PBX for voicemail, interactive voice response, etc.

I am gathering the components to build a "desktop repeater" for testing, at which point I hope to work on this.

-- John, K7VE


http://www.mail-archive.com/dstar_digital@yahoogroups.com/msg02975.html

{Edit 1/2011}
Karl, N2VQM posts some good thoughts on the whole matter:
http://groups.yahoo.com/group/gmsk_dv_node/message/6210