Issue Reading Channel Variables in dialplan

Hi,

I am setting some variables on asterisk channels using java api and reading them in dialplan. But sometimes values of one channel is assigned to another channel in dialplan.
For example, I am setting a variable ‘phoneno=123’ on channel ‘A’ and ‘phoneno=321’ on channel ‘B’, but when I am reading phoneno in dialplan for channel B, it dials ‘phoneno=123’. I am using asterisk 11.3.0 with centos 6.4.
It happens when 4-5 callers continuously dial phone numbers. I am facing cross connection issue due to this.
Any help will be appreciable.

Thanks

You’ve probably accidentally set a global variable by sending a blank channel name.

Hi david55 thanks for reply.

I have checked all java and asterisk logs. but unable to find the issue. I am using getVariable() in java to ensure that I have assigned right values to the channel after assigning the values and it is perfectly fine. So I think there is no issue in java code.

But in dialplan it shows wrong values that are assigned to another channel.

exten => 1001,Set(CDR(variable_one)=${java_variable_one})
same => n,Set(CDR(variable_two)=${java_variable_two})
same => n,Set(CDR(variable_three)=${java_variable_three})

I am also setting these values to null when call is disconnected or h extension is executed.

Thanks

one more thing not all values are wrong, some of them are correct which are assigned in java code.

Thanks