Commit 2cbee41e authored by Tristan Matthews's avatar Tristan Matthews

* #9910: SIP: use pjsip error codes instead of magic numbers

parent d88fe7a7
......@@ -1612,23 +1612,23 @@ void registration_cb(pjsip_regc_cbparam *param)
if (param->code < 0 || param->code >= 300) {
switch (param->code) {
case 606:
case PJSIP_SC_NOT_ACCEPTABLE_ANYWHERE:
lookForReceivedParameter(param, account);
account->setRegistrationState(ErrorNotAcceptable);
break;
case 503:
case 408:
case PJSIP_SC_SERVICE_UNAVAILABLE:
case PJSIP_SC_REQUEST_TIMEOUT:
account->setRegistrationState(ErrorHost);
break;
case 401:
case 403:
case 404:
case PJSIP_SC_UNAUTHORIZED:
case PJSIP_SC_FORBIDDEN:
case PJSIP_SC_NOT_FOUND:
account->setRegistrationState(ErrorAuth);
break;
case 423:
case PJSIP_SC_INTERVAL_TOO_BRIEF:
// Expiration Interval Too Brief
account->doubleRegistrationExpire();
account->registerVoIPLink();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment