Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid SIP registration failed (-9 IN_PROGRESS)
    primarykey
    data
    text
    <p>Here is my registration code:</p> <pre><code> protected void initializeManagerOpen(){ consoleWrite("initializeOpen"); if(mSipManager==null) { return; } SipProfile.Builder builder; try { builder = new SipProfile.Builder("13", "10.0.0.4"); builder.setPassword("13"); builder.setPort(5062); builder.setProtocol("UDP"); mSipProfile = builder.build(); try { Intent intent = new Intent(); intent.setAction("android.SipDemo.INCOMING_CALL"); PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, Intent.FILL_IN_DATA); mSipManager.open(mSipProfile, pendingIntent, null); mSipManager.setRegistrationListener(mSipProfile.getUriString(), new SipRegistrationListener() { public void onRegistering(String localProfileUri) { mNotificationTask.endNotification(); mNotificationTask.createNotification(R.drawable.ic_stat_connecting,"Test","Connecting"); consoleWrite("Registering with SIP Server..."); } public void onRegistrationDone(String localProfileUri, long expiryTime){ mNotificationTask.endNotification(); mNotificationTask.createNotification(R.drawable.ic_stat_connected,"Test","Connected"); consoleWrite("Ready"); } public void onRegistrationFailed(String localProfileUri, int errorCode, String errorMessage){ mNotificationTask.endNotification(); mNotificationTask.createNotification(R.drawable.ic_stat_disconnected,"Test","Failed to connect:"+errorCode); consoleWrite("Registration failed. Please check settings."); consoleWrite(""+errorCode); consoleWrite(errorMessage); } }); } catch (SipException e) { e.printStackTrace(); } } catch (ParseException e) { e.printStackTrace(); } } </code></pre> <p>Though sometimes it registered successfully, most time I got a error code -9:</p> <pre><code>Registration failed. Please check settings. -9 0 </code></pre> <p>I found this description on reference site:</p> <pre><code>public static final int IN_PROGRESS The client is in a transaction and cannot initiate a new one. Constant Value: -9 (0xfffffff7) </code></pre> <p>What does it means exactly? I don't have any other SIP application running on my phone.</p> <p><strong>PS. First time when i am trying to connect, it is working. But second time it returns -9. Maybe i not close connection correctly? I think i have problem because i am trying to close connection but it is not closing...</strong></p> <pre><code>public void closeLocalProfile() { if(mSipManager==null){ return; } try{ if(mSipProfile!=null){ mSipManager.close(mSipProfile.getUriString()); consoleWrite("mSipManager Closed - "+mSipProfile.getUriString()); } }catch(Exception e){ consoleWrite("Failed to close local profile. - "+e); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload