diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-07 14:42:25 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-07 14:42:25 +0000 |
commit | a6e48d17ea47618afd77ee5e2a7d2cd8e28e14cd (patch) | |
tree | 3bf403f2efb956773fc9f2f66774440b334c9190 /channels/chan_sip.c | |
parent | d71370e4064c36928ed69d5205c4608c02828f9d (diff) |
- Add cause code for format error
- Change to SWITCH_CONGESTION instead of CONGESTION
(imported from 1.2)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18262 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9140f85f2..084ba1b5e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12116,18 +12116,19 @@ static struct ast_channel *sip_request_call(const char *type, int format, void * oldformat = format; 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)); + *cause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL; /* Can't find codec to connect to host */ return NULL; } 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); - *cause = AST_CAUSE_CONGESTION; + *cause = AST_CAUSE_SWITCH_CONGESTION; return NULL; } if (!(p->options = ast_calloc(1, sizeof(*p->options)))) { sip_destroy(p); 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; } |