I am developing a softphone,using "officesip (https://sourceforge.net/projects/officesip/)", I succeeded in establishing call between subscribers, but while a receiver picks up the call the, the call is terminated,showing "error:488:not acceptable here".
At sender side, I found that the error is related to media compatibility issue. But I couldn't find how to solve it, where do I need to configure or change?
Notes:
I have only headset connected to my PC no webcams
SIP server is NGCP-SIPWISE
The call works perfectly when I call from "officesip" to "X-lite",but terminates when I call between two "officesip",after receiver picks up,with status 488.
The "488 Not acceptable here" means audio codec incompatibility problems.
Make sure that both ends has at least one common codec.
You can see the codec list in the INVITE message SDP part (with the m=audio line the codec payload numbers are enumerated and also in the a=rtpmap lines as text).
Also it might be a bug in officesip. In this case I would recommend to enable only one single codec on both end (such as PCMU) and try a call.
Related
I've been using the MRTK MicStream APIs to try to merely determine if the HoloLens 2 user is speaking. I've tried for a couple of weeks. All attempts have failed for reasons documented here and here. I am officially giving up on the MicStream API, and also tried the AudioFrame method from the MediaCapture APIs which also fail. (MediaCapture is how the MicStream DLL also attempts to access raw audio data which you can see here, on line 351 - 357 so this isnt surprising).
My question is: how else can I determine only if a user is speaking? I do not need dictation, a recording, or to use speech commands. I only want to know if the two user microphones on channel 1 and 2 are active above the normal room amplitude (in real time). Does anyone know any other ways outside these methods?
For what its worth - I finally fixed it. The MicStream DLL's MediaCapture instance was conflicting with one I had already instantiated for photo captures. In short, you cant use MicStream with another MediaCapture instance. I tried to set the settings for SharingMode on the first MediaCapture (in my script for capturing photos, but this didnt work. I had to completely stop using the MicStream .dll and streamline the audio capture under one MediaCapture instantiated with StreamingCaptureMode.AudioAndVideo. This fixed the problem.
Have been struggling with finding a way to stream audio, from a file or web, to a specific output device, not just the default one. Tried using mciSendString and while the open command does accept a device id/filename I haven't found a way to make use of it, am not even sure if this is what I am looking for or not, but considering it says ... or the filename of the device driver am guessing yes(?), but correct me if I am wrong, and this isn't a specify your output device type parameter.
If it is the correct thing then how do you enumerate the installed device drivers, have looked into the IMMDevice interface because it seamed like it could have the file names stored in the registry, but non of the output device registry keys had a driver filename type value entry, or at least I haven't found one.
So my question is, how would you go about streaming audio to a specific output device, it doesn't have to be done through mciSendString, that's just something I looked into as it's one of the most talked about function when it comes to playing audio.
Note: please do not recommend me 3rd party libraries like NAudio, the reason I am asking this question is not get recommendations for libraries, otherwise I would have already used one and would have never written this, have just seen a lot of answers be like: Use {LibName}, it has what you want or something along those lines.
In case what's written is odd or incorrectly worded in places, basically this is what the end goal should be:
Installed Output Devices:
- Output1
- Output2
- Output3
Method For Playing:
//will play x.mp3 through output device 1
PlayAudio(output: "Output1", mp3File: "x.mp3");
//will play x.mp3 through output device 2
PlayAudio(output: "Output2", mp3File: "x.mp3");
//will play x.mp3 through output device 3
PlayAudio(output: "Output3", mp3File: "x.mp3");
You seem to be looking for this API:mciSendCommand()
To set the WaveAudio device (soundcard) used by the Multimedia
Control, you must use the mciSendCommand API. The Multimedia Control
does not directly provide a method to let you set the device used for
playing or recording.
Call mciSendCommand() with MCI_SET & MCI_WAVE_SET_PARMS
setting wOutput to the desired playback device's ID.
Then get IDDevice for mciSendCommand() via
mciGetDeviceID("waveaudio")
Its not 100% clear what wOutput wants, its probably the same ID as returned by waveOutGetDevCaps()
I am just a porter.
Please refer:
https://stackoverflow.com/a/13320137/11128312
https://stackoverflow.com/a/10968887/11128312
I have an issue with the background transfer service:
I am trying to download a file from onedrive using BackgroundDownloader, the transfer seems to be effective (some bytes are transfered), but the transfer seems to never end, and at the end the file downloaded size is 0 bytes.
In addition, the transfer never ends because if I launch a second transfer, it never starts (except if i switch the network connectivity (wifi on/off)).
I have tried the same link in the background transfer sample from MS, it gets the same behavior. However I have used the same link in IE, and the transfer goes well.
I have tried with many files (mp3), the result is the same. I have also added:
download.CostPolicy = BackgroundTransferCostPolicy.Always;
but still same result. I have also tried on wifi, debug, release.
Any idea why the file would not be saved? (I have enough space on the SD card of course)
If no answer is found, does anyone know a good implementation of this background transfer service that I could use instead of the official one?
In my code, I'm setting the following values:
public SerialPort comPort = new SerialPort();
comPort.PortName = portName;
The PortName can be COM17, for example.
Now if I've add two devices through my GUI, both on COM17, one will eventually throw an exception (Access to COM17 denied). Now I'd like to check which device is hooked on that COM-port so if my application recognises it, it can send commands through the port, or if it's not recognized, it'll disable the option in my GUI.
So, is there a way to get unique information from the COM-port which I can save in my database when it's being installed?
EDIT: To clarify, if the wrong device is hooked to that COM port (other than when I installed), I get an error. I catch that error so I know it's not the right one. But I'd rather like to know which device that might be. Say I've got 2 drivers DLL's included, 2 different devices, and somebody switched them up. Then my application could check and see the correct names, and therefore conclude it's only a matter of changing the COM-ports of the installed objects, instead of just throwing an error and saying the user has to reinstall.
This is going to depend on your hardware. If the devices attached will give a predictable and consistent response to a particular signal message, then you can use that to identify them. I do the same thing to figure out which COM port a piece of proprietary hardware is attached to. I iterate through all the COM ports and send a message that I know will give a particular response from the hardware. Which ever port gives me the expected result is the one with the hardware.
I have written a simple c# app having functionality of serial
communication. I am using it to read and write to a device. The device
recognizes string commands. I am successfuly able to read from device
using this app. But peoblem is in writing(sending) commands to device.
I am simply using
if (serialPort.IsOpen == true)
{
serialPort.Write("Command1");
}
But my device does not respondes to it.
To check, I tried sending same command using hyperterminal to my
device and my device recognizes it and works perfectly.
Can anybody guide me whats the accurate way to write or what
needs to be make sure for writing to serial port in c#. Is this encoding issue...
(Serial Read using this same app is working pretty fine !!)
Thank you for your time.
Moreover, there is no exception or error and in debug mode
this line executes.
This is a very common problem and invariably caused by leaving the Handshake property set to None. Serial port devices almost always pay attention to the handshake signals and ignore anything you send if the DTR signal isn't turned on. Which indicates that you are powered up and the data it receives isn't noise. Setting DtrEnable to true will be required, that's what HyperTerminal does as well.
And it won't send anything back when it thinks you are not ready to receive anything because the RTS signal isn't turned on. Setting RtsEnable to true will be required, that's what HyperTerminal does as well. Or just set the Handshake property correctly, Handshake.RequestToSend is the common requirement.
If you still have trouble then you can use SysInternals' PortMon to compare the serial port driver commands your program issues against the ones issued by HyperTerminal.
Hyperterminal likely appends a newline character to your input when you hit the Enter key to send information, which consists of a "line feed" and "carriage return".
Check the documentation for your hardware, but my guess is that the device you're attempting to send information to is looking for a carriage return, '\r', to signify the end of input. Like others in the comments are saying, append the appropriate character(s) to the end of your input.
Alternatively, you can use the SerialPort.WriteLine function to accomplish the same thing as appending a newline '\r\n' character to your input without explicitly modifying it.
if (serialPort.IsOpen)
serialPort.WriteLine("Command" + "\r\n");