Juha,

it was definitely not broken on purpose. I think, though, it's more
correct to evaluate onRxReplyStatus, but act only if the B2BUA call is
connected (as does the sbc app). I've pushed this simple fix for it:

97c135c b/f:b2bua: fix negative replies in ivr/dsm b2bua calls

which should affect both dsm and ivr apps; I've tried with you
example. Btw, do you want to add your script as an ivr example?

Thanks,
Stefan

Juha Heinanen wrote on 06/08/2015 10:35 PM:
> As I mentioned long time ago, it is not currently possible to catch
> negative replies from the other leg of b2bua call in ivr scripts nor dsm
> diags unless sbc is used.  The whole call gets terminated,
> 
> This used to work earlier but was broken perhaps on purpose.  In order
> to keep my old apps working and being able to write new ones without
> sbc, I have used the patch below.  I don't know if this patch could go
> in to 1.6.
> 
> -- Juha
> 
> *** /usr/src/orig/sems/core/AmSipDialog.cpp   Wed Dec 10 11:26:44 2014
> --- core/AmSipDialog.cpp      Wed Dec 10 13:08:34 2014
> ***************
> *** 435,451 ****
>       oa.onReplyIn(reply);
>     }
>   
> -   bool cont = true;
>     if( (reply.code >= 200) && (reply.code < 300) &&
>         (reply.cseq_method == SIP_METH_INVITE) ) {
>   
>       if(hdl) ((AmSipDialogEventHandler*)hdl)->onInvite2xx(reply);
>   
>     } else {
> !     cont = AmBasicSipDialog::onRxReplyStatus(reply);
>     }
>   
> !   return cont && rel100.onReplyIn(reply);
>   }
>     
>   void AmSipDialog::uasTimeout(AmSipTimeoutEvent* to_ev)
> --- 435,454 ----
>       oa.onReplyIn(reply);
>     }
>   
>     if( (reply.code >= 200) && (reply.code < 300) &&
>         (reply.cseq_method == SIP_METH_INVITE) ) {
>   
>       if(hdl) ((AmSipDialogEventHandler*)hdl)->onInvite2xx(reply);
>   
>     } else {
> !     if (status == Connected) {
> !       (void)AmBasicSipDialog::onRxReplyStatus(reply);
> !     } else {
> !       DBG("Skipping call of AmBasicSipDialog::onRxReplyStatus\n");
> !     }
>     }
>   
> !   return rel100.onReplyIn(reply);
>   }
>     
>   void AmSipDialog::uasTimeout(AmSipTimeoutEvent* to_ev)
> _______________________________________________
> Semsdev mailing list
> [email protected]
> http://lists.iptel.org/mailman/listinfo/semsdev
> 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to