[OpenSIPS-Users] Possibilities to handle short duration calls using new capabilities in opensips 3.1

ryan embgrets rembgrets at gmail.com
Thu Jun 25 16:42:59 EST 2020


Thanks, Jon , Bogdan for the assistance.
So, I added the below snippet after the has_totag section of my
configuration.

   if (is_method("BYE") && $si = "192.168.10.20") {
                if ( load_dialog_ctx("$ci") ) {
                        xlog("The dialog $var(callid) has an already
duration of $DLG_lifetime seconds with $DLG_dir\n");
                        if($DLG_lifetime < 10 ) {
                                $DLG_timeout = 10 - $DLG_lifetime ;
                                send_reply(200, "OK");
                                exit;
                        }
                        unload_dialog_ctx();
                }
        }

And it seems to work, I wanted to check if the above snippet looks good?

Is there a way to send bye to only Carrier side?

I see CDRs get written after dialog timeouts, but can I get CDRs with
duration when I receive a bye from the client not on dialog timeout?

Thanks again for your time.

Ryan.





On Wed, 24 Jun 2020 at 17:55, Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:

> Nice one Jon !
>
> doing a ++ here, maybe when loading the dialog ctx (before the match),
> in the call duration is less than 6 secs, you can reply with 200 OK to
> the BYE and set a dialog timeout for whatever number of sec you still
> have to get to the 6 secs duration - so when you get to the overall 6
> secs, OpenSIPS will send the BYEs to both parties.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>    https://www.opensips-solutions.com
>
> On 6/23/20 10:43 PM, Jon Abrams wrote:
> > You may be able to use the load_dialog_ctx()/unload_dialog_ctx()
> > dialog functions to peek at the dialog when a BYE is received, prior
> > to invoking match_dialog(). If it is a BYE from the calling party that
> > you wish to delay, use an async sleep() to delay the call of
> > match_dialog() and relay of the BYE to the far end. I do something
> > similar now in 2.2 with a slightly patched dialog module.
> >
> > - Jon
> >
> >
> > On Tue, Jun 23, 2020 at 1:58 AM ryan embgrets <rembgrets at gmail.com>
> wrote:
> >> Greetings,
> >>
> >> I would like to have awesome community suggestions in handling the
> short duration calls.
> >>
> >> My clients send short duration calls towards opensips.
> >> So if a client sends me BYE within 6 seconds of the call, I would like
> to terminate the client leg and keep carrier leg alive beyond a few
> seconds, either by transferring the second leg(carrier side) to freeswitch,
> or playing some media using rtpengine/rtpproxy at opensips side.
> >>
> >> I would like to ask, is it something that can efficiently be done using
> new capabilities in opensips 3.1?
> >>
> >> How do other people handle this?
> >>
> >> PS: I cannot restrict my client to not send me short duration calls, so
> looking for an opensips way to handle this.
> >>
> >> Ryan
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200625/abbadedf/attachment.html>


More information about the Users mailing list