• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Getting Connection Status

Status
Not open for further replies.

ibrahim akgün

Forum User
Basic Certified
Joined
Feb 26, 2018
Messages
99
Reaction score
10
Hi,

I have got a outbound dialer project when my dialer call someone i want to check if its succesful or not. I have got external script component at my project that running getCallState() method for getting connection state and return it. Its working good when i run this method at Visual Studio environment returning me ConnectionStatus but when i run this method at CFD side its returning empty string that initial value of my state property.

Could someone tell me whats the problem?


Code:
  public string getCallState(string number)
        {
            string state = "";
            if (PhoneSystem.Root.GetActiveConnectionsByCallID().Count > 0)
            {

            foreach (var item in PhoneSystem.Root.GetActiveConnectionsByCallID())

            {

                for (int i = 0; i < item.Value.Count; i++)
                {

                    if (item.Value[i].DialedNumber == number)
                    {
                       
                       if (item.Value[i].Status == ConnectionStatus.Ringing)
                       {
                            state= "ringing";
                       }
                        else if (item.Value[i].Status == ConnectionStatus.Connected)
                       {
                            state= "connected";
                        }
                        else if (item.Value[i].Status == ConnectionStatus.Dialing)
                        {
                           state= "dialing";
                        }

                        else
                      {
                            state= "";

                       }
                    }

                }
            }




            }

            return state;

        }
 
When are you running this code in the CFD app? That code will check the state exactly at the moment you execute it, but if the call has not been established yet, you will not see anything...
 
Im running this script after MakeCall Component. Maybe you are right... So is there any timer thing that can i Pause app for waiting MakeCall component do its work (call establishing) than i can check..
 
The MakeCall component just requests the call to 3CX, but you don't know when exactly it will be made. You might need to wait a few seconds, or loop in your code until you see the call...
 
Thank you i have added a loop comp then check my script returnvalue if conn is established or not. Problem is solved.
 
Hi again @edossantos ,

I have got a problem with The MakeCall component. In my project im getting calle numbers from database and give this number to MakeCall component for call. I have got condition for checking if number called or not before.
My problem is ;
Auto Dialer is checking conditons and if everything good call is starting if Callee OPEN or MAKE BUSY his phone MAKE CALL dont call again but if Callee do not open or make busy his phone MakeCall looping infinite times to call last callee.

I have checked my project and i see that after MakeCall component start the call its not going into my loop that i make calls. So i cant stop it after one missed call.
 
This seems to be a problem with your logic. Your database should also have some state for each line. So once the database returns a number to call, it should be marked as "calling", and not return it again. When you determine with your script that the call has been established, then you should mark it as "complete" in your database. And if the call fails by any reason, you should set another mark to "retry" it later.
 
@edossantos i have checked my logic and log every detail and see that MakeCall only works one time because it not going into my loop again but its calling me 4 time (i dont know why 4 time) if callee do not open or busy it. Where can i check and stop make call after 1 missed call if callee not open or busy it.
 
Last edited:
Please take a look at the 3CXQueueManager.log file to understand in detail what's going on with your dialer.

The dialer flow is executed in loop as long as the Queue Manager service is running. That means that it will be executed when the service starts, and when the dialer flow ends it will wait a few seconds and execute it again. The time between dialer flows execution depends on your configuration and the dialer type. For example, if it's a predictive dialer, it will depend on the agent availability. If it's a power dialer it will execute again after the seconds specified in the Pause Between Execution setting of your dialer.
 
Hi, @edossantos
I know how dialer working and i have checked my logic again there is no problem with it. I have checked logs its below here. And as you see there is only one time Making Call working but there 4-5 times CallUpdate line. When dialer check db and make call the number its ringing it 5 times if Callee not open or busy it. If Callee Open or Busy it there is no problem. This is the my problem

Could you check logs and tell me what happening please?
 

Attachments

  • 3CXQueueManager.log
    93.1 KB · Views: 9
The dailer is not making calls because your database is not returning any number to call. The logs show this:
18.06.11 10:13:55.423|100049| Trc|75|0018|: PlugIn[karsilama - DatabaseAccessComponent - DialerID 0] Trace: Command to execute: select Numara from AranacakKisiler where DurumID=1
18.06.11 10:13:55.424|100049| Trc|75|0018|: PlugIn[karsilama - DatabaseAccessComponent - DialerID 0] Trace: End executing component with queryResult:

You need to update your logic, so the database returns another number and the dialer continues making calls...
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,632
Messages
748,964
Members
144,751
Latest member
TECHXNEPAL
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.