tSIP softphone: number preprocessing

Number dialed by tSIP can processed (or changed altogether) with "on make call" script. Lua SetCallTarget function was added in tSIP 0.1.69.2. Example below removes from dialed string/number/URI all characters except 0...9, *, #, A, B, C and D - intended to remove unexpected characters from dialed number when using "typical"/"numeric" extension identifiers:

target = GetInitialCallTarget()
print(string.format("Initial target: %s\n", target))
target = target:gsub("[^0123456789*#ABCD]", "")
print(string.format("Processed target: %s\n", target))
SetCallTarget(target)    
  

Back to howto list


 "Cookie monsters": 6028220    Parse time: 0.001 s