Defer sending the connected line reinvite if a reinvite is already in progress.
authorJoshua Colp <jcolp@digium.com>
Mon, 5 Mar 2012 16:44:16 +0000 (16:44 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 5 Mar 2012 16:44:16 +0000 (16:44 +0000)
(issue ASTERISK-19355)
Reported by: tomaso

(closes issue AST-825)
........

Merged revisions 358162 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358163 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358164 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 861350b..f6ce9e9 100644 (file)
@@ -13434,7 +13434,7 @@ static void update_connectedline(struct sip_pvt *p, const void *data, size_t dat
        if (ast_channel_state(p->owner) == AST_STATE_UP || ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
                struct sip_request req;
 
-               if (p->invitestate == INV_CONFIRMED || p->invitestate == INV_TERMINATED) {
+               if (!p->pendinginvite && (p->invitestate == INV_CONFIRMED || p->invitestate == INV_TERMINATED)) {
                        reqprep(&req, p, ast_test_flag(&p->flags[0], SIP_REINVITE_UPDATE) ? SIP_UPDATE : SIP_INVITE, 0, 1);
 
                        add_header(&req, "Allow", ALLOWED_METHODS);