tomek-o / tSIP

SIP softphone
https://tomeko.net/software/SIPclient/
157 stars 34 forks source link

Pass argument to lua-Script #30

Closed simnzz closed 2 years ago

simnzz commented 2 years ago

Hi, thanks for your great tool! I'm new to lua - and your solution :-)

I've managed it to launch (by powershell) tsip with a lua script to call a number and play a text-to-speech generated wave-file in a loop. Is it possible to pass an argument to the lua script (with the number to call and maybe other parameters?). I'd like to check for a dtmf-callback to send an email to a passed by argument defined email-address.

tomek-o commented 2 years ago

Passing between scripts ("global" variable mechanism and queues) or from other application? For passing from other applications some options might be:

In Settings/Integration "Accept scripts from command line" must be checked - as same mechanism might be used for passing parameters from web browser I felt like it might be too powerful and shouldn't be enabled by default. Note that in default configuration parameters are passed to previous instance if this instance was found, so application may run (being registered and subscribing to events continuously) for a long time while accepting new parameters.

simnzz commented 2 years ago

You're great, thank you! I've managed it now by chaging the variables inside the lua script by powershell.

Regards Simon