Modifying 3CXphonesystem.ini file for Call Control API

Discussion in '3CX Phone System - General' started by pinney, Sep 4, 2014.

Thread Status:
Not open for further replies.
  1. pinney

    Joined:
    Aug 26, 2014
    Messages:
    6
    Likes Received:
    0
    I have two questions regarding the instructions for the Call Control API which prescribe:

    1. What should the addition to the 3CXphonesystem.ini file look like? This probably seems a stupid question since an example is given in the excerpt above, but that example looks nothing like other lines in the .ini file (having a period in the key and white space around the equals sign), and it coincides exactly with the code one must write in his .NET application code. (Moreover, whoever wrote it used "smart" quotes.)

    2. Must I restart my 3CX Phone System after changing the .ini file? And what kind of down time will that cause? Will it disconnect all existing phone calls? Will it preclude new inbound or outbound phone calls during the restart process?
     
  2. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    646
    Likes Received:
    1
    See in test project :
    PhoneSystem.ApplicationName = PhoneSystem.ApplicationName + a.Next().ToString();

    So, what you'll need is rename the existing AppName section of ini file to something else, and your program will be adding a random string after it so that each new instance of your app has a new ID with the defined prefix.

    If you edit the ini you need to first stop the 3CX PhoneSystem service, save, then restart all. System will be down for few minutes until everything is restarted and all entities re-registered. If any calls at the time they will be dropped so it should be done when no one working preferably...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. pinney

    Joined:
    Aug 26, 2014
    Messages:
    6
    Likes Received:
    0
    Thank you.

    Please allow me to confirm: the AppName in my ini file does not need to match 100 percent of the PhoneSystem.ApplicationName which I define in my application code; rather, the AppName must appear as the beginning (prefix) of my ApplicationName. Is this correct?

    I find that my application, although not following this prescription, has been successfully pulling data from the PhoneSystem all along. (I.e. my AppName was in no way a match for my ApplicationName, and I never restarted the PhoneSystem service.) Can you tell me specifically what the purpose of setting the AppName in the ini file is?
     
  4. pinney

    Joined:
    Aug 26, 2014
    Messages:
    6
    Likes Received:
    0
    Another question I have is the format of the line that needs to be added to the .ini file: Should it in fact be as follows (drawn from the website)?

    Code:
    [ConfService]
    PhoneSystem.ApplicationName="<prefix of my application name>"
    I must ask because this format seems out of character with the other lines in the .ini file, none of which has a period on the left of the equals sign. Neither does any have quotation marks except when the value on the right of the equals sign is blank.

    (And if you have an answer to the question in my previous post, I am still in search of that.)
     
  5. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    646
    Likes Received:
    1
    > correct

    > the appname will be an instance name for the api connection, it's better to have it with a fixed prefix followed by random string to avoid any issues of connection (you might get an error preventing connection after multiple run with same instance name).

    >no, just keep the ini file structure as is, and edit field AppName :
    [ConfService]
    AppName=YOURCUSTOMPREFIX
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.