Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# IO
Hi everyone Smile | :)
I would like to explain that: in a company there are telephones connected to a standard telephone to make calls I want to connect this PABX to a computer for processing transactions using a application c #:
 
For telephone calls: This application saves the caller's number i (which belongs to the company and asked to make a call) and the called numbers (requested by the caller i) and duration dt
 
The problem is: Blush | :O
* how to connect the PBX to the computer via a port!
* When connecting, how to read the information of transactions and information explained above numbers (caller i, numbers called and the duration dt) to record in a database via this port in c#. Big Grin | :-D
thnx
Posted 13-Nov-12 18:15pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

You'd better switch to a software-based system, like Ozeki's PBX. With its SDK you can develop call recorder in C#:
 
public class Program
{
    public void static void Main(string[] args)
    {
        OpsClient opsClient = new OpsClient();
        var result = opsClient.Login("ozekixepbx.ip", "admin", "abc12345");
 
        opsClient.SessionCreated += new EventHandler>(opsClient_SessionCreated);
        opsClient.SessionCompleted += new EventHandler>(opsClient_SessionCompleted);
    }
 
    static void client_SessionCreated(object sender, Ozeki.VoIP.VoIPEventArgs e)
    {
        try{
            var mp3Recorder = currentCalls.GetOrAdd(session, (s) => new MP3StreamRecorder(string.Format("{0}_{1}_{2}.mp3", session.CallerId, session.Destination, session.SessionID)));
            session.ConnectAudioReceiver(CallParty.All, mp3Recorder);
            
            //attach speaker to call
            //var speaker = Speaker.GetDefaultDevice();
            //session.ConnectAudioReceiver(CallParty.All, speaker);
            //speaker.Start();
            
            //attach microphone to call
            //var microphone = Microphone.GetDefaultDevice();
            //session.ConnectAudioSender(CallParty.All, microphone); // you can select which call party can hear your voice with the CallParty parameter
            //microphone.Start();
            
            mp3Recorder.StartStreaming();
        }catch(Exception ex)
        {
            Console.WrinteLine(ex.Message);
        }
 
    }
 
    static void client_SessionCompleted(object sender, Ozeki.VoIP.VoIPEventArgs e)
    {
        MP3StreamRecorder recorder;
        if(currentCalls.TryGetValue(session, out recorder))
        {
            recorder.Dispose();
            session.DisconnectAudioReceiver(CallParty.All, recorder);
        }
    }
}
 
Source: http://www.ozekiphone.com/voip-part2-c-example-on-recording-voip-calls-call-routing-754.html[^]
  Permalink  
Comments
VICK at 14-Mar-14 3:05am
   
Great to see an answer posted and accepted for an old question.
 
MY 5+ for your effort.
Member 10667561 at 18-Mar-14 9:58am
   
Thanks a lot. Happy to help :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

All of this depends on your PBX and the interfaces it exposes. Consult the documentation on your system.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

ok thnx
if my PBX is connected to the COM port of the computer via
RS232 cable.. i found that i can read the informations of the port , but how can i know the phone numbers (using System.IO.Ports) !! any idea
Smile | :)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 375
1 Sergey Alexandrovich Kryukov 329
2 CPallini 260
3 DamithSL 214
4 Maciej Los 197
0 OriginalGriff 5,455
1 DamithSL 4,457
2 Maciej Los 3,885
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,115


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 13 Mar 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100