Ravikiran Reddy
Ravikiran Reddy

Reputation: 87

How to send text data over agi channel

I am trying out communication between two Java applications in asterisk. Now I need to share some text data between the two communicating channels in call. I have tried following Manager API commands Please help me out in sharing some string/message between two channels in a call.

I have tried following

SendTextCommand se= new SendTextCommand("");
            se.setText("Test_message");

ReceiveTextCommand re=new ReceiveTextCommand();
            re.setTimeout(10);

And also

SetVariableCommand se=new SetVariableCommand("text", "27");
            SetVarAction sv=new SetVarAction();
            sv.setVariable("text");
            sv.setValue("27");

            GetVarAction gv=new GetVarAction();
            gv.getVariable();

Please suggest me if any lines are to be added or any new Class can be used

Upvotes: 0

Views: 1086

Answers (1)

arheops
arheops

Reputation: 15259

If you need share data between channels in SAME asterisk, you can use GLOBAL(variable) or SHARED(variable) construction.

If you need send some info to other asterisk, you can use SipAddHeader/Header or jabber or Send/ReceiveText via sip channel.

Upvotes: 1

Related Questions