RestComm / restcomm-ios-sdk

iOS Mobile SDK to easily integrate communication features (WebRTC, messaging, presence, voice, video, screensharing) based on RestComm into native Mobile Applications
http://www.restcomm.com/
GNU Affero General Public License v3.0
39 stars 43 forks source link

When changing from registrar-less to non registrar-less sporadically registration fails #348

Open atsakiridis opened 8 years ago

atsakiridis commented 8 years ago

Scenario:

At that point the registration sometimes fails and you have to go back to settings and back again for it to take effect properly. Here are the logs in the first failure:

Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (RCDevice.m:95) [RCDevice initWithParams]
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (SipManager.mm:289) [SipManager initWithDelegate]
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (SipManager.mm:364) [SipManager eventLoop]
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (ssc_sip.mm:231) Creating SIP stack -binding to: sip:192.168.2.3:*;transport=tcp
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (RCDevice.m:375) [RCDevice checkNetworkStatus] Reachability update: 1
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (RCDevice.m:321) [RCDevice sipManagerDidInitializedSignalling]
Jan 19 13:57:14  restcomm-olympus[63625] <Notice>: (RCDevice.m:282) [RCDevice updateParams]
Jan 19 13:57:14  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1960) UA: un-REGISTER sip:ios-sdk@cloud.restcomm.com
Jan 19 13:57:14  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1880) REGISTER sip:ios-sdk@cloud.restcomm.com - registering address to network
Jan 19 13:57:16  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:557) Unhandled event 'nua_i_outbound' (8): 101 NAT detected
Jan 19 13:57:16  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1897) REGISTER: 407 Proxy Authentication required
Jan 19 13:57:16  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:635) Authenticating 'REGISTER' with 'Digest:"cloud.restcomm.com":ios-sdk:1234'
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1897) REGISTER: 407 Proxy Authentication required
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:635) Authenticating 'REGISTER' with 'Digest:"cloud.restcomm.com":ios-sdk:1234'
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1897) REGISTER: 904 Operation has no matching challenge 
Jan 19 13:57:17  restcomm-olympus[63625] <Error>: (ssc_sip.mm:1906) REGISTER failed: 904 Operation has no matching challenge 
Jan 19 13:57:17  restcomm-olympus[63625] <Notice>: (ssc_sip.mm:1909) Got failed REGISTER response but silencing it since another registration has been successfully handled afterwards
Jan 19 13:57:17  restcomm-olympus[63625] <Notice>: (RCDevice.m:329) [RCDevice didSignallingError: {
      "NSLocalizedDescription" : "Operation has no matching challenge "
    }]
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1979) un-REGISTER: 407 Proxy Authentication required
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:635) Authenticating 'REGISTER' with 'Digest:"cloud.restcomm.com":ios-sdk:1234'
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1979) un-REGISTER: 407 Proxy Authentication required
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:635) Authenticating 'REGISTER' with 'Digest:"cloud.restcomm.com":ios-sdk:1234'
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1979) un-REGISTER: 904 Operation has no matching challenge 

This is probably related to #331, that will refactor error handing

atsakiridis commented 7 years ago

This should be fixed with the signaling refactoring of #586. Let's keep this open for verification/testing purposes though