How to build your own C# Autodialer
Let me start with a short background story. One day, one of my oldest friends (who is a professional business man) came to me (the developer) for advice. He had a specific idea to boost his business: he wanted to install an Autodialer software. He asked for my expert opinion about how this could be done. That time I had a lot of work so I didn't have the time to come up with something brand new and write him a program. But I really wanted to help him, so in my freetime I was searching for a convenient solution. I've found it. We've done it. The business is on the wing ever since. My friend gave his approval to publish his story and the method he chose. I've thought this could be useful for many people and for many company.
The key to build an Autodialer, and also to the great success, was a software development kit. It has a sample program to have a look at its facilities. Here's how you configurate it, after downloading, extracting, and opening it:
Right click on MainForm.cs file and select View Code option (Figure 1).
Search for MainForm_Load method. You can find the configuration of the autodialer within this method.
1. ///
2. /// Occurs when the user loads the form.
3. ///
4. ///
5. ///
6. void MainForm_Load(object sender, EventArgs e)
7. {
8. #region DataBinding
9. // See later
10. #endregion
11.
12. #region Configuration
13.
14. autodialer = new Autodialer(GetLocalIP().ToString(), 5060, 5080, 5060, @"..\..\Resources\autodialer-example.wav");
15. autodialer.ProcessingCompleted += autodialer_ProcessingCompleted;
16. autodialer.PhoneLineStateChanged += autodialer_PhoneLineStateChanged;
17.
18. var sipAccount = new SIPAccount(true, "oz890", "oz890", "oz890", "oz890", "192.168.91.212", 5060);
19. autodialer.CreateAndRegisterPhoneLine(sipAccount);
20. #endregion
21.
22. #region Copyright
23. // Implementation.
24. #endregion
25.
26. }
Parameters for the autodialer:
1. public Autodialer(string localIPAddress,
2. int minPort,
3. int maxPort,
4. int localSIPPort,
5. string wavPath)
Parameters:
6. localIPAddress:
This is the local IP address of the computer. If there are more network cards, then you need to enter the IP address of that network card here, with which you connect to the PBX or to the VoIP service provider.
This is the local IP address of the computer. If there are more network cards, then you need to enter the IP address of that network card here, with which you connect to the PBX or to the VoIP service provider.
7. minPort:
This is the minimum port that can be used.
This is the minimum port that can be used.
8. maxPort:
This is the maximum port that can be used.
This is the maximum port that can be used.
9. localSIPPort:
This is the port reserved for SIP. SIP messages will be listened to via this port.
This is the port reserved for SIP. SIP messages will be listened to via this port.
10. wavPath: This is the path for the audio file that will be played during the calls.
The SIP account includes information with which you can register in the PBX or the VoIP service provider successfully.
Parameters for SIP account:
1. public SIPAccount(
2. bool registrationRequired,
3. string displayName,
4. string userName,
5. string registerName,
6. string registerPassword,
7. string domainServerHost,
8. int domainServerPort)
Parameters:
9. registrationRequired
The registration to the PBX is required. Please note that if you do not register in the PBX, you will only be able to make calls but you will not be able to receive calls.
The registration to the PBX is required. Please note that if you do not register in the PBX, you will only be able to make calls but you will not be able to receive calls.
10. displayName
This name will be displayed for the the called party during the calls.
This name will be displayed for the the called party during the calls.
11. userName
This is the username will be used during calls.
This is the username will be used during calls.
12. registerName
This is the name used for registration.
This is the name used for registration.
13. registerPassword
This password is needed for registration and for authentication during calls.
This password is needed for registration and for authentication during calls.
14. domainServerHost
This is the IP address or domain name of the PBX.
This is the IP address or domain name of the PBX.
15. domainServerPort
This is the port number of the PBX.
This is the port number of the PBX.
After configuration, click on Build button in Visual Studio or click F5 on your keypad.
Now you see, that building an Autodialer isn't necessarily a hard thing. You only have to find the appropriate help. Here you can find the sample program for this sdk:
http://www.voip-sip-sdk.com/p_130-how-to-build-an-autodialer-in-c-using-the-ozeki-voip-sip-softphone-source-code-voip.html
1 comment:
Hi, could you post any images on the blog just to have an idea of which are thje results.
Greetings.
Post a Comment