mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
FS-11824 [sofia-sip,mod_sofia,core] Added cause codes that map to SIP 600,603,604,606,607
This commit is contained in:
committed by
Mike Jerris
parent
552d3d8b02
commit
0a6d87edfe
@@ -2175,7 +2175,12 @@ typedef enum {
|
||||
SWITCH_CAUSE_INVALID_PROFILE = 611,
|
||||
SWITCH_CAUSE_NO_PICKUP = 612,
|
||||
SWITCH_CAUSE_SRTP_READ_ERROR = 613,
|
||||
SWITCH_CAUSE_BOWOUT = 614
|
||||
SWITCH_CAUSE_BOWOUT = 614,
|
||||
SWITCH_CAUSE_BUSY_EVERYWHERE = 615,
|
||||
SWITCH_CAUSE_DECLINE = 616,
|
||||
SWITCH_CAUSE_DOES_NOT_EXIST_ANYWHERE = 617,
|
||||
SWITCH_CAUSE_NOT_ACCEPTABLE = 618,
|
||||
SWITCH_CAUSE_UNWANTED = 619
|
||||
} switch_call_cause_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -340,6 +340,17 @@ static int hangup_cause_to_sip(switch_call_cause_t cause)
|
||||
return 487;
|
||||
case SWITCH_CAUSE_EXCHANGE_ROUTING_ERROR:
|
||||
return 483;
|
||||
/* Custom mappings not part of RFC */
|
||||
case SWITCH_CAUSE_BUSY_EVERYWHERE:
|
||||
return 600;
|
||||
case SWITCH_CAUSE_DECLINE:
|
||||
return 603;
|
||||
case SWITCH_CAUSE_DOES_NOT_EXIST_ANYWHERE:
|
||||
return 604;
|
||||
case SWITCH_CAUSE_NOT_ACCEPTABLE:
|
||||
return 606;
|
||||
case SWITCH_CAUSE_UNWANTED:
|
||||
return 607;
|
||||
default:
|
||||
return 480;
|
||||
}
|
||||
|
||||
@@ -125,6 +125,10 @@ static struct switch_cause_table CAUSE_CHART[] = {
|
||||
{"NO_PICKUP", SWITCH_CAUSE_NO_PICKUP},
|
||||
{"SRTP_READ_ERROR", SWITCH_CAUSE_SRTP_READ_ERROR},
|
||||
{"BOWOUT", SWITCH_CAUSE_BOWOUT},
|
||||
{"BUSY_EVERYWHERE", SWITCH_CAUSE_BUSY_EVERYWHERE},
|
||||
{"DECLINE", SWITCH_CAUSE_DECLINE},
|
||||
{"DOES_NOT_EXIST_ANYWHERE", SWITCH_CAUSE_DOES_NOT_EXIST_ANYWHERE},
|
||||
{"UNWANTED", SWITCH_CAUSE_UNWANTED},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user