diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-14 18:05:22 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-14 18:05:22 +0000 |
commit | f450578cea8cf74252ebbd6ef4463881e702a6b5 (patch) | |
tree | b542c4c04c16f3d1f08735f2a6f6345985ea2e48 | |
parent | 07881c38a110492364b7ac8ef0d46e01e4f58a6a (diff) |
deprecate the mailboxdetail option and always use its behavior, instead (issue #6665)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12923 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_iax2.c | 28 | ||||
-rw-r--r-- | configs/iax.conf.sample | 7 |
2 files changed, 9 insertions, 26 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 3a062c920..1b16fb977 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -262,7 +262,7 @@ enum { IAX_USEJITTERBUF = (1 << 5), /*!< Use jitter buffer */ IAX_DYNAMIC = (1 << 6), /*!< dynamic peer */ IAX_SENDANI = (1 << 7), /*!< Send ANI along with CallerID */ - IAX_MESSAGEDETAIL = (1 << 8), /*!< Show exact numbers */ + /* (1 << 8) is currently unused due to the deprecation of an old option. Go ahead, take it! */ IAX_ALREADYGONE = (1 << 9), /*!< Already disconnected */ IAX_PROVISION = (1 << 10), /*!< This is a provisioning request */ IAX_QUELCH = (1 << 11), /*!< Whether or not we quelch audio */ @@ -5901,19 +5901,13 @@ static int update_registry(char *name, struct sockaddr_in *sin, int callno, char iax_ie_append_short(&ied, IAX_IE_REFRESH, p->expiry); iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr); if (!ast_strlen_zero(p->mailbox)) { - if (ast_test_flag(p, IAX_MESSAGEDETAIL)) { - int new, old; - ast_app_messagecount(p->mailbox, &new, &old); - if (new > 255) - new = 255; - if (old > 255) - old = 255; - msgcount = (old << 8) | new; - } else { - msgcount = ast_app_has_voicemail(p->mailbox, NULL); - if (msgcount) - msgcount = 65535; - } + int new, old; + ast_app_messagecount(p->mailbox, &new, &old); + if (new > 255) + new = 255; + if (old > 255) + old = 255; + msgcount = (old << 8) | new; iax_ie_append_short(&ied, IAX_IE_MSGCOUNT, msgcount); } if (ast_test_flag(p, IAX_HASCALLERID)) { @@ -8501,7 +8495,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, in } } if (peer) { - ast_copy_flags(peer, &globalflags, IAX_MESSAGEDETAIL | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF); + ast_copy_flags(peer, &globalflags, IAX_USEJITTERBUF | IAX_FORCEJITTERBUF); peer->encmethods = iax2_encryption; peer->secret[0] = '\0'; if (!found) { @@ -8527,8 +8521,6 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, in ast_copy_string(peer->mailbox, v->value, sizeof(peer->mailbox)); } else if (!strcasecmp(v->name, "dbsecret")) { ast_copy_string(peer->dbsecret, v->value, sizeof(peer->dbsecret)); - } else if (!strcasecmp(v->name, "mailboxdetail")) { - ast_set2_flag(peer, ast_true(v->value), IAX_MESSAGEDETAIL); } else if (!strcasecmp(v->name, "trunk")) { ast_set2_flag(peer, ast_true(v->value), IAX_TRUNK); if (ast_test_flag(peer, IAX_TRUNK) && (timingfd < 0)) { @@ -9074,8 +9066,6 @@ static int set_config(char *config_file, int reload) ast_set2_flag((&globalflags), ast_true(v->value), IAX_FORCEJITTERBUF); else if (!strcasecmp(v->name, "delayreject")) delayreject = ast_true(v->value); - else if (!strcasecmp(v->name, "mailboxdetail")) - ast_set2_flag((&globalflags), ast_true(v->value), IAX_MESSAGEDETAIL); else if (!strcasecmp(v->name, "rtcachefriends")) ast_set2_flag((&globalflags), ast_true(v->value), IAX_RTCACHEFRIENDS); else if (!strcasecmp(v->name, "rtignoreregexpire")) diff --git a/configs/iax.conf.sample b/configs/iax.conf.sample index 5c4b226b2..20db97ad2 100644 --- a/configs/iax.conf.sample +++ b/configs/iax.conf.sample @@ -217,13 +217,6 @@ forcejitterbuffer=no ; tos=lowdelay ; -; If mailboxdetail is set to "yes", the user receives -; the actual new/old message counts, not just a yes/no -; as to whether they have messages. this can be set on -; a per-peer basis as well -; -;mailboxdetail=yes -; ; If regcontext is specified, Asterisk will dynamically create and destroy ; a NoOp priority 1 extension for a given peer who registers or unregisters ; with us. The actual extension is the 'regexten' parameter of the registering |