--- ./channels/chan_sip.c 2007-03-16 13:10:54.000000000 +0200 +++ ../clean/asterisk-1.4.1/channels/chan_sip.c 2007-03-02 19:06:52.000000000 +0200 @@ -6986,33 +6984,11 @@ case DIALOG_INFO_XML: /* SNOM subscribes in this format */ ast_build_string(&t, &maxbytes, "\n"); ast_build_string(&t, &maxbytes, "\n", p->dialogver++, full ? "full":"partial", mto); - - struct sip_pvt *np = NULL; - if ((state & AST_EXTENSION_RINGING) && global_notifyringing) { - if (!ast_strlen_zero(hint)) { - struct ast_channel *chan = NULL; - while ((chan = ast_channel_walk_locked(chan)) != NULL) { - if (!strncasecmp(chan->name, hint, strlen(hint))) { - np = chan->tech_pvt; - ast_build_string(&t, &maxbytes, "\n", p->exten, np->callid, np->tag, np->theirtag); - ast_build_string(&t, &maxbytes, "%s\n", statestring); - ast_build_string(&t, &maxbytes, "%s\n", p->exten, mfrom, mfrom); - ast_build_string(&t, &maxbytes, "%s\n", np->exten , mto, mto); - ast_mutex_unlock(&chan->lock); - break; - } - ast_mutex_unlock(&chan->lock); - } - if (!np) { - ast_build_string(&t, &maxbytes, "\n", p->exten); - } - } else { - ast_build_string(&t, &maxbytes, "\n", p->exten); - } - } else + if ((state & AST_EXTENSION_RINGING) && global_notifyringing) + ast_build_string(&t, &maxbytes, "\n", p->exten); + else ast_build_string(&t, &maxbytes, "\n", p->exten); - if (!np) - ast_build_string(&t, &maxbytes, "%s\n", statestring); + ast_build_string(&t, &maxbytes, "%s\n", statestring); if (state == AST_EXTENSION_ONHOLD) { ast_build_string(&t, &maxbytes, "\n\n" "\n" @@ -13287,7 +13263,7 @@ error = 1; } - if (!error && p->refer->refer_call->owner->_state != AST_STATE_RINGING && p->refer->refer_call->owner->_state != AST_STATE_RING && p->refer->refer_call->owner->_state != AST_STATE_UP ) { + if (!error && p->refer->refer_call->owner->_state != AST_STATE_RING && p->refer->refer_call->owner->_state != AST_STATE_UP ) { ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-ringing or active call id (%s)!\n", replace_id); transmit_response(p, "603 Declined (Replaces)", req); error = 1;