我們想要在Android 2.3.3上創建SIP應用程序,並且在android.sip堆棧(默認SIP堆棧)中存在一些問題。我們的移動應用發送寄存器sip數據包,但是 1.)默認情況下OpenIMS核心響應400錯誤請求P-Visited-Network-ID頭丟失 2.)在我們設置端口號爲4060的情況下-PCSCF /builder.setPort (4060)/ OpenIMS核心將此請求從4060發送到4060(相同的端口,相同的IP,相同的CSCF,相同的數據包),直到OpenIMS核心發送響應移動應用 - 504服務器超時爲止。 我們也嘗試了SipDemo,CSipSimple,我們也遇到了同樣的問題。 當我們嘗試怪獸通訊器或IMSDroid時,它的工作原理!具有授權的SIP堆棧註冊包
工作和有問題的應用程序之間有一個區別 - 工作應用程序也發送註冊包與授權字段。
部分代碼:
public SipManager mSipManager = null;
public SipProfile mSipProfile = null;
SipProfile.Builder builder = new SipProfile.Builder(username, domain);
builder.setPassword(password);
builder.setDisplayName(username);
builder.setProfileName(username + "@" + domain);
port = Integer.parseInt(4060);
builder.setProtocol(protocol);
mSipProfile = builder.build();
...
try { mSipManager.open(mSipProfile);} catch (SipException e) { ...}
try {
mSipManager.register(mSipProfile, 30, new SipRegistrationListener(){
public void onRegistering(String localProfileUri) {
}
public void onRegistrationDone(String localProfileUri, long expiryTime) {
}
public void onRegistrationFailed(String localProfileUri, int errorCode, String errorMessage) {
}
});
} catch (SipException e) {
.... }
如何給授權場登記在經典的SIP協議棧包?
我們還試圖J-SIP但它顯示錯誤:轉換爲Dalvik的格式錯誤1.
每一個答案,將是非常讚賞失敗。