[Asterisk-Dev] Non RFC-compliance
Christopher Heiser
cheeseman00 at hotmail.com
Sun Feb 22 20:37:38 MST 2004
William,
Attached is an UNTESTED patch that should work. (any 1xx code that is
unknown should be treated as a 183). If this patch works, you should submit
a bug to bugs.digium.com and attach the patchfile so that it may be
incorporated into future releases.
--Chris Heiser
>From: William Waites <asterisk at lists.styx.org>
>Reply-To: asterisk-dev at lists.digium.com
>To: asterisk-dev at lists.digium.com
>Subject: [Asterisk-Dev] Non RFC-compliance
>Date: Sun, 22 Feb 2004 21:09:41 -0500
>
>I am working with a SIP implementation that gives 101 Dialog Establishment
>session progress message in response to an INVITE request. Asterisk
>produces the following log message:
>
>Feb 22 20:29:14 NOTICE[65541]: chan_sip.c:5074 handle_response: Dunno
>anything about a 101 Dialog Establishement response from SIP/.....
>
>From RFC3261:
>
>8.1.3.2 Unrecognized Responses
>
> A UAC MUST treat any final response it does not recognize as being
> equivalent to the x00 response code of that class, and MUST be able
> to process the x00 response code for all classes. For example, if a
> UAC receives an unrecognized response code of 431, it can safely
> assume that there was something wrong with its request and treat the
> response as if it had received a 400 (Bad Request) response code. A
> UAC MUST treat any provisional response different than 100 that it
> does not recognize as 183 (Session Progress). A UAC MUST be able to
> process 100 and 183 responses.
>
>A look at the code indicates that it is not handling the 101
>correctly -- i.e. it is not treating it as a 183.
>
>I humbly suggesst that you might want to bring your SIP implementation
>into compliance with the standards.
>
>/w
>--
>/~\ The ASCII Ribbon Campaign
>\ / No HTML/RTF in email
> X No Word docs in email
>/ \ Respect for open standards
>_______________________________________________
>Asterisk-Dev mailing list
>Asterisk-Dev at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-dev
>To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
_________________________________________________________________
Get fast, reliable access with MSN 9 Dial-up. Click here for Special Offer!
http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/
-------------- next part --------------
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.299
diff -u -r1.299 chan_sip.c
--- chan_sip.c 20 Feb 2004 15:39:43 -0000 1.299
+++ chan_sip.c 23 Feb 2004 03:33:14 -0000
@@ -5049,7 +5049,14 @@
ast_log(LOG_WARNING, "Host '%s' does not implement '%s'\n",
inet_ntoa(p->sa.sin_addr), msg);
break;
default:
- if ((resp >= 300) && (resp < 700)) {
+ if ((resp >= 100) && (resp < 200)) {
+ if ((option_verbose > 2))
+ ast_verbose(VERBOSE_PREFIX_3 "Treating Unknown SIP response %d \"%s\"
back from %s as 183 Session Progress\n", resp, rest,
inet_ntoa(p->sa.sin_addr));
+ if (p->owner) {
+ /* Queue a progress frame */
+ ast_queue_control(p->owner, AST_CONTROL_PROGRESS, 0);
+ }
+ } else if ((resp >= 300) && (resp < 700)) {
if ((option_verbose > 2) && (resp != 487))
ast_verbose(VERBOSE_PREFIX_3 "Got SIP response %d \"%s\" back from
%s\n", resp, rest, inet_ntoa(p->sa.sin_addr));
p->alreadygone = 1;
More information about the asterisk-dev
mailing list