summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith <keith@rhizomatica.org>2019-08-06 17:50:20 +0200
committerkeith <keith@rhizomatica.org>2019-08-06 17:40:17 +0000
commit5f79d5a3195e152c233685eb75f5a9e50f7d3006 (patch)
tree3d2bef555aba321360c2516eb4b995e0cae80399
parenta5b65505f92ffff1227f3c3a3fca10b797463828 (diff)
Fix bug with MO calls not connecting.
Fixes a bug I introduced in 5f73c2033b6b4e690f30292020d7361f48b5f2c2 where we would not call mncc_call_leg_connect() on receiving 200 from SIP side, and therefore never send MNCC_SETUP_RSP to the MS Fixes: 5f73c2033b6b4e690f30292020d7361f48b5f2c2 Change-Id: Ic7cc56c0d68a27eb1229c0c4aa1fa54d00b660b6
-rw-r--r--src/sip.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sip.c b/src/sip.c
index b652b4b..4eb7689 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -332,11 +332,13 @@ void nua_callback(nua_event_t event, int status, char const *phrase, nua_t *nua,
if (status == 180 || status == 183)
call_progress(leg, sip, status);
else if (status == 200) {
- struct sip_call_leg *leg = sip_find_leg(nh);
- if (leg)
+ if (leg->state == SIP_CC_CONNECTED || leg->state == SIP_CC_HOLD) {
+ /* This 200 is a response to our re-INVITE on
+ * a connected call. We just need to ACK it. */
nua_ack(leg->nua_handle, TAG_END());
- else
+ } else {
call_connect(leg, sip);
+ }
}
else if (status >= 300) {
struct call_leg *other = call_leg_other(&leg->base);