diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-08 01:14:31 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-08 01:14:31 +0000 |
commit | 0d08d6054a0e2308e7c76137298e81b75618aa53 (patch) | |
tree | cb5c913584e35abe0a365ed0379ca4eed8e1a5e6 | |
parent | 1101f70bd7f47a87017dfaaecfccc0ca1a4a35f2 (diff) |
Merged revisions 89097 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89097 | file | 2007-11-07 21:11:25 -0400 (Wed, 07 Nov 2007) | 8 lines
Add support for allowing one outgoing transaction. This means if a response comes back out of order chan_sip will still handle it. I dream of a chan_sip with real transaction support.
(closes issue #10946)
Reported by: flefoll
(closes issue #10915)
Reported by: ramonpeek
(closes issue #9567)
Reported by: atca_pres
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89098 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index adfa2cead..e84dd20de 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1041,6 +1041,7 @@ struct sip_pvt { ast_group_t callgroup; /*!< Call group */ ast_group_t pickupgroup; /*!< Pickup group */ int lastinvite; /*!< Last Cseq of invite */ + int lastnoninvite; /*!< Last Cseq of non-invite */ struct ast_flags flags[2]; /*!< SIP_ flags */ /* boolean or small integers that don't belong in flags */ @@ -8055,6 +8056,8 @@ static int transmit_notify_with_sipfrag(struct sip_pvt *p, int cseq, char *messa if (!p->initreq.headers) initialize_initreq(p, &req); + p->lastnoninvite = p->ocseq; + return send_request(p, &req, XMIT_RELIABLE, p->ocseq); } @@ -16220,10 +16223,10 @@ static int handle_incoming(struct sip_pvt *p, struct sip_request *req, struct so */ int ret = 0; - if (p->ocseq < seqno) { + if (p->ocseq < seqno && seqno != p->lastnoninvite) { ast_debug(1, "Ignoring out of order response %d (expecting %d)\n", seqno, p->ocseq); ret = -1; - } else if (p->ocseq != seqno) { + } else if (p->ocseq != seqno && seqno != p->lastnoninvite) { /* ignore means "don't do anything with it" but still have to * respond appropriately. * But in this case this is a response already, so we really |