freeswitchforum.com
https://freeswitchforum.com/

Help Needed.
https://freeswitchforum.com/viewtopic.php?f=5&t=891
Страница 1 из 1

Автор:  amitiyer [ 19 янв 2018 11:31 ]
Заголовок сообщения:  Help Needed.

Hello,

I am new here, I am trying to develop a Call Blasting system based on Freeswitch.
What i am trying to achieve here is, There would be a Database table with Caller ID Number and other table with Destination number and when i initiate the call blast, Freeswitch should get the data from both the tables and then send the call. Can anyone please help me on this.

Автор:  sanjay [ 01 сен 2018 12:47 ]
Заголовок сообщения:  Re: Help Needed.

const string ipAddressString = "192.168.1.217";// replace with correct IP address
IPAddress ipAddress = IPAddress.Parse(ipAddressString);
const int portNum = 8021;// replace with correct port
IPEndPoint remoteEndPoint = new IPEndPoint(ipAddress, portNum);

Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

client.SendTimeout =Convert.ToInt16( txtTimeOut.Value);
client.Connect(remoteEndPoint);

string sendString = "auth ClueCon\n\n";
byte[] sendBuffer = Encoding.UTF8.GetBytes(sendString.ToString());
client.Send(sendBuffer);
byte[] receiveBuffer = new byte[10000];
sendString = "api commands to make call " + "\n\n";
Page.Title = Select1.Items[Select1.SelectedIndex].Text;
sendBuffer = Encoding.UTF8.GetBytes(sendString.ToString());
client.Send(sendBuffer);

bufferString = "";
int i =0;
client.ReceiveTimeout =Convert.ToInt16( txtTimeOut.Value );
Label1.Text = "";
try
{
while (bufferString.Length < 1000)
{
client.Receive(receiveBuffer, 0, receiveBuffer.Length, SocketFlags.None);
bufferString = System.Text.Encoding.GetEncoding(949).GetString(receiveBuffer);
bufferString = bufferString.Replace("\0", "");
}

}
catch (Exception ex) {
Label1.Text = ex.Message;

}


client.Shutdown(SocketShutdown.Both);
client.Close();

Страница 1 из 1 Часовой пояс: UTC + 4 часа
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/