[asterisk-commits] file: trunk r82257 - in /trunk: ./ channels/ configs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 11 12:58:48 CDT 2007
Author: file
Date: Tue Sep 11 12:58:48 2007
New Revision: 82257
URL: http://svn.digium.com/view/asterisk?view=rev&rev=82257
Log:
(closes issue #9433)
Reported by: junky
Patches:
register_trying.diff.txt uploaded by jcmoore
Disable sending 100 Trying on REGISTER attempts and make it an option. This has been signed off by oej.
Modified:
trunk/CHANGES
trunk/channels/chan_sip.c
trunk/configs/sip.conf.sample
Modified: trunk/CHANGES
URL: http://svn.digium.com/view/asterisk/trunk/CHANGES?view=diff&rev=82257&r1=82256&r2=82257
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Sep 11 12:58:48 2007
@@ -81,7 +81,10 @@
* Added rtpdest option to CHANNEL() dialplan function.
* Added SIPREFERRINGCONTEXT and SIPREFERREDBYHDR variables which are set when a transfer takes place.
* SIP now adds a header to the CANCEL if the call was answered by another phone
- in the same dial command, or if the new c option in dial() is used.
+ in the same dial command, or if the new c option in dial() is used.
+ * The new default is that 100 Trying is not sent on REGISTER attempts as the RFC specifically
+ states it is not needed. For phones, however, that do require it the registertrying option
+ has been added so it can be enabled.
IAX2 changes
------------
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=82257&r1=82256&r2=82257
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Sep 11 12:58:48 2007
@@ -855,6 +855,7 @@
#define SIP_PAGE2_RFC2833_COMPENSATE (1 << 25) /*!< DP: Compensate for buggy RFC2833 implementations */
#define SIP_PAGE2_BUGGY_MWI (1 << 26) /*!< DP: Buggy CISCO MWI fix */
#define SIP_PAGE2_TEXTSUPPORT (1 << 28) /*!< GDP: Global text enable */
+#define SIP_PAGE2_REGISTERTRYING (1 << 29) /*!< DP: Send 100 Trying on REGISTER attempts */
#define SIP_PAGE2_FLAGS_TO_COPY \
(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
@@ -9280,7 +9281,8 @@
res = AUTH_PEER_NOT_DYNAMIC;
} else {
ast_copy_flags(&p->flags[0], &peer->flags[0], SIP_NAT);
- transmit_response(p, "100 Trying", req);
+ if (ast_test_flag(&p->flags[1], SIP_PAGE2_REGISTERTRYING))
+ transmit_response(p, "100 Trying", req);
if (!(res = check_auth(p, req, peer->name, peer->secret, peer->md5secret, SIP_REGISTER, uri, XMIT_UNRELIABLE, req->ignore))) {
sip_cancel_destroy(p);
@@ -11277,6 +11279,7 @@
ast_cli(fd, ")\n");
ast_cli(fd, " Auto-Framing: %s \n", cli_yesno(peer->autoframing));
+ ast_cli(fd, " 100 on REG : %s\n", ast_test_flag(&peer->flags[1], SIP_PAGE2_REGISTERTRYING) ? "Yes" : "No");
ast_cli(fd, " Status : ");
peer_status(peer, status, sizeof(status));
ast_cli(fd, "%s\n",status);
@@ -17562,6 +17565,8 @@
int error = ast_parse_allow_disallow(&peer->prefs, &peer->capability, v->value, FALSE);
if (error)
ast_log(LOG_WARNING, "Codec configuration errors found in line %d : %s = %s\n", v->lineno, v->name, v->value);
+ } else if (!strcasecmp(v->name, "registertrying")) {
+ ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_REGISTERTRYING);
} else if (!strcasecmp(v->name, "autoframing")) {
peer->autoframing = ast_true(v->value);
} else if (!strcasecmp(v->name, "rtptimeout")) {
Modified: trunk/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=82257&r1=82256&r2=82257
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Tue Sep 11 12:58:48 2007
@@ -579,6 +579,7 @@
; outboundproxy
; rfc2833compensate
; callbackextension
+; registertrying
;[sip_proxy]
; For incoming calls only. Example: FWD (Free World Dialup)
More information about the asterisk-commits
mailing list