I am trying to make a call progess monitor

I need to bind together the answering of incoming session

The call to the outgoing session.

What I am doing is basically trying to set a user defined variable “t3Id” to both sessions so I “marry then together” from the ESL

 

At present I am doing  (just a simplified extract of the code)

 

var t3Id = “##randomly generated##”;

 

session.answer();

session.setVariable(“t3Id”, t3Id);

sessOut=new Session(##my dial string##)

sessOut.setVariable(“t3Id”, t3Id);

if(sessout.ready()) {

bridge(session, sessOut);

}

session.hangup();
sessOut.hangup();

 

 

Unfortunately I noticed that IF I use sip services (I’m using Messagenet) the outgoing call never gets the variable set!

 

Is it possible to do something like

 

sessOut=new Session()

sessOut.setVariable(“t3Id”, t3Id)

sessOut.dial(##my dial string##)

 

 

???

 

I cant find any other parameter common to BOTH sessions to marry the two together!!!