Hello, I tested it, and it works.
About the save() return codes, there are a lot of cases, so I would have sorted it this way: - no error, - error codes in parsing SIP, - server side errors (like manipulating usrloc), - and service errors (like too many registers). Here is a patch by way of example, but I can't say if it's the right way to do. Regards, -- Adrien Martin
diff --git a/modules/registrar/save.c b/modules/registrar/save.c
index 63e2d4d..9c0b2cf 100644
--- a/modules/registrar/save.c
+++ b/modules/registrar/save.c
@@ -816,7 +816,42 @@ error:
if (forced_c) free_contacts(&forced_c);
- return 0;
+ switch (rerrno) {
+ case R_FINE:
+ case R_OOO:
+ case R_RETRANS:
+ return 0;
+ case R_TOO_MANY:
+ return -2; /* Account errors */
+ case R_INV_CSEQ:
+ case R_TO_USER:
+ case R_AOR_PARSE:
+ case R_INV_EXP:
+ case R_INV_Q:
+ case R_PARSE:
+ case R_TO_MISS:
+ case R_CID_MISS:
+ case R_CS_MISS:
+ case R_PARSE_EXP:
+ case R_PARSE_CONT:
+ case R_STAR_EXP:
+ case R_STAR_CONT:
+ case R_UNESCAPE:
+ case R_CONTACT_LEN:
+ case R_CALLID_LEN:
+ case R_PARSE_PATH:
+ case R_PATH_UNSUP:
+ return -3; /* UAC's SIP errors */
+ case R_UL_DEL_R:
+ case R_UL_GET_R:
+ case R_UL_NEW_R:
+ case R_UL_INS_C:
+ case R_UL_INS_R:
+ case R_UL_DEL_C:
+ case R_UL_UPD_C:
+ case R_AOR_LEN:
+ return -4; /* Server side errors */
+ }
return_minus_one:
if (forced_c) free_contacts(&forced_c);
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
