Separate names with a comma.
Discussion in 'CRM / Helpdesk / App Integration' started by Michael Groom, Mar 2, 2018.
Not sure if this can be done, but can i change the destination of a DID via a script in the API?
Hello @Michael Groom,
Using the 3CX Call Control API you can change the 3CX configuration, including the DID destination. You can do it in the same way the 3CX console does.
OK ty. is there a sample in the sample folder?
I'm not sure if there is a sample specific for changing a DID, but take a look at the CHM help file included, which has all the information you need. Look for the PhoneSystem class, which is the root entry point, and from there you can access all the information you need.
For example, invoking "PhoneSystem.Root.GetVoipProviders()" you will get an array of all the SIP trunks in your 3CX server. Then you can get the ExternalLine objects associated to that SIP trunk, and finally the DIDNumbers property will give you the DIDs for the lines. You can also get the inbound rules using the API. Please take a look at the docs for more details.
Still working on a solution for this. Its hard to find exact stuff i need as api has poor documentation
Does anyone here know how to find the inbound rules for a did i have been through all of the documentation but there is no inbound rule like there is outbound.
PhoneSystem.Root.GetExternalLines() will give you the array of ExternalLines available.
Then, once you select your external line, you can check the ExternalLine.RoutingRules property.