mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +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
@@ -104,6 +104,7 @@ char const
|
||||
sip_603_Decline[] = "Decline",
|
||||
sip_604_Does_not_exist_anywhere[] = "Does Not Exist Anywhere",
|
||||
sip_606_Not_acceptable[] = "Not Acceptable",
|
||||
sip_607_Unwanted[] = "Unwanted",
|
||||
sip_687_Dialog_terminated[] = "Dialog Terminated"
|
||||
;
|
||||
|
||||
@@ -191,6 +192,7 @@ char const *sip_status_phrase(int status)
|
||||
case 603: return sip_603_Decline;
|
||||
case 604: return sip_604_Does_not_exist_anywhere;
|
||||
case 606: return sip_606_Not_acceptable;
|
||||
case 607: return sip_607_Unwanted;
|
||||
case 687: return sip_687_Dialog_terminated;
|
||||
}
|
||||
|
||||
|
||||
@@ -1422,6 +1422,15 @@ int sip_response_terminates_dialog(int response_code,
|
||||
*/
|
||||
*return_graceful_terminate_usage = 0;
|
||||
return 0;
|
||||
|
||||
case 607: /** @par 607 Unwanted
|
||||
|
||||
This response is similar to 603, except it informs the caller
|
||||
that the call is unwanted and may be blacklisted. Added by
|
||||
RFC-8197
|
||||
*/
|
||||
*return_graceful_terminate_usage = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Do not change graceful_terminate */
|
||||
|
||||
@@ -169,6 +169,8 @@ SOFIAPUBFUN char const *sip_status_phrase(int status);
|
||||
#define SIP_604_DOES_NOT_EXIST_ANYWHERE 604, sip_604_Does_not_exist_anywhere
|
||||
/** 606 Not Acceptable @HIDE */
|
||||
#define SIP_606_NOT_ACCEPTABLE 606, sip_606_Not_acceptable
|
||||
/** 607 Unwanted @HIDE */
|
||||
#define SIP_607_UNWANTED 607, sip_607_Unwanted
|
||||
/** 687 Dialog terminated @HIDE */
|
||||
#define SIP_687_DIALOG_TERMINATED 687, sip_687_Dialog_terminated
|
||||
|
||||
@@ -238,6 +240,7 @@ SOFIAPUBVAR char const sip_600_Busy_everywhere[];
|
||||
SOFIAPUBVAR char const sip_603_Decline[];
|
||||
SOFIAPUBVAR char const sip_604_Does_not_exist_anywhere[];
|
||||
SOFIAPUBVAR char const sip_606_Not_acceptable[];
|
||||
SOFIAPUBVAR char const sip_607_Unwanted[];
|
||||
SOFIAPUBVAR char const sip_687_Dialog_terminated[];
|
||||
|
||||
SOFIA_END_DECLS
|
||||
|
||||
@@ -1511,6 +1511,7 @@ static int response_phrase_test(void)
|
||||
{ SIP_603_DECLINE },
|
||||
{ SIP_604_DOES_NOT_EXIST_ANYWHERE },
|
||||
{ SIP_606_NOT_ACCEPTABLE },
|
||||
{ SIP_607_UNWANTED },
|
||||
{ 0, NULL }
|
||||
};
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user