Dialog creation

0 views
Skip to first unread message

laurent

unread,
Sep 30, 2008, 4:30:48 PM9/30/08
to mobicents-public
Hello,

in: public void onResponseOkEvent(javax.sip.ResponseEvent event,
ActivityContextInterface aci) {

I try to do: Dialog dialog = event.getDialog();

to send the ACK with: dialog.sendAck(ackRequest);

my problem is that after: Dialog dialog = event.getDialog();
dialog is still null

so I need to know when the dialog is created

Regards

Laurent

Luis Barreiro

unread,
Sep 30, 2008, 5:49:00 PM9/30/08
to mobicent...@googlegroups.com
Hi Laurent,

The jain-sip stack does not create implicitly.
You'll have to request the creation of the dialog, after the initial request has been sent.
The following code shows how to do that.


ClientTransaction ct = sipFactoryProvider.getSipProvider().getNewClientTransaction(request);
ct.sendRequest();
Dialog dialog = sipFactoryProvider.getSipProvider().getNewDialog(ct);


Later on, the response will be associated to the dialog.

Regards, Luis Barreiro.

Reply all
Reply to author
Forward
0 new messages