How to add Voip features (ring group, virtual receptionist) into Cisco SIP PBX in C#?

P

PatientCarePro

#1
Hi there,

We run a standard medical center and I we're planning to improve our VoIP based telephone system in order to build a more effective way of communication between nurses and patients.

We have an Cisco Unified CM PBX and we would like to add some new features into that.

The most important one is the 'virtual receptionist'. Its main objective would be the automated receiving of incoming calls. So it would play in different greetings for different time of the day allowing that calls get routed appropriately during the lunch hour, and it would manage call groups to route calls to the correct department properly.

To tell the truth I am not too experienced in VoIP development... I presume we will need a Voip toolset.

Now I'm there that I have found a Voip toolset (Ozeki Voip SDK - voip-sip-sdk.com) that is compatible with our Cisco Unified CM. By using the code example below I'm working on the implementation of an auto answer system. But I have no idea how to implement the ring group feature. I'm sure I was inattentive, but I kindly ask you please send me a short code snippet that helps me to get started with this ring group project!


Code:
namespace Auto_Answer
{
    class Program
    {
        static ISoftPhone mySoftphone;
        static IPhoneLine phoneLine;
        static IPhoneCall call;
 
        private static void Main(string[] args)
        {
            mySoftphone = SoftPhoneFactory.CreateSoftPhone(5000, 10000, 5060);
 
            // SIP account registration data, (supplied by your VoIP service provider)    
            var registrationRequired = true;  
            var userName = "sipusername";
            var displayName = "sipdisplayname";
            var authenticationId = "authenticationid";
            var registerPassword = "password";
            var domainHost = "pbxip.voipprovider.com";
            var domainPort = 5060; 
 
            mySoftphone_Register(mySoftphone, registrationRequired, displayName, userName, authenticationId, registerPassword,
                             domainHost, domainPort);
            // prevents the termination of the application    
            while (true) Thread.Sleep(10);
        }
 
 
        static void mySoftphone_Register(ISoftPhone softphone, bool registrationRequired, string displayName, string userName,
        string authenticationId, string registerPassword, string domainHost, int domainPort)
        {
            try
            {
                var account = new SIPAccount(registrationRequired, displayName, userName, authenticationId, registerPassword, domainHost, domainPort);
                var natConfiguration = new NatConfiguration(NatTraversalMethod.None);
                phoneLine = softphone.CreatePhoneLine(account, natConfiguration);
                softphone.IncomingCall += softphone_IncomingCall;   // subscribing to the event to get notified about incoming calls  
                phoneLine.PhoneLineStateChanged += mySoftphone_PhoneLineStateChanged;
                softphone.RegisterPhoneLine(phoneLine);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error during SIP registration: " + ex.ToString());
            }
        }
 
        // this method is being called, when an incoming call is being noticed  
        static void softphone_IncomingCall(object sender, VoIPEventArgs<IPhoneCall> e)
        {
            call = e.Item;  // initializes the call  
            call.CallStateChanged += call_CallStateChanged; // subscribes to the event to get notified about the call's states  
            call.CallErrorOccured += call_CallErrorOccured; // subscribes to the event to get notified about the errors during the call  
            call.Accept();  // accepts the call (sends back the 200 OK SIP message)  
        }
 
        private static void Auto_Answer_Method()    // implementation of the Auto Answerer's job goes here
        {
            Console.WriteLine("Auto Answer does its job."); // implement your task here
        }
 
        static void mySoftphone_PhoneLineStateChanged(object sender, VoIPEventArgs<PhoneLineState> e)
        {
            if (e.Item == PhoneLineState.RegistrationTimedOut || e.Item == PhoneLineState.RegistrationFailed)
                Console.WriteLine("Registration failed!");
 
            if (e.Item == PhoneLineState.RegistrationSucceeded || e.Item == PhoneLineState.NoRegNeeded)
                Console.WriteLine("Registration succeeded - Online!");
        }
 
 
        static void call_CallStateChanged(object sender, VoIPEventArgs<CallState> e)
        {
            Console.WriteLine("Call state: {0}.", e.Item);
            if (e.Item == CallState.Answered)
                Auto_Answer_Method();   // the call is being answered, the Auto Answerer can begin it's function
        }
 
 
        static void call_CallErrorOccured(object sender, VoIPEventArgs<CallError> e)
        {
            Console.WriteLine("Error occured during the call: {0}.", e.Item);
        }
    }  
}
(Soruce: voip-sip-sdk.com/p_354-how-to-implement-auto-answer-using-csharp-voip.html)

I?m looking forward to your solutions here or even in e-mail ([email protected])! Many thanks in advance!

Regards,
Cliff
 
Elsmar Forum Sponsor

Stijloor

Staff member
Super Moderator
#2
Re: How to add Voip features (ring group, virtual receptionist) into Cisco SIP PBX in

A Quick Bump!

Can someone help?

Thank you very much!!
 
Thread starter Similar threads Forum Replies Date
T Do I need to add non-product related service providers to my ASL? AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 12
T Add checking aid to quality systems Manufacturing and Related Processes 2
D Add new device to current license Canada Medical Device Regulations 3
A Add MDSAP to Internal Audit Schedule Medical Device Related Regulations 0
G We want to add Covid-2 /19 to our air filter 510 K Medical Device and FDA Regulations and Standards News 0
L How to add exemption or statement to control of document procedure? ISO 13485:2016 - Medical Device Quality Management Systems 5
S Anyone Familiar with "SPC for Excel" add-in? Lean in Manufacturing and Service Industries 4
F How do you add accuracies for tools with different measurement devices? General Measurement Device and Calibration Topics 1
qualprod Add new action plans in CA, while waiting effectiveness - Same problem reappears ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 13
M IATF 16949 - 8.5.6.1.1 Providing a list of process controls: Does this requirement add value to QMS? IATF 16949 - Automotive Quality Systems Standard 4
D FDA filing guidance to add sterilization step for approved drug Pharmaceuticals (21 CFR Part 210, 21 CFR Part 211 and related Regulations) 8
V How to Add Annual Revalidation requirements to Control Plan? FMEA and Control Plans 5
A Add-On software for VMC to calculate setting time, Idle Time, OEE etc.. Manufacturing and Related Processes 2
J What to add to our QMS for Clause 4 Context of the Organization AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 1
Q Really do they add value (Vision, Mission, Values)? ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 1
D How to add AS9145 requirements to my existing AS9100 QMS? AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 10
P Recommendations on SPC Software or Excel SPC add-in(s) Quality Assurance and Compliance Software Tools and Solutions 6
J Add API Q1 & Q2 to Quality Management System Standards Oil and Gas Industry Standards and Regulations 1
V Do I need to add everything on print to control plan? FMEA and Control Plans 1
T Holocene Epoch or add a new Anthropocene Epoch? Coffee Break and Water Cooler Discussions 7
smryan Seeking good 2D barcode add-in for Excel Excel .xls Spreadsheet Templates and Tools 6
S How to Add Water to a MDS Tree Structure RoHS, REACH, ELV, IMDS and Restricted Substances 4
J Exporting Add-On for Medical Devices to the US - FDA Requirements Other Medical Device Related Standards 3
R Regulation Process for Add on Accessory to an Existing Medical Device Other US Medical Device Regulations 1
L How to add a New Factory under a Prior 510K Establishment US Food and Drug Administration (FDA) 2
P Is a new 510k needed if modifying to add bluetooth for data transmission? Other US Medical Device Regulations 13
M Minitab macro to add reference line to graph Using Minitab Software 1
R How to calculate the value add time? Lean in Manufacturing and Service Industries 2
V Where to add SOP of writing a Technical File in ISO 13485? ISO 13485:2016 - Medical Device Quality Management Systems 1
W Is a new 510(k) needed? Add Non Medical Device into a Medical Device App Other US Medical Device Regulations 13
M Why do I have to rev change my ASL everytime I add or remove a supplier? Quality Manager and Management Related Issues 6
T Distributor Value Add work to an AS9102 FAI part - Lubrication AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 1
D If a control operator add a photo as a visual aid, can you improve Occurrence? FMEA and Control Plans 12
J Add Safety Policies/LOTO/etc. to Controlled Documents? ISO 13485:2016 - Medical Device Quality Management Systems 9
S Annual Stock Check - Where to add it into our Quality Manual? ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 4
L 21 CFR Part 11 Requirements - Microsoft Excel Add-on Functions 21 CFR Part 820 - US FDA Quality System Regulations (QSR) 6
H Need to add a concentrate (only) to an already approved IMDS Submission RoHS, REACH, ELV, IMDS and Restricted Substances 5
Z How to make documents have value or add value? ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 2
Chennaiite Value Engineering - Does Value Engineering really add value? Preventive Action and Continuous Improvement 3
CalRich Requirement from the PPAP Manual or from GM to add a PPAP Report with Shipment? Customer and Company Specific Requirements 1
somashekar Inspection vs. Inspectors - Inspection is essential but Inspectors do not add Value Manufacturing and Related Processes 14
S Value Add Time Calculation in Value Stream Mapping (VSM) Lean in Manufacturing and Service Industries 8
M Two situations where it is appropriate to add further Hazard Audits to Internal Audit Occupational Health & Safety Management Standards 8
T Updating to ISO 9001:2008 - I need to add section 7.3 Design and Development ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 28
A Learning Excel - Web Site, Book, and Add-in Recommendations Excel .xls Spreadsheet Templates and Tools 6
Stijloor Airlines add fees on top of fees!!! Travel - Hotels, Motels, Planes and Trains 0
Claes Gefvenberg Firefox Add-ons After Work and Weekend Discussion Topics 8
S COPQ (Cost of Poor Quality) - Can we add Premium Freight? Misc. Quality Assurance and Business Systems Related Topics 6
kedarg6500 Unit Conversion Add-in for Excel Excel .xls Spreadsheet Templates and Tools 7
G How do I add in the company we purchased and their products? ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 6

Similar threads

Top Bottom