dect
/
asterisk
Archived
13
0
Fork 0

(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.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82257 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
file 2007-09-11 17:58:48 +00:00
parent a4f9e795c2
commit 0523896934
3 changed files with 11 additions and 2 deletions

View File

@ -81,7 +81,10 @@ SIP changes
* 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
------------

View File

@ -855,6 +855,7 @@ struct sip_auth {
#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 @@ static enum check_auth_result register_verify(struct sip_pvt *p, struct sockaddr
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 @@ static int _sip_show_peer(int type, int fd, struct mansession *s, const struct m
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 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
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")) {

View File

@ -579,6 +579,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; outboundproxy
; rfc2833compensate
; callbackextension
; registertrying
;[sip_proxy]
; For incoming calls only. Example: FWD (Free World Dialup)