Browse code

core: new callback when UAC/UAS transaction is finished

Václav Kubart authored on 13/03/2014 12:44:39
Showing 2 changed files
... ...
@@ -457,6 +457,7 @@ void AmBasicSipDialog::onRxReply(const AmSipReply& reply)
457 457
       (reply.code >= 300))) {
458 458
        
459 459
     uac_trans.erase(t_it);
460
+    if (hdl) hdl->onTransFinished();
460 461
   }
461 462
 }
462 463
 
... ...
@@ -538,6 +539,7 @@ void AmBasicSipDialog::onReplyTxed(const AmSipRequest& req,
538 539
       (reply.cseq_method != SIP_METH_CANCEL)) {
539 540
     
540 541
     uas_trans.erase(reply.cseq);
542
+    if (hdl) hdl->onTransFinished();
541 543
   }
542 544
 }
543 545
 
... ...
@@ -551,6 +553,7 @@ void AmBasicSipDialog::onRequestTxed(const AmSipRequest& req)
551 553
   }
552 554
   else {
553 555
     uac_trans.erase(req.cseq);
556
+    if (hdl) hdl->onTransFinished();
554 557
   }
555 558
 }
556 559
 
... ...
@@ -456,6 +456,10 @@ class AmBasicSipEventHandler
456 456
    */
457 457
   virtual void onFailure() {}
458 458
 
459
+  // called upon finishing either UAC or UAS transaction
460
+  virtual void onTransFinished() { }
461
+
462
+
459 463
   virtual ~AmBasicSipEventHandler() {}
460 464
 };
461 465