Why does 3cx c# api makecall method makes more than one call per method use?

1.3k views Asked by At

When I use

pbx.MakeCall(prefix + abone.telefon, ivr);

method of 3cx api, it makes three calls per method use. Why this happens? How can I fix it?

There are two makecall methods:

// TCX.PBXAPI.PBXConnection
public unsafe void MakeCall(string dnNumber, Dictionary<string, string> parameters)

// TCX.PBXAPI.PBXConnection
public unsafe void MakeCall(string dn_from, string number_to)

Does anyone know how to use the first method?

1

There are 1 answers

0
Olorunfemi Davis On

You must be running on an old version of 3cX to have this experience. Do upgrade to version 16.x and you'll find out that this method fires just once. You can find the 3cX Call Control APIs on GitHub.

For the first method,

                     Dictionary<String, String> dict = new Dictionary<String, String>
                                    {
                                        { "destnum", customer }
                                    };
                      PhoneSystem.Root.MakeCall(Ext.DN.Number, dict);

The issue many people have with this method is knowing the right keys to place in the dictionary. I have a library of them and you can actually use this method more efficient than others.

Lastly, MakeCall has 3 methods in version 16.x.

        public void MakeCall(string dnNumber, Dictionary<string, string> parameters);
        public void MakeCall(string from_number, string number_to);
        public void MakeCall(RegistrarRecord from_device, string destination);

The third one works quite well with the Windows Client but doesn't work with Web Client.