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

How Can I check Outbouns in CDF

Status
Not open for further replies.

AlirezaKeshmiri

Customer
Joined
Mar 16, 2018
Messages
12
Reaction score
0
Dear @edossantos ,

I have a problem in my auto dialer ,
I have 100 phone number and my dialer miss some of them...

i think the problem is that , my out bounds will busy and the dialer execute the dialer flow spontaneously .
so the dialer not able to make success call to all of my phone numbers .

how can i check my out bounds status ? like checking the free extensions ?

i want to check my outbound and when there are free i make next call .
 
Hello @AlirezaKeshmiri,

You need to use a script to check that, using the 3CX Call Control API. First, you need to get your Gateway. You can use:
PhoneSystem.Root.GetGateways()

to get a Gateway[]. Then you need to iterate the results to get the gateway you need. If you have a single Gateway, then just get the first item from the array.

Once you have your Gateway object, you can call:
Gateway.GetExternalLines()

to get an array of ExternalLine objects.

For each external line, you can invoke:
ExternalLine.GetActiveConnections()

That will return an array of active connections on that line.

Using this approach you can see if you have free channels or not, and then make the call or wait for the next dialer cycle.

Kind regards.
 
Dear @edossantos ,
Thanks
here is my code , it can be useful for someone .


i use it in my flow designer to check my free line in gateways in order to make a successful call.


using System;
using TCX.Configuration;

namespace OutboundDialer
{
public class GetwaysState
{
public bool IsThereAnyFreeLine()
{
TCX.Configuration.Gateway[] gt_i = PhoneSystem.Root.GetGateways();
TCX.Configuration.ExternalLine gt_ex = gt_i[0].GetExternalLines()[0];
if (gt_ex.GetActiveConnections().Length < 4)
{
return true ;
}
gt_ex = gt_i[1].GetExternalLines()[0];
if (gt_ex.GetActiveConnections().Length < 4)
{
return true ;
}
return false ;
}
}
}

-----------------

NOTE : i have 2 gateways , so my gt_i have 2 item
 
Thanks for sharing! That will be very useful for other users!
 
  • Like
Reactions: AlirezaKeshmiri
Status
Not open for further replies.
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.