Access Keys:
Skip to content (Access Key - 0)









Cannot create SIP dialog using SUBSCRIBE

Print this page

Question

I'm trying to implement the SIP SUBSCRIBE request (RFC3265). This request is supposed to establish a SIP dialog if one has not already been established. In order to do this I have enclosed the following snippet of code:

public void onSubscribeRequest(RequestEvent event,  ActivityContextInterface aci) {
  Request request = event.getRequest();
  ServerTransaction serverTransaction = (ServerTransaction)  aci.getActivity();
  try {
    Dialog dialog = serverTransaction.getDialog();
    if (dialog == null){
      dialog = getSipProvider().getNewDialog(serverTransaction);
    }
    dialog.terminateOnBye(false);
    ...
  }
  catch(...) {
    ...
  }
}

This resulted in:

java.lang.NoSuchMethodError: javax.sip.SipProvider.getNewDialog(Ljavax/sip/Transaction;)Ljavax/sip/Dialog;

I don't understand why I can invoke this public interface method either directly or reflectively. Is this some kind of security manager setting? How should I establish a new dialog in this case?


Answer

Register/login to use all DevPortal features - Log in | Sign up )

Adaptavist Theme Builder Powered by Atlassian Confluence