CallTriggerCmd prefix

Status
Not open for further replies.

dxb

Joined
Feb 26, 2016
Messages
3
Reaction score
1
Hi everybody,
is it possible to add a prefix to a telephone number when I use the CallTriggerCmd ?

We have set the 3cx to dial out using prefix 0.
When we click a tel: link on website, the number dialed is without any prefix and we cannot place the call.
....
 
I tried to modify the registry key HKCR\3cxphone\shell\open\command\default
from
C:\ProgramData\3CXPhone for Windows\PhoneApp\CallTriggerCmd.exe -cmd makecall: "%1"
to
C:\ProgramData\3CXPhone for Windows\PhoneApp\CallTriggerCmd.exe -cmd makecall: "0%1"

but instead calling the right number with an extra 0, it add as prefix "0835"
with CallTriggerCmd.exe -cmd makecall: "1%1" > prefix will become "1835"

Any idea ?
 
This is happening because the tel protocol does not in fact send only the number, so the %1 variable does not contain e.g. 123456789, it contains the 'tel:' prefix as well, so the parameter %1 actually contains "tel:123456789", so I am assuming that the peculiar 835 numbers have something to do with the 'tel' characters in the parameter.

I thought of something that might work, change the registry keys completely and point them to a bat file that will take the %1 as a parameter, then remove the 'tel:' characters and then invoke the CallTriggerCmd.exe with the modified number.

The .bat file you create could look something like this:
Code:
@echo off

set new_num=%1
set new_num=%new_num:tel:=%

"C:\ProgramData\3CXPhone for Windows\PhoneApp\3CXClickToCall.exe" --dial %new_num%

So assuming the bat file is c:\call_trigger.bat, the the registry key would be something like:

c:\call_trigger.bat "0%1"

where 0 would be your prefix.

I didn't test it extensively, but it should work.
 
Status
Not open for further replies.