Osmo-CC: Minor 'cause conversion' fix

This commit is contained in:
Andreas Eversberg 2022-07-10 22:02:16 +02:00
parent a34ffda422
commit b94443e57a
1 changed files with 5 additions and 6 deletions

View File

@ -22,7 +22,7 @@
#include "message.h" #include "message.h"
#include "cause.h" #include "cause.h"
/* stolen from freeswitch */ /* stolen from freeswitch, did some corrections */
/* map sip responses to QSIG cause codes ala RFC4497 section 8.4.4 */ /* map sip responses to QSIG cause codes ala RFC4497 section 8.4.4 */
static uint8_t status2isdn_cause(uint16_t status) static uint8_t status2isdn_cause(uint16_t status)
{ {
@ -36,10 +36,9 @@ static uint8_t status2isdn_cause(uint16_t status)
case 603: case 603:
return 21; //SWITCH_CAUSE_CALL_REJECTED; return 21; //SWITCH_CAUSE_CALL_REJECTED;
case 404: case 404:
return 1; //SWITCH_CAUSE_UNALLOCATED_NUMBER;
case 485: case 485:
case 604: case 604:
return 3; //SWITCH_CAUSE_NO_ROUTE_DESTINATION; return 1; //SWITCH_CAUSE_UNALLOCATED_NUMBER;
case 408: case 408:
case 504: case 504:
return 102; //SWITCH_CAUSE_RECOVERY_ON_TIMER_EXPIRE; return 102; //SWITCH_CAUSE_RECOVERY_ON_TIMER_EXPIRE;
@ -55,7 +54,7 @@ static uint8_t status2isdn_cause(uint16_t status)
case 513: case 513:
return 127; //SWITCH_CAUSE_INTERWORKING; return 127; //SWITCH_CAUSE_INTERWORKING;
case 480: case 480:
return 180; //SWITCH_CAUSE_NO_USER_RESPONSE; return 18; //SWITCH_CAUSE_NO_USER_RESPONSE;
case 400: case 400:
case 481: case 481:
case 500: case 500:
@ -68,7 +67,7 @@ static uint8_t status2isdn_cause(uint16_t status)
return 28; //SWITCH_CAUSE_INVALID_NUMBER_FORMAT; return 28; //SWITCH_CAUSE_INVALID_NUMBER_FORMAT;
case 488: case 488:
case 606: case 606:
return 88; //SWITCH_CAUSE_INCOMPATIBLE_DESTINATION; return 65; //SWITCH_CAUSE_BERER_CAPABILITY_NOT_IMPLEMENTED;
case 502: case 502:
return 38; //SWITCH_CAUSE_NETWORK_OUT_OF_ORDER; return 38; //SWITCH_CAUSE_NETWORK_OUT_OF_ORDER;
case 405: case 405:
@ -81,7 +80,7 @@ static uint8_t status2isdn_cause(uint16_t status)
case 483: case 483:
return 25; //SWITCH_CAUSE_EXCHANGE_ROUTING_ERROR; return 25; //SWITCH_CAUSE_EXCHANGE_ROUTING_ERROR;
case 487: case 487:
return 31; //??? SWITCH_CAUSE_ORIGINATOR_CANCEL; return 31; //??? SWITCH_CAUSE_ORIGINATOR_CANCEL; (not specified)
default: default:
return 31; //SWITCH_CAUSE_NORMAL_UNSPECIFIED; return 31; //SWITCH_CAUSE_NORMAL_UNSPECIFIED;
} }