[OpenSIPS-Users] CANCELing transactions while perl_exec() running

Bogdan-Andrei Iancu bogdan at voice-system.ro
Sun Aug 17 19:27:45 CEST 2008


Hi Alex,

Not sure where the problem is. if your script is still running, it means 
your opensips hasn't yet sent any INVITE out, so nothing is to be 
cancelled - so the received CANCELs are dropped.
Once the INVITE is sent out, the transaction exists and t_check_trans() 
will return true for the CANCEL, so the CANCEL will be sent out to the 
same destination as INVITE.

Regards,
Bogdan

Alex Massover wrote:
>
> Hi!
>
> Here's my logic:
>
> […]
>
> if(is_method("INVITE"))
>
> { if(perl_exec("call_backend")) { …..
>
> […]
>
> if(is_method("CANCEL")) {
>
> if(t_check_trans())
>
> {
>
> if(!t_relay())
>
> {
>
> sl_reply_error();
>
> }
>
> }
>
> exit;
>
> }
>
> The purpose of perl_exec("call_backend") is to authenticate each call, 
> before the call is routed to destination.
>
> I have a following problem - when UAC sends CANCEL while perl_exec is 
> still running. In this case t_check_trans() returns false, and CANCEL 
> is silently dropped, so UAC retransmits CANCEL until timer fires.
>
> I wonder how I can correctly process CANCEL for transaction while 
> perl_exec is still running?
>
> AFAIU, if I just reply with 200 to CANCEL it's not good, because the 
> when perl_exec exits the transactions will be continued. And if I 
> remove t_check_trans() it also will make no good.
>
> Probably I need to reply with 200 but really stop this transaction 
> from been continued after perl_exec, but I can't figure out how to do it.
>
> --
>
> Best Regards,
>
> Alex Massover
>
>
>
>
>
> ************************************************************************************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals & 
> computer viruses.
> ************************************************************************************
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list