Documentation on automatic provisioning

Discussion in 'Windows' started by frinklabs, Feb 11, 2011.

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

    Joined:
    Feb 11, 2011
    Messages:
    13
    Likes Received:
    0
    The 3CXPhone looks great and the price is right.

    It is alleged on the main features page that this can be automatically provisioned.

    I cannot find any documentation on the format of what I am guessing is an xml file that you can feed it from a web server.

    Can this phone be auto-provisioned?
     
  2. davidbenwell

    davidbenwell Active Member

    Joined:
    Apr 27, 2010
    Messages:
    704
    Likes Received:
    0
    Hi

    Dependant upon which IP Phones you use, you certainly can get 3CX Phone System to automatically provision the phones.
    If you let me know what make and model of IP Phones that you intend to use, Ill provide you with some info on how to set this up.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. frinklabs

    Joined:
    Feb 11, 2011
    Messages:
    13
    Likes Received:
    0
    When I say "3CXPhone" I mean the software phone from 3CX - not the PBX

    I thought this was implicit by the fact that this was posted in the "3CX VoIP Phone" category but maybe not?

    It is this page which alleges the auto provisioning capability: http://www.3cx.com/VOIP/voip-phone.html

    Unfortunately all the documentation links from there are simplistic at best.

    Thanks!
     
  4. davidbenwell

    davidbenwell Active Member

    Joined:
    Apr 27, 2010
    Messages:
    704
    Likes Received:
    0
    Hi

    I will now produce a Video How-To Guide on how to setup the 3CX Soft Phone for automatic provisioning.

    WIll post the URL here for the video in about 15 minutes.

    this will cover the full details
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. frinklabs

    Joined:
    Feb 11, 2011
    Messages:
    13
    Likes Received:
    0
    That's overkill.

    Can't we just have the syntax of the XML file parameters?
     
  6. davidbenwell

    davidbenwell Active Member

    Joined:
    Apr 27, 2010
    Messages:
    704
    Likes Received:
    0
    The provisioning file is created by the 3CX Phone System for each extension and is created on the fly

    However for your info below is a copy of the configuration file as requested.

    {Public IP Address}
    {3CX Phone Server Internal "Local IP address"}
    {Public IP Address}
    {Extension Password}
    {Extension Pin Number "For Voice Mail"}

    the above i changed to remove the user details

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. frinklabs

    Joined:
    Feb 11, 2011
    Messages:
    13
    Likes Received:
    0
    Exactly what I was looking for - thanks!

    Meanwhile, this page: http://www.3cx.com/VOIP/sip-phone.html

    says: "Via a URL the phone can be told to read all the SIP configuration settings from 3CX Phone System or an HTTP server" (my emphasis)

    Those that don't have a 3CX Phone System will definitely need documentation to provision via just HTTP. I was kinda surprised that this information wasn't already available.

    Thanks for responding so quickly and I hope you have a great weekend!
     
  8. frinklabs

    Joined:
    Feb 11, 2011
    Messages:
    13
    Likes Received:
    0
    How that I have the format of the provisioning file, is there a way to load it into the 3CXPhone from the command line? Or specify a provisioning URL from the command line?

    I have searched around and found two command line options documented (dial and safemode) - are there more?

    I am attempting to automate the installation of this phone for my users to make it as seamless as possible If I can make it so they don't have to go into the phone and type in a provisioning URL and then save it, or enter any other stuff, I will be a hero.

    Make me look good - publish ALL the documentation (if there is any).

    Thanks!
     
  9. frinklabs

    Joined:
    Feb 11, 2011
    Messages:
    13
    Likes Received:
    0
    Given that there does not appear to be any (publicly-available) technical documentation, I have developed a different (and even more seamless) strategy for deploying this excellent piece of software without an HTTP server or use of the XML file.

    Long-story-short, I have a batch file that runs the MSI installer in quiet mode then forces a hand-crafted INI file into the application settings folder after extracting the user's extension and name (for the caller ID) from Active Directory.

    If anyone is interested, reply and I'll post the gory details.

    Meanwhile, someone more paranoid than me might suspect the documentation is being suppressed to force use of the 3CX PBX software. Good luck with that.
     
  10. Vali_3CX

    Vali_3CX Well-Known Member
    Staff Member 3CX Support

    Joined:
    Dec 12, 2008
    Messages:
    1,441
    Likes Received:
    61
    Hi
    3CXPhone is freeware and, as we stated since the beginning, it's purpose is to be, I repeat, "a standard SIP phone". And, as being one of its developers, I think it is. The only 3CX-specific feature is its embedded 3CX Tunnel client. If it would a matter of paranoia, me or other 3CX moderators here would delete David's post above containing the XML structure.

    No, it's not about paranoia or secrecy - the truth is, indeed, we will have to improve or update 3CXPhone's documentation, there are quite many "undocummented" features which we tried to explain them here, on the forum, or on the blog, everytime somebody has a problem which could be resolved using any of them.

    So, back to what David shown: yes, you may create such kind of XML and put it on any server you want - as our documentation already said. Only notice:
    - from STUNs, only StunServer+StunServerPort are used, 1 and 2 are ignored;
    - AssPhoneIntegration is ignored
    - ProvLink is optional, and if specified should point to a similar XML file.
    - Technically, all parameters are optional (being replaced by phone's default values) but, obviously, server and credentials are required.
    Also, the .xml extension is not important, only the XML format - depending on your needs, you may configure on your server some .php scripts to dynamically generate appropriate XML content.

    Regards
    vali
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. frinklabs

    Joined:
    Feb 11, 2011
    Messages:
    13
    Likes Received:
    0
    I don't think the problem is with the technical support - the community responds quickly and with the information needed.

    It ssems to be about managing expectations -- I'd guess that the marketing 'droids weren't properly programmed when they alleged on the features page that "Via a URL the phone can be told to read all the SIP configuration settings from 3CX Phone System or an HTTP server" -- without the post in this thread with the XML format, that "or" should be "and"

    So far the only way to get the URL into the softphone is by entering it into the Provisioning URL location in the settings screen. I was hoping for a command-line option to load that URL but it wasn't forthcoming.

    So now I have reverse-engineered and brute-forced the INI file which is much easier for me and my users. It is such a simple thing to do that I probably don't even need to share the methodology here as anyone who needs to provision that way probably already knows how. But if anyone wants to see it, I'll post it here.

    Thanks!
     
  12. intervox

    Joined:
    Jul 21, 2011
    Messages:
    1
    Likes Received:
    0
    Hi Frinklabs,

    I am currently look for a provisioning method. From previous post, you mentionned to have developed a batch file that runs the MSI installer in quiet mode then forces a hand-crafted INI file into the application settings folder after extracting the user's extension and name (for the caller ID) from Active Directory.

    Can you post a detailed procedure for it please. Can you tell me what does the batch file and the INI file contains please.
     
  13. frinklabs

    Joined:
    Feb 11, 2011
    Messages:
    13
    Likes Received:
    0
    Here's the batch file:

    Code:
    @echo off
    cls
    echo.
    echo Retrieving user information
    echo.
    
    REM This section retrieves the user's phone extension from the domain controller,
    REM and assumes the user's extension has been set as the "telephone" variable in 
    REM Active Directory
    REM You can replace this with whatever procedure you want, to set the EXT 
    REM environment variable to the user's extension
    
    set ADMINUSER=adminuser
    set ADMINPASSWORD=adminpassword
    
    del \\server\c$\tmp.ldf
    q:\itadmi~1\pstools\psexec /accepteula -u %ADMINUSER% -p %ADMINPASSWORD% \\server cmd /c ldifde -f c:\tmp.ldf -a cn=administrator,cn=users,dc=server %%ADMINPASSWORD -d "CN=Users,DC=SERVER" -r "(sAMAccountName=%USERNAME%)" > nul 2> nul
    for /f "tokens=1* delims=: " %%a in ('"type \\server\C$\tmp.ldf | find "cn: ""') do @set CLID=%%b
    for /f "tokens=1* delims=: " %%a in ('"type \\server\C$\tmp.ldf | find "telephone""') do @set EXT=%%b
    
    if %EXT% LEQ 99 goto noarg
    if %EXT% GEQ 206 goto noarg
    
    echo.
    echo.
    echo Extension: %EXT% 
    echo CallerID : %CLID%
    echo.
    echo.
    echo If prompted, click "Run" to allow the program to install
    echo.
    echo.
    echo.
    Q:\applic~1\3cxphone\3cxphone5.msi /quiet
    echo.
    echo Customizing phone settings for extension %EXT%
    echo.
    mkdir "c:%HOMEPATH%\locals~1\applic~1\3CX VoIP Phone"
    echo [Profile0] > "C:%HOMEPATH%\locals~1\applic~1\3CXVOI~1\3CXVoipPhone.ini"
    echo Name=8%EXT% >> "C:%HOMEPATH%\locals~1\applic~1\3CXVOI~1\3CXVoipPhone.ini"
    echo AuthUser=8%EXT% >> "C:%HOMEPATH%\locals~1\applic~1\3CXVOI~1\3CXVoipPhone.ini"
    echo AuthID=8%EXT% >> "C:%HOMEPATH%\locals~1\applic~1\3CXVOI~1\3CXVoipPhone.ini"
    echo CallerID=%USERNAME% >> "C:%HOMEPATH%\locals~1\applic~1\3CXVOI~1\3CXVoipPhone.ini"
    echo PBXVoicemail=6%EXT% >> "C:%HOMEPATH%\locals~1\applic~1\3CXVOI~1\3CXVoipPhone.ini"
    type q:\applic~1\3cxphone\3CXVoipPhone.txt >> "C:%HOMEPATH%\locals~1\applic~1\3CXVOI~1\3CXVoipPhone.ini"
    goto end
    
    :noarg
    echo.
    echo We were unable to extract the telephone extension for username %USERNAME%
    echo.
    :end
    
    Here's the contents of 3CXVoipPhone.txt - be sure to set PBXAddr and TunnelRemAddr to the correct IP:

    Code:
    Enabled=1
    AuthPass=
    PBXAddr=192.168.1.1
    PBXRemoteAddr=
    ServerProxy=
    DtmfRFC2833=1
    DtmfInband=0
    DtmfSipinfo=0
    DtmfPayload=101
    SipTransport=0
    RegistrationTime=2
    Codecs=PCMU;PCMA;GSM;
    VideoCodecs=H.263 (ffdshow)
    VideoFormats=QCIF;CIF;SQCIF;CIF4;
    LocalPBX=1
    RTPTransport=0
    ProvisioningURL=http://
    UseTunnel=0
    UseProxy=0
    TunnelPass=abc
    TunnelRemAddr=192.168.1.1
    TunnelPort=5090
    PBXPort=0
    STUNServer=stun.3cx.com
    AutoProvisioning=0
    VoicemailConfirmed=1
    SoundVolume=0
    CLSID={198C9CFF-8226-4A62-B858-D4B721E9D5F9}
    [General]
    VideoCamera=
    VideoAutoSend=1
    VideoSendWhenInactive=1
    UseVideo=0
    EchoCancellation=0
    NoiseReduction=0
    ActiveBLFBank=0
    SndMicGUID=Primary Sound Capture Driver
    SndPlayGUID=Primary Sound Driver
    SndRingGUID=Primary Sound Driver
    Skin=3CXPhone.cxs
    ActiveProfile=-1
    RunAtWinStartup=0
    ShowDebugWindow=0
    LangFile=
    SipTraceLog=0
    LocalRecording=0
    MP3Recording=0
    TunnelLog=0
    ExpandPlus=1
    NoFocusSteal=0
    OnComputerLocked=0
    OnScreensaverStarts=0
    SpeakerVol=0
    RingingVol=0
    MicVol=0
    xpos=336
    ypos=124
    Brightness=-22
    Contrast=133
    Saturation=108
    Sharpness=25
    RTPFirstPort=40000
    RTPLastPort=40049
    LocalPort=-1
    AmPmClock=0
    
     
  14. AndyHerb

    Joined:
    Sep 17, 2012
    Messages:
    1
    Likes Received:
    0
    Hi - thanks for posting your findings. I've just been looking at how to deploy this myself and had come to largely the same conclusion. One thing I'm unsure about, which I'd appreciate anyone's knowledgeable input on, is whether or not it'll cause a problem for all of our users having the same 'unique' CLSID?

    If these do need to be different across each installation, does it matter if we simply incremented the value by one each time?

    Thanks in advance,
    Andy
     
  15. viktorkho

    Joined:
    Jul 28, 2011
    Messages:
    1
    Likes Received:
    0
    Hi all
    Thisis topic is almost full solution about 3CXPhone provisioning, and problem described as
    > So far the only way to get the URL into the softphone is by entering it into the Provisioning URL location in the settings screen.
    hase almost 1 solution too

    It is enough to deploy а template of 3CXVoipPhone.ini file with an "empty" profile ([Profile0]) (namely, with only ProvisioningURL parameter):

    Code:
    [General]
    VideoCamera=
    VideoAutoSend=1
    VideoSendWhenInactive=1
    UseVideo=1
    EchoCancellation=0
    NoiseReduction=0
    ActiveBLFBank=0
    SndMicGUID=Первичный драйвер записи звука
    SndPlayGUID=Первичный звуковой драйвер
    SndRingGUID=Первичный звуковой драйвер
    Skin=3CXPhone.cxs
    ActiveProfile={0EFBABF9-C353-4FDE-97AB-6904417B5679}
    RunAtWinStartup=0
    ShowDebugWindow=0
    LangFile=strings_ru.ini
    MACAddress=53FD1CA245EC
    SipTraceLog=0
    LocalRecording=0
    MP3Recording=0
    TunnelLog=0
    ExpandPlus=1
    NoFocusSteal=0
    OnComputerLocked=0
    OnScreensaverStarts=0
    SpeakerVol=0
    RingingVol=0
    MicVol=0
    xpos=402
    ypos=240
    Brightness=-22
    Contrast=133
    Saturation=108
    Sharpness=25
    RTPFirstPort=40000
    RTPLastPort=40049
    LocalPort=-1
    AmPmClock=0
    CheckUpdates=1
    [Profile0]
    Name=office
    Enabled=1
    CallerID=
    AuthUser=
    AuthID=
    AuthPass=
    PBXAddr=
    PBXRemoteAddr=
    PBXVoicemail=
    ServerProxy=
    DtmfRFC2833=1
    DtmfInband=0
    DtmfSipinfo=0
    DtmfPayload=101
    SipTransport=0
    RegistrationTime=2
    Codecs=PCMU;PCMA;GSM;
    VideoCodecs=
    VideoFormats=QCIF;CIF;SQCIF;CIF4;
    LocalPBX=1
    RTPTransport=0
    ProvisioningURL=http://my.web.local/provisioning/1234.xml
    UseTunnel=0
    UseProxy=0
    TunnelPass=abc
    TunnelRemAddr=
    TunnelPort=5090
    PBXPort=0
    STUNServer=stun.3cx.com
    AutoProvisioning=1
    VoicemailConfirmed=1
    CLSID={0EFBABF9-C353-4FDE-97AB-6904417B5679}
    
    And 3CXPhone will fill all necessary params himself at first run..

    Also:
    * In Win Domain it is possible to deploy 3CXVoipPhone.ini easily with GPO or Default User Profile
    * On Win Server it is possible to generate provisioning xml files with PowerShell. And it seems to be possible use NTLM Auth on IIS to determine users privileges to acces xmls (I store IP phone in AD and run powershell script manually from Custom MMC TaskPad, ask Google..)
    * On *nix Server ... xml files with xmlstarlet and ldapsearch (ldap-utils in ubuntu). I'l try libapache2-authenntlm-perl on my ubuntu to determine ... now
    * I don't know (so far) how to use SSL with this solution.. maybe stunnel (https://www.stunnel.org/index.html)?

    And thanks to all for yuor survey passion..
     
  16. Driver3CX

    Joined:
    Dec 4, 2012
    Messages:
    8
    Likes Received:
    0
    Sure, it works, the data in configuration file change properly, but how to configure Name field...

    Also is it necessary to create as many xml files for provisioning all the extensions?

    [Profile0]
    Name=100@sipserver
    Enabled=1
    CallerID=100
    AuthUser=100
    AuthID=100
    AuthPass=100

    On each computer extension should be different. How to achieve this?
     
  17. Dendzo

    Joined:
    Dec 6, 2012
    Messages:
    1
    Likes Received:
    0
    Have you found answer to your question? I will deploy 3CX with a group policy by distributing .ini file. Will I have problems if CLSID is same for all the users?

    Thanks!
     
Thread Status:
Not open for further replies.