- Add cause code for format error
- Change to SWITCH_CONGESTION instead of CONGESTION (imported from 1.2) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
48ca2c82bf
commit
b479a91e97
1 changed files with 3 additions and 2 deletions
|
@ -12116,18 +12116,19 @@ static struct ast_channel *sip_request_call(const char *type, int format, void *
|
||||||
oldformat = format;
|
oldformat = format;
|
||||||
if ((format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1))) {
|
if ((format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1))) {
|
||||||
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format %s while capability is %s\n", ast_getformatname(oldformat), ast_getformatname(global_capability));
|
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format %s while capability is %s\n", ast_getformatname(oldformat), ast_getformatname(global_capability));
|
||||||
|
*cause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL; /* Can't find codec to connect to host */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!(p = sip_alloc(NULL, NULL, 0, SIP_INVITE))) {
|
if (!(p = sip_alloc(NULL, NULL, 0, SIP_INVITE))) {
|
||||||
ast_log(LOG_ERROR, "Unable to build sip pvt data for '%s' (Out of memory)\n", (char *)data);
|
ast_log(LOG_ERROR, "Unable to build sip pvt data for '%s' (Out of memory)\n", (char *)data);
|
||||||
*cause = AST_CAUSE_CONGESTION;
|
*cause = AST_CAUSE_SWITCH_CONGESTION;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(p->options = ast_calloc(1, sizeof(*p->options)))) {
|
if (!(p->options = ast_calloc(1, sizeof(*p->options)))) {
|
||||||
sip_destroy(p);
|
sip_destroy(p);
|
||||||
ast_log(LOG_ERROR, "Unable to build option SIP data structure - Out of memory\n");
|
ast_log(LOG_ERROR, "Unable to build option SIP data structure - Out of memory\n");
|
||||||
*cause = AST_CAUSE_CONGESTION;
|
*cause = AST_CAUSE_SWITCH_CONGESTION;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue