]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't sent in-dialog requests like UPDATE when Asterisk has not yet received a Contac...
authorStefan Schmidt <sst@sil.at>
Wed, 19 Oct 2011 07:15:51 +0000 (07:15 +0000)
committerStefan Schmidt <sst@sil.at>
Wed, 19 Oct 2011 07:15:51 +0000 (07:15 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@341366 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 5d148484f628f2a60e8f6f104cc235e60a783c76..717a152dbc074ce15f8e2da383febba45a9541c2 100644 (file)
@@ -12547,7 +12547,7 @@ static void update_connectedline(struct sip_pvt *p, const void *data, size_t dat
                        ast_set_flag(&p->flags[0], SIP_OUTGOING);
                        p->invitestate = INV_CALLING;
                        send_request(p, &req, XMIT_CRITICAL, p->ocseq);
-               } else if (is_method_allowed(&p->allowed_methods, SIP_UPDATE)) {
+               } else if ((is_method_allowed(&p->allowed_methods, SIP_UPDATE)) && (!ast_strlen_zero(p->okcontacturi))) { 
                        reqprep(&req, p, SIP_UPDATE, 0, 1);
                        add_rpid(&req, p);
                        add_header(&req, "X-Asterisk-rpid-update", "Yes");