Jump to content

Problems with Variables


drewsmith

Recommended Posts

Hey All,

 

I hope someone can help with this. First, an overview of what I’m doing. Right now, I’m trying to dial a number and play an outgoing message from the command line. The outgoing message may be different each time and that is determined by a variable I provide in the command line (i.e. IVM.exe -outbound 5555555 -hide -set msg=01). I’m using a SIP line (vonage), not a land line and the sip line can handle multiple calls at once.

 

In the first OGM, I have am taking the variable msg and using it to determine which audio file to play. That works just fine. The problem is this. If I initiate a second call with a different msg (i.e. msg=02), the msg variable for the call that is currently in progress will use the data from the second call. In other words:

 

Call 1: I send msg=01

Call 2: I send msg=02

If call 1 hasn’t gotten to the point where it needs to used the data stored in msg, msg=01 will be overwritten with msg=02.

 

I need to be able to process multiple calls at once in this fashion but with the way that it ends up working, I can only do one at a time otherwise the first call uses the audio file that the second call should use.

 

Am I missing something? I read that the variable sent by the command line is a global variable. How do I send a variable that is only specific to a single call?

 

Thanks for the help,

 

Drew

Link to comment
Share on other sites

Hey Drew,

 

I would approach it in a different way, because it seems to me that your msg variable is defined as global variable. The variable will always be overwritten during a simultaneous call. So you have to set the "global variabel" to be a "local call variable" first (do a type of variable-reinitialisation).

Try setting a comand-line with another variablename like

 

IVM.exe -outbound 5555555 -hide -set globalmsg=01

 

after that in your first OGM in the advanced tab set

"set local call variables" the value msg=%globalmsg%

 

that will make the global call variable a local(msg=01). Hope it helps!

 

Good luck and let me know if it works!

 

Claudio

 

 

Hey All,

 

I hope someone can help with this. First, an overview of what I’m doing. Right now, I’m trying to dial a number and play an outgoing message from the command line. The outgoing message may be different each time and that is determined by a variable I provide in the command line (i.e. IVM.exe -outbound 5555555 -hide -set msg=01). I’m using a SIP line (vonage), not a land line and the sip line can handle multiple calls at once.

 

In the first OGM, I have am taking the variable msg and using it to determine which audio file to play. That works just fine. The problem is this. If I initiate a second call with a different msg (i.e. msg=02), the msg variable for the call that is currently in progress will use the data from the second call. In other words:

 

Call 1: I send msg=01

Call 2: I send msg=02

If call 1 hasn’t gotten to the point where it needs to used the data stored in msg, msg=01 will be overwritten with msg=02.

 

I need to be able to process multiple calls at once in this fashion but with the way that it ends up working, I can only do one at a time otherwise the first call uses the audio file that the second call should use.

 

Am I missing something? I read that the variable sent by the command line is a global variable. How do I send a variable that is only specific to a single call?

 

Thanks for the help,

 

Drew

Link to comment
Share on other sites

  • 2 weeks later...

Still no luck. Any other ideas?

 

 

Hey Drew,

 

I would approach it in a different way, because it seems to me that your msg variable is defined as global variable. The variable will always be overwritten during a simultaneous call. So you have to set the "global variabel" to be a "local call variable" first (do a type of variable-reinitialisation).

Try setting a comand-line with another variablename like

 

IVM.exe -outbound 5555555 -hide -set globalmsg=01

 

after that in your first OGM in the advanced tab set

"set local call variables" the value msg=%globalmsg%

 

that will make the global call variable a local(msg=01). Hope it helps!

 

Good luck and let me know if it works!

 

Claudio

Link to comment
Share on other sites

Drew,

 

I don't understand. It should work. Is there any how, somewhere in your configuration, that you reassign the msg variable to the globalmsg again? Another problem could be, that you are assinging the msg-variable in the same OGM that you are already playing the %msg%-message. Remember that the OGM only assign the variable after or during it plays the OGM. So you should assign the msg variable as one independent OGM. It is better to be an OGM that only does nothning more then setting this local variable. Try putting an short silence.wav file to be played in that OGM. Only after that OGM use your other OGMs to play tha calls with the msg variable.

 

So:

1. Make an extra additional OGM (ie. named "MSG variable initialization") playing a silence.wav file. Make that OGM the starting OGM, and set it go to the OGM, that was your starting OGM before (after finished playinf the silence.wav).

2. In that additional OGM you have just created set in the advanced tab:

"set local call variables" the value msg=%globalmsg%

3. Check in all your OGM, if there is any other reassingment of the varibles MSG left. Delete them all!!!

The only assignement of the msg-variable should only be in the additional OGM you have created, and nowhere else.

 

 

Hey Drew,

 

I would approach it in a different way, because it seems to me that your msg variable is defined as global variable. The variable will always be overwritten during a simultaneous call. So you have to set the "global variabel" to be a "local call variable" first (do a type of variable-reinitialisation).

Try setting a comand-line with another variablename like

 

IVM.exe -outbound 5555555 -hide -set globalmsg=01

 

after that in your first OGM in the advanced tab set

"set local call variables" the value msg=%globalmsg%

 

that will make the global call variable a local(msg=01). Hope it helps!

 

Good luck and let me know if it works!

 

Claudio

Link to comment
Share on other sites

  • 2 years later...
Drew,

 

I don't understand. It should work. Is there any how, somewhere in your configuration, that you reassign the msg variable to the globalmsg again? Another problem could be, that you are assinging the msg-variable in the same OGM that you are already playing the %msg%-message. Remember that the OGM only assign the variable after or during it plays the OGM. So you should assign the msg variable as one independent OGM. It is better to be an OGM that only does nothning more then setting this local variable. Try putting an short silence.wav file to be played in that OGM. Only after that OGM use your other OGMs to play tha calls with the msg variable.

 

So:

1. Make an extra additional OGM (ie. named "MSG variable initialization") playing a silence.wav file. Make that OGM the starting OGM, and set it go to the OGM, that was your starting OGM before (after finished playinf the silence.wav).

2. In that additional OGM you have just created set in the advanced tab:

"set local call variables" the value msg=%globalmsg%

3. Check in all your OGM, if there is any other reassingment of the varibles MSG left. Delete them all!!!

The only assignement of the msg-variable should only be in the additional OGM you have created, and nowhere else.

 

TO ALL!!! VERY IMPORTANT TO KNOW, MIGHT BE AN SECURITY ISSUE DEPENDING OF APPLICATION:

 

We just have experienced some problems with IVM, we thought it was an threading problem. Conclusion: when using command lines with -set be aware that all the vars that are set by "-SET" are GLOBAL, NOT LOCAL!!! And they are set immediatly! When running on multiple line with concurrent connections, it will use the last vars that have been set. Example.: calling ivm.exe per command line D:\Prog\ivm\ivm.exe -outbound 12345 -set id=102

using the SQLplugin for an "select * from table where id=%id%" YOU MUST BE AWARE THAT VAR ID=102 WILL BE OVERWRITTEN, as soon as another command line instance is being created during the first call!!! For example with an "D:\Prog\ivm\ivm.exe -outbound 12345 -set id=110" just some seconds later. If the Plugin of the 1st call hadn't started, the id will be overwritten (THE VARS ARE GLOBAL and are valid for ALL CALLS). If the IVM-Call is going to give data back to the caller, the first caller might hear information destined to the second caller!!!!!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...