[Home]

Summary:ASTERISK-05673: Missing SIP status codes
Reporter:Manuel Guesdon (mguesdon)Labels:
Date Opened:2005-11-22 10:33:58.000-0600Date Closed:2008-01-15 16:11:27.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:There's missing status codes in chan_sip: hangup_sip2cause.
At least:
401 Unauthorized (?)
402 Payment Required (?)
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
409 Conflict
410 Gone
411 Length Required
413 Request Entity Too Large
414 Request-URI Too Large
415 Unsupported Media Type
420 Bad Extension
481 Call Leg/Transaction Does Not Exist
482 Loop Detected
484 Address Incomplete
504 Gateway Time-out
505 SIP Version not supported

And anyway we shouldn't return a AST_CAUSE_NORMAL for a 4xx or 5xx status code as we do now:
logger.c:     -- Got SIP response 484 "not pnum compliant" back from chan_sip.c: logger.c:   == No one is available to answer at this time (1:0/0/0)
app_dial.c: Exiting with DIALSTATUS=NOANSWER.
logger.c:     -- Executing NoOp("SIP/manu-3cb4", "DIALSTATUS=NOANSWER HANGUPCAUSE=16") in new stack
Comments:By: Olle Johansson (oej) 2005-11-22 10:36:46.000-0600

What do you mean "missing" ? We have implemented all conversions according to the ISDN cause codes to SIP codes that we've found in the IETF docs.

Agreed, that we need to *set* the proper ISDN cause codes in more places of chan_sip.

Propose a mapping table if you see some clear additions.

By: Manuel Guesdon (mguesdon) 2005-11-22 11:12:49.000-0600

You'll find here IETF status codes http://www.zvon.org/tmRFC/RFC3261/Output/chapter21.html
and cisco mapping:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122limit/122x/122xb/122xb_2/ftmap.htm#1026297

401 Unauthorized => AST_CAUSE_BEARERCAPABILITY_NOTAUTH
402 Payment Required => AST_CAUSE_CALL_REJECTED
405 Method Not Allowed => AST_CAUSE_INTERWORKING
406 Not Acceptable => AST_CAUSE_INTERWORKING
407 Proxy Authentication Required => AST_CAUSE_CALL_REJECTED
409 Conflict => AST_CAUSE_NORMAL_TEMPORARY_FAILURE (??)
410 Gone => AST_CAUSE_UNALLOCATED
411 Length Required => AST_CAUSE_INTERWORKING
413 Request Entity Too Large => AST_CAUSE_INTERWORKING
414 Request-URI Too Large => AST_CAUSE_INTERWORKING
415 Unsupported Media Type => 79 (Service or option not implemented)
420 Bad Extension => AST_CAUSE_INTERWORKING or AST_CAUSE_NO_ROUTE_DESTINATION ?
481 Call Leg/Transaction Does Not Exist => AST_CAUSE_INTERWORKING
482 Loop Detected => AST_CAUSE_INTERWORKING
484 Address Incomplete => AST_CAUSE_INVALID_NUMBER_FORMAT
485 Ambiguous => AST_CAUSE_UNALLOCATED ?
487 Request Terminated => AST_CAUSE_INTERWORKING
491 Request Pending => AST_CAUSE_INTERWORKING
493 Undecipherable => AST_CAUSE_INTERWORKING
504 Gateway Time-out => AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE
505 SIP Version not supported => AST_CAUSE_INTERWORKING
600 Busy Everywhere => AST_CAUSE_USER_BUSY
603 Decline => AST_CAUSE_CALL_REJECTED
604 Does Not Exist Anywhere => AST_CAUSE_UNALLOCATED
606 Not Acceptable => AST_CAUSE_BEARERCAPABILITY_NOTAVAIL

One of the main point is anyway, not returning AST_CAUSE_NORMAL for a 4xx, 5xx or 6xx status code as even if we do't know exctly what error is it, we should report there's  an error :-)

By: Olle Johansson (oej) 2005-11-22 11:18:42.000-0600

I'll look into this. Thanks for the information.

By: Olle Johansson (oej) 2006-01-04 06:08:04.000-0600

Fixed in svn trunk, revision 7783. Thank you for finding the needed information!

/Olle

By: Digium Subversion (svnbot) 2008-01-15 16:11:21.000-0600

Repository: asterisk
Revision: 7783

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r7783 | oej | 2008-01-15 16:11:20 -0600 (Tue, 15 Jan 2008) | 2 lines

Issue ASTERISK-5673: Adding more SIP to ISDN Cause code conversions. Thanks mguesdon!

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=7783

By: Digium Subversion (svnbot) 2008-01-15 16:11:25.000-0600

Repository: asterisk
Revision: 7787

_U  team/oej/multiparking/
U   team/oej/multiparking/UPGRADE.txt
U   team/oej/multiparking/apps/app_chanspy.c
U   team/oej/multiparking/apps/app_disa.c
U   team/oej/multiparking/apps/app_mixmonitor.c
U   team/oej/multiparking/apps/app_privacy.c
U   team/oej/multiparking/apps/app_stack.c
D   team/oej/multiparking/ast_expr.y
U   team/oej/multiparking/ast_expr2.fl
U   team/oej/multiparking/ast_expr2f.c
U   team/oej/multiparking/autoservice.c
U   team/oej/multiparking/cdr.c
U   team/oej/multiparking/channel.c
U   team/oej/multiparking/channels/chan_iax2.c
U   team/oej/multiparking/channels/chan_sip.c
U   team/oej/multiparking/channels/chan_zap.c
U   team/oej/multiparking/configs/manager.conf.sample
U   team/oej/multiparking/configs/sip.conf.sample
U   team/oej/multiparking/contrib/scripts/managerproxy.pl
A   team/oej/multiparking/contrib/scripts/safe_asterisk_restart
U   team/oej/multiparking/file.c
U   team/oej/multiparking/funcs/func_moh.c
U   team/oej/multiparking/image.c
U   team/oej/multiparking/include/asterisk/chanspy.h
U   team/oej/multiparking/include/asterisk/image.h
U   team/oej/multiparking/include/asterisk/rtp.h
U   team/oej/multiparking/manager.c
U   team/oej/multiparking/pbx.c
U   team/oej/multiparking/res/res_osp.c
U   team/oej/multiparking/rtp.c

------------------------------------------------------------------------
r7787 | oej | 2008-01-15 16:11:24 -0600 (Tue, 15 Jan 2008) | 186 lines

Merged revisions 7725,7728-7734,7737,7739,7741,7744-7745,7747-7748,7750-7751,7770,7774-7779,7783-7786 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r7725 | russell | 2006-01-03 00:52:33 +0100 (Tue, 03 Jan 2006) | 2 lines

initialize sip_auth list

................
r7728 | oej | 2006-01-03 09:40:55 +0100 (Tue, 03 Jan 2006) | 2 lines

Bug ASTERISK-5960: Clean up list handling in image.c (drumkilla)

................
r7729 | oej | 2006-01-03 09:54:19 +0100 (Tue, 03 Jan 2006) | 2 lines

Bug ASTERISK-5958: Use list macros in autoservice.c (drumkilla)

................
r7730 | oej | 2006-01-03 10:30:19 +0100 (Tue, 03 Jan 2006) | 2 lines

Bug ASTERISK-5951: Fix unprotected list in RTP, implement AST_LIST macros, update doxygen docs

................
r7731 | oej | 2006-01-03 12:21:48 +0100 (Tue, 03 Jan 2006) | 2 lines

Bug 5345; Add configuration option for minimum registration time. (folsson)

................
r7732 | oej | 2006-01-03 12:31:56 +0100 (Tue, 03 Jan 2006) | 2 lines

Bug ASTERISK-5088: Add caller ID and CallerIDname to OriginateSuccess/Failure manager events (outtolunc)

................
r7733 | oej | 2006-01-03 12:58:10 +0100 (Tue, 03 Jan 2006) | 2 lines

Bug ASTERISK-5913: Broken rport match in check_via(). (rizzo)

................
r7734 | oej | 2006-01-03 13:25:32 +0100 (Tue, 03 Jan 2006) | 2 lines

Issue ASTERISK-5799: Implement printf-like append_history and implement AST_LIST for SIP history (rizzo)

................
r7737 | kpfleming | 2006-01-03 17:39:37 +0100 (Tue, 03 Jan 2006) | 10 lines

Merged revisions 7736 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7736 | kpfleming | 2006-01-03 10:34:12 -0600 (Tue, 03 Jan 2006) | 2 lines

don't leak memory for (most) expression evaluations

........

................
r7739 | kpfleming | 2006-01-03 18:08:35 +0100 (Tue, 03 Jan 2006) | 3 lines

fix breakage from rev 7730 (failure to unlock list in get_proto)
minor cleanups and simpler usage of list macros

................
r7741 | kpfleming | 2006-01-03 18:25:39 +0100 (Tue, 03 Jan 2006) | 12 lines

Merged revisions 7740 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7740 | kpfleming | 2006-01-03 11:24:56 -0600 (Tue, 03 Jan 2006) | 4 lines

revert incorrect fix for bug ASTERISK-5890 from revision 7709
put in correct (simpler) fix
add doxygen docs for channel spy 'state' values

........

................
r7744 | tilghman | 2006-01-03 19:17:42 +0100 (Tue, 03 Jan 2006) | 3 lines

Merged revisions 7743 via svnmerge from
/branches/1.2

................
r7745 | oej | 2006-01-03 20:12:50 +0100 (Tue, 03 Jan 2006) | 2 lines

Don't check user call limits for outbound calls.

................
r7747 | kpfleming | 2006-01-03 21:23:23 +0100 (Tue, 03 Jan 2006) | 10 lines

Merged revisions 7746 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7746 | kpfleming | 2006-01-03 14:22:18 -0600 (Tue, 03 Jan 2006) | 2 lines

remove unused 'old' expression parser

........

................
r7748 | kpfleming | 2006-01-03 21:33:28 +0100 (Tue, 03 Jan 2006) | 2 lines

add script for simple 'no-brainer' restarts of safe_asterisk (issue ASTERISK-5004)

................
r7750 | kpfleming | 2006-01-03 23:07:12 +0100 (Tue, 03 Jan 2006) | 2 lines

add optional timestamps to manager events (issue ASTERISK-5387, simplified)

................
r7751 | kpfleming | 2006-01-03 23:16:23 +0100 (Tue, 03 Jan 2006) | 2 lines

update copyright headers for files changed this year

................
r7770 | bweschke | 2006-01-04 06:26:03 +0100 (Wed, 04 Jan 2006) | 3 lines

Fix the 'if' clause to be true under the right conditions. Bug ASTERISK-5969


................
r7774 | russell | 2006-01-04 08:08:08 +0100 (Wed, 04 Jan 2006) | 10 lines

Merged revisions 7773 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7773 | russell | 2006-01-04 02:06:50 -0500 (Wed, 04 Jan 2006) | 2 lines

use a more correct way of determining the size of the destination buffer

........

................
r7775 | oej | 2006-01-04 10:10:56 +0100 (Wed, 04 Jan 2006) | 6 lines

- Remove "incominglimit" as a configuration option in sip.conf
- Add documentation on call-limit, explaining that there's two counters
 for a type="friend".
- Document the removval of "incominglimit" in UPGRADE.txt


................
r7776 | oej | 2006-01-04 10:22:45 +0100 (Wed, 04 Jan 2006) | 2 lines

Issue ASTERISK-5970: Count in show channeltypes (junky)

................
r7777 | oej | 2006-01-04 11:16:53 +0100 (Wed, 04 Jan 2006) | 2 lines

Missing ">" in XML. Thanks, fenlander, for reporting this on IRC.

................
r7778 | russell | 2006-01-04 13:11:11 +0100 (Wed, 04 Jan 2006) | 2 lines

doxygen tweak

................
r7779 | oej | 2006-01-04 13:16:30 +0100 (Wed, 04 Jan 2006) | 2 lines

Issue ASTERISK-5797: Add destination protocol information to res_osp (homesick)

................
r7783 | oej | 2006-01-04 14:07:34 +0100 (Wed, 04 Jan 2006) | 2 lines

Issue ASTERISK-5673: Adding more SIP to ISDN Cause code conversions. Thanks mguesdon!

................
r7784 | oej | 2006-01-04 14:49:25 +0100 (Wed, 04 Jan 2006) | 2 lines

Whitespace and formatting changes. /Housekeeping

................
r7785 | oej | 2006-01-04 14:56:11 +0100 (Wed, 04 Jan 2006) | 2 lines

Small typo fix

................
r7786 | mattf | 2006-01-04 15:46:41 +0100 (Wed, 04 Jan 2006) | 2 lines

Fixes for bug ASTERISK-5968

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=7787

By: Digium Subversion (svnbot) 2008-01-15 16:11:27.000-0600

Repository: asterisk
Revision: 7788

_U  team/oej/aum-trunk/
U   team/oej/aum-trunk/apps/app_disa.c
U   team/oej/aum-trunk/channels/chan_sip.c
U   team/oej/aum-trunk/channels/chan_zap.c
U   team/oej/aum-trunk/contrib/scripts/managerproxy.pl

------------------------------------------------------------------------
r7788 | oej | 2008-01-15 16:11:26 -0600 (Tue, 15 Jan 2008) | 27 lines

Staying up to date...

Merged revisions 7783-7786 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r7783 | oej | 2006-01-04 14:07:34 +0100 (Wed, 04 Jan 2006) | 2 lines

Issue ASTERISK-5673: Adding more SIP to ISDN Cause code conversions. Thanks mguesdon!

........
r7784 | oej | 2006-01-04 14:49:25 +0100 (Wed, 04 Jan 2006) | 2 lines

Whitespace and formatting changes. /Housekeeping

........
r7785 | oej | 2006-01-04 14:56:11 +0100 (Wed, 04 Jan 2006) | 2 lines

Small typo fix

........
r7786 | mattf | 2006-01-04 15:46:41 +0100 (Wed, 04 Jan 2006) | 2 lines

Fixes for bug ASTERISK-5968

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=7788