Skip to content

Commit c68dad0

Browse files
committed
[ADD] FPNR-349, add server errors to client.
1 parent fe8e76c commit c68dad0

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

client/api/src/com/flashphoner/api/data/ErrorCodes.as

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ package com.flashphoner.api.data
7171
* Application can`t load flashphoner.xml properly
7272
**/
7373
public static const WRONG_FLASHPHONER_XML:String = "WRONG_FLASHPHONER_XML";
74-
74+
/**
75+
* Callee name is null.
76+
**/
77+
public static const CALLEE_NAME_IS_NULL:String = "CALLEE_NAME_IS_NULL";
78+
/**
79+
* Payments required from user. SIP 402 Payment Required
80+
**/
81+
public static const PAYMENT_REQUIRED:String = "PAYMENT_REQUIRED";
7582
}
7683
}

client/client/src/js/Phone.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ function notifyError(error) {
495495

496496
} else if (error == WRONG_FLASHPHONER_XML) {
497497
openInfoView("Flashphoner.xml has errors. Please check it.", 3000, 60);
498+
} else if (error == PAYMENT_REQUIRED) {
499+
openInfoView("Payment required, please check your balance.", 3000, 60);
498500
}
499501

500502
closeConnectingView();

client/client/src/js/StaticData.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ var REGISTER_EXPIRE = "REGISTER_EXPIRE";
2828
var SIP_PORTS_BUSY = "SIP_PORTS_BUSY";
2929
var MEDIA_PORTS_BUSY = "MEDIA_PORTS_BUSY";
3030
var WRONG_SIPPROVIDER_ADDRESS = "WRONG_SIPPROVIDER_ADDRESS";
31+
var CALLEE_NAME_IS_NULL = "CALLEE_NAME_IS_NULL";
32+
var WRONG_FLASHPHONER_XML = "WRONG_FLASHPHONER_XML";
33+
var PAYMENT_REQUIRED = "PAYMENT_REQUIRED";
3134

3235
function extend(Child, Parent) {
3336
var F = function() { }

0 commit comments

Comments
 (0)