Click here to Skip to main content
12,831,391 members (49,510 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# IO
Hi everyone :)
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: :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#. :D
Posted 13-Nov-12 18:15pm
Rate this: bad
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)
            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);
            //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
        }catch(Exception ex)


    static void client_SessionCompleted(object sender, Ozeki.VoIP.VoIPEventArgs e)
        MP3StreamRecorder recorder;
        if(currentCalls.TryGetValue(session, out recorder))
            session.DisconnectAudioReceiver(CallParty.All, recorder);

VICK 14-Mar-14 3:05am
Great to see an answer posted and accepted for an old question.

MY 5+ for your effort.
Member 10667561 18-Mar-14 9:58am
Thanks a lot. Happy to help :)
Rate this: bad
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.
Rate this: bad
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

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 13 Mar 2014
Copyright © CodeProject, 1999-2017
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