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

Flow to set outbound number?

Status
Not open for further replies.

millsey

Premier Customer
Joined
Dec 21, 2011
Messages
208
Reaction score
0
In v14.5 I wrote a asp.net web service which called the 3CX call control API to set the outbound DID number so that we can sent different caller ID for different brands - so when the caller phones backl on the number they see, we know which brand to answer teh call as.

I can see that now the phone system, uses nginx doign this will be much harder. Instead is there a way to create a CFD which can set the outbound callerID?

For example if the user dials *88 for BRAND1, we want to collect the destination digits, set the outbound caller ID for that call to BRAND1DDI then make the call.

Is this possibel now that we have some access to the call parameters?

Thanks
Millsey
 
You can do this using a CFD app, and from there using the Call Control API in the same way you were doing it in v14. However, the user would have to dial a normal extension (not a dial code starting with the star), as CFD apps are deployed to queues. You can see the queue extension in the session.dnis variable.
 
Can I please have an example of how this could be built?

Assume user dials queue 811 and I want to set their outgoing DDI to 0123456789 then get their dialled digits then dial that number - how do I call the Call Control API from within a CFD flow?

Millsey
 
You need to use the Launch External Script component to invoke the 3CX Call Control API. I assume that you know how to update the SIP Trunk as you already did it in your ASP .NET page. So you just need to put that code into a C# file, copy the file to the Libraries folder of your CFD project, and use it from a Launch External Script component.

Here you can see how to use the Launch External Script component from a CFD app:
https://www.3cx.com/docs/cfd-creating-phone-support-portal-3/
 
I can think of 3 ways to accomplish this:

1. You could create a CFD that when called prompts you for the desired caller ID (For Brand1 press 1, for Brand2 press 2"), then have the CFD call an external script that uses the Call Control API to update the extension that dialed the CFD with the desired outbound caller ID. Once your ID has been changed, you can place your call(s).

2. As discussed many times in the forums, you do this using outbound rules:

A. Register 3 SIP trunks (or however many you need). Many providers will allow you to make multiple connections at no additional charge.​

B. Set the caller ID for each trunk to the desired brand's DID.​

C. Create outbound rules that are expecting one extra leading digit. For example, 7 for brand1, 8 for brand2, and 9 for brand3.​

D. To place a call with the desired brand's caller ID, you add the appropriate digit to the phone number when dialing. The outbound rules should then check the first digit and send the call out the desired trunk while stripping the first digit from the number dialed.​

Obviously this approach doesn't scale at all if you have several different brands.

3. Alternatively, you to take a look at our 3CX Caller ID add-on. This tiny web application allows you to select from a list of predefined DIDs. For example, "Brand 1", "Brand 2", etc. and it will change the caller ID of your extension. Then place your call(s) and 3CX will use the new caller ID number. When you are done making calls with that Caller ID, you can easily change to another DID or revert back to your default caller ID by pressing the "default" button.
 
Wow, Thanks Matthew for such a detailed response. I will review this tomorrow. I also have some progress recreating a c# script to do this as hinted by Ernesto.

Millsey
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,632
Messages
748,963
Members
144,749
Latest member
leo13215464
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.