Voicepath GSM modem a single wave file - modem

When a GSM modem is receiving voice(i.e., multiple wave files continuously) in the voice path, how will the modem able to identify the completion of a single wave file? Is there any software that could perform this?

The modem doesn't actually send wave files (in the sense of .wav files), because these require a header that describes how long the file is. Instead, the modem keeps sending raw data until either the call ends or the computer tells it to stop. The modem signals the end of the data with a DLE byte followed by a ! - see the wikipedia article about voice modem commands for details of this (and for how a DLE byte is sent in the datastream).
As for converting the data to .wav or another usable format: many audio conversion programs can do this; soxis one such command-line program.

A GSM mobile station may support different bearers. Depending on device capability this includes
voice
circuit switched data
packet switched data
A mobile phone typically supports voice, CS data and PS data. A GSM modem may support PS data only. Each of these bearers are implemented differently in order to utilize the radio channel effectively.
You can transport a WAV file via an packet switched bearer, however then it will be transported using IP technology. This needs an application on both endpoints handling the transport and the presentation to the user, e.g. playout.
A voice bearer supplies a continuous audio stream, starting with connecting the call and ending with terminating the call. GSM does not support discrete portions of audio on the voice bearer. Playing a WAV file on the voice bearer is a non-standard functionality for virtually all commercial devices. You may need to find test devices supporting this.
If you use the voice bearer to play out the WAV file like a normal telephone call and want to detect completion of a playout you may detect a pattern in the audio (requires an algorithm to calculate similarity since your WAV file will be encoded several times and may be mixed with noise) or use some sort of out-of-band signalling, some phones support dual mode, i.e. running voice bearer and PS bearer in parallel. Both not trivial to do.

Related

Server side real time analysis of video streamed from client

I'm trying to build a system for real-time analysis on server for video streamed from the client using WebRTC.
Here is what I currently have in mind. I would capture the webcam video stream from the client and send it (compressed using H.264?) to my server.
On my server, I would receive the stream and every raw frame to my C++ library for analysis.
The output of the analysis (box coordinates to draw) would then be sent back to the client via WebRTC or a separate WebSocket connection.
I've been looking online and found open-source media server like Kurento and Mediasoup but, since I only need to read the stream (no dispatch to other clients), do I really need to use an existing server? Or could I build it myself and if so, where to start?
I'm fairly new to the WebRTC and video streaming world in general so I was wondering, does this whole thing sound right to you?
That depends on how real-time your requirements are. If you want 30-60fps and near-realtime, getting the images to the server via RTP is the best solution. And then you'll need things like a jitter buffer, depacketization etc, video decoders, etc.
If you require only one image per second, grabbing it from the canvas and sending it via Websockets or HTTP POST is easier. https://webrtchacks.com/webrtc-cv-tensorflow/ shows how to do that in Python.

Media Foundation Capture - how do you detect the true native input format

I've got a few video converter boxes (Marshall VAC-11SU3, Marshall VAC-11HU3, Magewell USB Capture SDI, Blackmagic UltraStudio Express) and no cameras.
They all have an incoming video signal plugged into their respective SDI or HDMI ports.
The issue is that GetNativeMediaType always returns the same format as GetMediaTypeByIndex does for index 0 regardless of the actual video format that is coming into the SDI/HDMI port.
Every Media Foundation example I've seen so far has a UI to pick the "correct" native format. This menu is populated from GetMediaTypeCount and GetMediaTypeByIndex for the device.
My users will not know what to pick!
We've been using Blackmagic's DeckLink APIs and our users see the incoming video signal format in the UI.
We'd like to expand support for multiple device manufacturers but this one has me stumped.
Media Foundation does not employ a concept of signal format detection you have with recent Blackmagic hardware (earlier Blackmagic products, by the way, did not offer detection).
A video source driver could indeed enumerate the media type it sees on the wire as first GetNativeMediaType output and/or offer dynamic format change during streaming session to such format. Media Foundation video sources are mostly assuming however webcamera-like devices and have a fixed type enumeration order.
I would not assume Blackmagic driver to be different because it mostly mimics a webcamera, so that with a WDM driver Blackmagic device inputs could be consumed using standard APIs. If one needs extended functionality, such as signal detection, Blackmagic suggests using their DeckLink SDK (which is good by the way).

USB packet and data buffer capture

I need a software or application with API support to capture USB packet and data buffer. I would like to analyse the captured data using LabVIEW.
Suggest applications for usb packet and data capture with API support, so that I can access them using LabVIEW.
Or
Alternate methods to capture and analyse usb data using LabVIEW
I had tried a approach using logman.exe . But that doesn't log all the USB packets. Has anyone tried logman to capture the usb packets?
you can consider using VISA functions.
A few examples are shipped with Labview (open example finder and look for USB).
Here is a starting point giving instructions about how to give VISA access to the device.
You need find out some windows dll's and use it in labview. the examples provided for NI USB devices.

Placing a call programmatically though GSM Modem

I was tasked with devising a solution to initiate a voice call using a GSM Modem programmatically. The call will be initiated via an API and play and audio file or just ring a number and then drop the call. This is to be used to notify staff during the night about critical alarms on the network.
Does anyone know of a solution or worked on something similar?
GSM network modem with SIM Card is to be used.
I'm not sure the staff will appreciate an autodialer like feature, rather than a text or other message, but as this is your requirement I am guessing your customer must have already made the decision.
One good approach for which there is plenty of documentation is to use an Asterisk based solution.
If you are not familiar with it, Asterisk is a open source PBX which is capable of connecting, initiating and receiving calls.
There are several firms that made GSM/UMTS interfaces cards that you can host in a standard server/PC and use as you have described above (you want to make regular GSM voice calls not VoIP over data over a GSM model I am assuming).
Some specific info on your use case is here for example:
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out+deliver+message

zte voice modem problem

we are using zte usb modem. we try to call by AT command (ATD) successfully. But there is no sound when remote device answered.
Does anyone have any idea?
My problem was associated with ZTE usb modem.
I solved the problem.
i can receive and send voice separately to voice port now. But i can not get clean sound like WCDMA UI.
how can i receive and send data with high quality?
Please look at my source code. [http://serv7.boxca.com/files/0/z9g2d59a8rtw6n/ModemDial.zip]
Does anyone now where is my error?
Thank you for your time.
a) Not all zte usb modems supports voice, to detect if modem supports check for ZTE voUSB Device in your ports list.
b) If port present, voice will go through it in pcm format, with 64kbps frequency (8000 samples per sec, 8 sample size).
In your own program, you should read audio stream from there.
stream is additionaly encoded with g.711, so you need to decode it before sending to audio device
It is fairly common to shut off the speaker after connection. Try sending ATM2, that should make the speaker always on.
Basic hayes command set:
M2
Speaker always on (data sounds are heard after CONNECT)
I'm trying to use asterisk's chan_dongle module on ZTE MF180 Datacard model with activated voices abilities.
Originally chan_dongle using raw PCM format on voice data.
But i was discover, that ZTE using ulaw format on sending and recciving voice data.
You can get voice data and save file in this format for learn by using standard Asterisk's Record(filename:ulaw) command in dialplan.
My voice data, dumped from ZTE modem in the same format.
I check it. ZTE dumped data was successefully played by Asterisk's command Playback(dumped)