Extension.ForwardingRules always returns an empty list (Solved)

Status
Not open for further replies.

R. Henriksen

Forum User
Joined
Dec 19, 2016
Messages
3
Reaction score
1
Hi

The property Extension.ForwardingRules always returns an empty list.

I have upgraded to v15 and when using the 3CX Configuration and Call Control API v2.0.0.0 (v15) the ForwardingRules property always returns an empty list.

If I use the v1.6.0.0 (v14) API against the same installation the method returns a list of ForwardingRules as expected.

I have also tried the DisplayAll OMSample with the same result.

Any suggestions?
Best regards
 
  • Like
Reactions: apldoor
Hi R. Henriksen,
Indeed I replicated this issue with the Call Control API sample and reported this to R&D.
Thanks for the report, will get back to you when something new on this matter.
 
@R. Henriksen
The correct way to list forwarding rules is the following:

Current code:
foreach (ExtensionRule er in e.ForwardingRules)
{
System.Console.WriteLine("\t\t\t\t" + er);
}

Replace with:
extProfiles = e.FwdProfiles;
foreach (FwdProfile extProfile in extProfiles)
{
extRuleList = extProfile.ForwardingRules;

foreach (ExtensionRule er in extRuleList)
{
System.Console.WriteLine("\t\t\t\t" + er);
}
}

And on top of sample, below
PhoneSystem ps = PhoneSystem.Root;
add
FwdProfile[] extProfiles;
ExtensionRule[] extRuleList;
 
Status
Not open for further replies.

Forum statistics

Threads
112,322
Messages
591,889
Members
165,470
Latest member
Robert Lee