Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Solved Enable Open Contact URL

Discussion in '3CX Phone System - General' started by Nicolas Borowy, Oct 30, 2017.

Thread Status:
Not open for further replies.
  1. Nicolas Borowy

    Joined:
    Aug 17, 2017
    Messages:
    8
    Likes Received:
    2
    Hi,

    I want to open this website when a call is ringing with the integration function :

    https://tel.search.ch/?was=%CallerNumber%

    The webpage opens and the number displays well. On the other hand, how can I block the display of the internal numbers? I just want to show the number with, at least, 7 digits...

    Thanks
     
  2. mariosM_3CX

    mariosM_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Nov 1, 2017
    Messages:
    406
    Likes Received:
    40
    Hello @Nicolas Borowy,

    You can do this by writing a small batch file and configuring 3CX windows client to open the batch file when ringing, To do this just go to 3CX windows client->Settings->Advanced Settings->Behavior, enable the "Launch application on incoming Call" option and set the path to the executable(The batch file that you will create). In the "Parameters to send" field write %CallerNumber%

    Now you need to create the above batch file with the code below:

    echo off
    if %1 LSS 1000 goto END
    start https://tel.search.ch/?was=%1
    :END

    The logic in the above code is to compare the caller id(%1 variable) to the "biggest possible number" of your internal extensions. For example, if you have 3 digit extensions(999 being the biggest one) you need to check if caller id is less that 1000 (as in above example). If you have 4 digit extensions, then caller id should be less that 10000 and so on. If the caller id is less than configured number(meaning the caller is an internal extension) then code goes to end and nothing happens. Otherwise the code will start the webpage with caller id appended to it

    A better solution would be to get the caller id length and if is above 7 then open the url, but you'll need to write a batch file that would be a bit more complex than the above one.
     
  3. Nicolas Borowy

    Joined:
    Aug 17, 2017
    Messages:
    8
    Likes Received:
    2
    Hi mariosM,
    Great, the batch is working well. We just adapted it like this :

    @echo off
    if %1 GTR 100 goto END
    start firefox.exe https://tel.search.ch/?was=%1
    :END

    Thank you for your help.
     
Thread Status:
Not open for further replies.