Search the Community
Showing results for tags 'sdk'.
-
I'm working on a SIP softphone but I got the following problem and I have no idea how to solve it: During an audio call, PMCA codec is used primarily. How to setup codec priority to achieve PCMU will be used during the call? I use Windows 7, C# (Visual Studio), Ozaki C# SIP library (http://www.voip-sip-sdk.com) and the following type of codecs: PCMA, PCMU, iLBC. I hope that one of the community have any idea. Thank you very much for any help.
-
Hi there, I couple of weeks ago we have installed a new security IP camera (EasyN 187V). In addition to the basic functionalities, it supports Onvif and it has some special features (PTZ, built-in microphone, night vision, motion detection, alarm notification, etc.). The long and short of it, this is a smart device, but we need some further functionalities, because my boss travels a lot and he wants more control over the surveillance system. I'm in charge of finding out a solution that enables remote configuration. I've done some research and I came across a Codeproject guide that informed me that an Onvif-compliant camera SDK would be the most effective solution. (I'm not secure in my knowledge, so I need some confirmation.) So the point is that I checked out the camera SDK that was recommended by the article, and I found a good Onvif C# example on how to configure the IP camera's network settings. I thought it's worth to share the code snippet related to this issue, because it can be useful for others as well, so if you'are also interested in the remote configuration, take a look at the code below: using System;using System.Collections.Generic;using System.Drawing;using System.Windows.Forms;using Ozeki.Media.MediaHandlers;using Ozeki.Media.MediaHandlers.IPCamera;using Ozeki.Media.MediaHandlers.IPCamera.Types;using Ozeki.Media.MediaHandlers.Video;using Ozeki.Media.IPCamera;using Ozeki.Media.IPCamera.Network;using Ozeki.Media.Video;using Ozeki.Media.Video.Controls;namespace ConfigureOnvifCameraRemotely07{ public partial class Form1 : Form { private IIPCamera _camera; private DrawingImageProvider _imageProvider; private MediaConnector _connector; private VideoViewerWF _videoViewerWf; private List<int> _ports; public Form1() { InitializeComponent(); _ports = new List<int>(); _connector = new MediaConnector(); _imageProvider = new DrawingImageProvider(); _videoViewerWf = new VideoViewerWF(); SetVideoViewer(); } private void SetVideoViewer() { CameraBox.Controls.Add(_videoViewerWf); _videoViewerWf.Size = new Size(260, 180); _videoViewerWf.BackColor = Color.Black; _videoViewerWf.TabStop = false; _videoViewerWf.FlipMode = FlipMode.None; _videoViewerWf.Location = new Point(30, 30); _videoViewerWf.Name = "_videoViewerWf"; } private void button_Connect_Click(object sender, EventArgs e) { _camera = IPCameraFactory.GetCamera("192.168.115.175:8080", "admin", "admin"); _camera.CameraStateChanged += _camera_CameraStateChanged; _connector.Connect(_camera.VideoChannel, _imageProvider); _videoViewerWf.SetImageProvider(_imageProvider); _videoViewerWf.Start(); _camera.Start(); } private void _camera_CameraStateChanged(object sender, CameraStateEventArgs e) { if (e.State == IPCameraState.Streaming) { InvokeGuiThread(() => groupBox_Network.Enabled = true); ClearGUI(); GetNetworkSettings(); if (!_camera.NetworkManager.DefaultConfig.UseDHCP) InvokeGuiThread(() => radioButton_Manual.Checked = true ); } } private void ClearGUI() { InvokeGuiThread(() => { textBox_IP.Text = String.Empty; textBox_Host.Text = String.Empty; textBox_Netmask.Text = String.Empty; textBox_Gateway.Text = String.Empty; textBox_DNS.Text = String.Empty; textBox_NTP_IP.Text = String.Empty; textBox_HTTP.Text = String.Empty; textBox_HTTPS.Text = String.Empty; textBox_RTSP.Text = String.Empty; comboBox_HTTP.Items.Clear(); comboBox_HTTPS.Items.Clear(); comboBox_RTSP.Items.Clear(); }); } private void GetNetworkSettings() { InvokeGuiThread(() => { textBox_IP.Text = _camera.NetworkManager.DefaultConfig.IPAddress; textBox_Host.Text = _camera.NetworkManager.DefaultConfig.HostName; textBox_Netmask.Text = _camera.NetworkManager.DefaultConfig.Netmask; textBox_Gateway.Text = _camera.NetworkManager.DefaultConfig.DefaultGateway; textBox_DNS.Text = _camera.NetworkManager.DefaultConfig.DNS; textBox_NTP_IP.Text = _camera.NetworkManager.DefaultConfig.NTP.IPAddress; if (_camera.NetworkManager.HttpPort == null) textBox_HTTP.Enabled = false; else { foreach (var ports in _camera.NetworkManager.HttpPort.Port) { comboBox_HTTP.Items.Add(ports); } } if (_camera.NetworkManager.HttpsPort == null) textBox_HTTPS.Enabled = false; else { foreach (var ports in _camera.NetworkManager.HttpsPort.Port) { comboBox_HTTPS.Items.Add(ports); } } if (_camera.NetworkManager.RtspPort == null) textBox_RTSP.Enabled = false; else { foreach (var ports in _camera.NetworkManager.RtspPort.Port) { comboBox_RTSP.Items.Add(ports); } } }); } private void button_Apply_Click(object sender, EventArgs e) { if (radioButton_DHCP.Checked) { _camera.NetworkManager.DefaultConfig.UseDHCP = true; } if (radioButton_Manual.Checked) { _camera.NetworkManager.DefaultConfig.UseDHCP = false; _camera.NetworkManager.DefaultConfig.IPAddress = textBox_IP.Text; _camera.NetworkManager.DefaultConfig.HostName = textBox_Host.Text; _camera.NetworkManager.DefaultConfig.Netmask = textBox_Netmask.Text; _camera.NetworkManager.DefaultConfig.DefaultGateway = textBox_Gateway.Text; _camera.NetworkManager.DefaultConfig.DNS = textBox_DNS.Text; if (_camera.NetworkManager.HttpPort != null) { _ports.Clear(); foreach (var item in comboBox_HTTP.Items) { var ports = Int32.Parse(item.ToString()); _ports.Add(ports); } _camera.NetworkManager.HttpPort = new CameraPort(CameraProtocolType.HTTP, true, _ports.ToArray()); } if (_camera.NetworkManager.HttpsPort != null) { _ports.Clear(); foreach (var item in comboBox_HTTPS.Items) { var ports = Int32.Parse(item.ToString()); _ports.Add(ports); } _camera.NetworkManager.HttpsPort = new CameraPort(CameraProtocolType.HTTPS, true, _ports.ToArray()); } if (_camera.NetworkManager.RtspPort != null) { _ports.Clear(); foreach (var item in comboBox_RTSP.Items) { var ports = Int32.Parse(item.ToString()); _ports.Add(ports); } _camera.NetworkManager.RtspPort = new CameraPort(CameraProtocolType.RTSP, true, _ports.ToArray()); } } _camera.NetworkManager.ApplyConfig(); } private void button_HTTP_Add_Click(object sender, EventArgs e) { if (!comboBox_HTTP.Items.Contains(textBox_HTTP.Text)) comboBox_HTTP.Items.Add(textBox_HTTP.Text); } private void button_HTTPS_Add_Click(object sender, EventArgs e) { if (!comboBox_HTTPS.Items.Contains(textBox_HTTPS.Text)) comboBox_HTTPS.Items.Add(textBox_HTTPS.Text); } private void button_RTSP_Add_Click(object sender, EventArgs e) { if (!comboBox_RTSP.Items.Contains(textBox_RTSP.Text)) comboBox_RTSP.Items.Add(textBox_RTSP.Text); } private void button_HTTP_Delete_Click(object sender, EventArgs e) { for (int i = 0; i < comboBox_HTTP.Items.Count; i++) { if (comboBox_HTTP.Items[i].ToString() == textBox_HTTP.Text) comboBox_HTTP.Items.Remove(comboBox_HTTP.Items[i]); } } private void button_HTTPS_Delete_Click(object sender, EventArgs e) { for (int i = 0; i < comboBox_HTTPS.Items.Count; i++) { if (comboBox_HTTPS.Items[i].ToString() == textBox_HTTPS.Text) comboBox_HTTPS.Items.Remove(comboBox_HTTPS.Items[i]); } } private void button_RTSP_Delete_Click(object sender, EventArgs e) { for (int i = 0; i < comboBox_RTSP.Items.Count; i++) { if (comboBox_RTSP.Items[i].ToString() == textBox_RTSP.Text) comboBox_RTSP.Items.Remove(comboBox_RTSP.Items[i]); } } private void radioButton_Manual_CheckedChanged(object sender, EventArgs e) { groupBox_Basic.Enabled = true; groupBox_Ports.Enabled = true; } private void radioButton_DHCP_CheckedChanged(object sender, EventArgs e) { groupBox_Basic.Enabled = false; groupBox_Ports.Enabled = false; } private void InvokeGuiThread(Action action) { BeginInvoke(action); } }}(Source: http://www.camera-sdk.com/p_22-how-to-configure-your-onvif-camera-remotely-onvif.html) It works well, but unfortunately this SDK is not free. Now I use its free trial version, but it will expire soon. Can anybody recommend me an alternative SDK to this one? Or any other C#-based suggestion would be appreciated related to remote IP camera configuration. I’m looking forward to your answers here or please send me an e-mail to [email protected]! Thank you so much in advance! All the best,Curt
-
Hey Everyone, We’re a stationery wholesaler. In addition to the stationery we’re a supplier of printed matters as well and we’re going to add a packaging materials division this year. We currently have a two phone lines installed in my Asterisk phone system. Due to the business improvement, we will need three phone lines. What we’re thinking is a VoIP system with three phone numbers (one for the stationery, printed matters and packaging materials). We have broadband Internet connection. We have a variety of calls (ordering, inquiry, quotation, delivery information) related to more different product groups. Our company has a workforce of 2 sales representatives. They have to accept about 50 incoming calls and the number of outgoing calls equal per day. My boss is afraid that our sales staff won’t be able to accept each call after opening the third division – and installing the third phone line. He don’t want to replace our Asterisk but he needs some new features like call queuing and voicemail, but we’d benefit greatly from an IVR menu system, too. He asked me, as an ignorant of VoIP programming, to develop some new funtionalities like these. The IVR seems the most difficult one. I found a C# solution for this (a short snippet can be seen below): void call_DtmfReceived(object sender, VoIPEventArgs<DtmfInfo> e) { DisposeCurrentHandler(); switch (e.Item.Signal.Signal) { case 0: break; case 1: TextToSpeech("Product XY has been designed for those software developers who especially interested in VoIP developments. If you prefer .NET programming languages, you might be interested in Product XY."); break; case 2: MP3ToSpeaker(); break; } } (Source: Codeproject) But I’m looking for another solution that makes it possible to add some new menu items without modifying the source code. Does anyone have any useful ideas? But first there’s a need for a VoIP SDK. I’ve been looking at ’Ozeki VoIP SIP SDK for .NET - 2 simultaneous calls’. According to this page it is compatible with Asterisk. Can anyone tell me if this is a good option for a business such as mine? Is there any other option I should look at? Any help would be appreciated! Regards,Gerard
-
Hey Everyone, We’re a stationery wholesaler. In addition to the stationery we’re a supplier of printed matters as well and we’re going to add a packaging materials division this year. We currently have a two phone lines installed in my Asterisk phone system. Due to the business improvement, we will need three phone lines. What we’re thinking is a VoIP system with three phone numbers (one for the stationery, printed matters and packaging materials). We have broadband Internet connection. We have a variety of calls (ordering, inquiry, quotation, delivery information) related to more different product groups. Our company has a workforce of 2 sales representatives. They have to accept about 50 incoming calls and the number of outgoing calls equal per day. My boss is afraid that our sales staff won’t be able to accept each call after opening the third division – and installing the third phone line. He don’t want to replace our Asterisk but he needs some new features like call queuing and voicemail, but we’d benefit greatly from an IVR menu system, too. He asked me, as an ignorant of VoIP programming, to develop some new funtionalities like these. The IVR seems the most difficult one. I found a C# solution for this (a short snippet can be seen below): void call_DtmfReceived(object sender, VoIPEventArgs<DtmfInfo> e) { DisposeCurrentHandler(); switch (e.Item.Signal.Signal) { case 0: break; case 1: TextToSpeech("Product XY has been designed for those software developers who especially interested in VoIP developments. If you prefer .NET programming languages, you might be interested in Product XY."); break; case 2: MP3ToSpeaker(); break; } } (Source: Codeproject) But I’m looking for another solution that makes it possible to add some new menu items without modifying the source code. Does anyone have any useful ideas? But first there’s a need for a VoIP SDK. I’ve been looking at ’Ozeki VoIP SIP SDK for .NET - 2 simultaneous calls’. According to this page it is compatible with Asterisk. Can anyone tell me if this is a good option for a business such as mine? Is there any other option I should look at? Any help would be appreciated! Regards,Gerard