Hi Bogdan I developed a billing mecanism to control how long calls can last, so I need to keep tracking all calls until they hangup. Every X seconds, I check all calls on Opensips and hangup some of them if necessary.
For some reason (maybe a bug), some random calls (1 in a 1M or more) still exist in my mecanism after call is hangup, so I try to hangup this call using terminate_dlg() and wait until I receive a trigger from dialog module, confirming that it is finalized. In fact, I never receive the trigger from dialog module, because the call no longer exist and I have no way to check this. I think just changing the terminate_dlg function to return any number that identifies this dialog is no longer valid, it's OK to me and I can remove this call from my structure. A possibility to check if call is UP would be even better. What do you think can be done? Thanks for responding. On Thu, Jul 14, 2016 at 1:18 PM, Bogdan-Andrei Iancu <[email protected]> wrote: > Hi Daniel, > > Indeed, there is none. Why is so important to know if the dialog really > existed ? you want to know if it was terminated by YOU and not by something > else prior to your terminate_dlg() ? > > We may consider returning a different positive code if no dialog was found. > > Regards, > > Bogdan-Andrei Iancu > OpenSIPS Founder and Developerhttp://www.opensips-solutions.com > > On 13.07.2016 21:21, Daniel Zanutti wrote: > > Hi > > Anyone could please help on this? > > Thanks > > > On Mon, Jul 11, 2016 at 3:23 PM, Daniel Zanutti <[email protected]> > wrote: > >> Hi >> >> I need to confirm if a call is UP and terminate it from my code. I have >> previously stored callid, h_entry and h_id on an internal list, so I'm >> executing at a specific time: >> >> dlg_api.terminate_dlg(h_entry, h_id); >> >> If the call is still running, it works nicely and hangup the call. If >> there is a problem, I get a negative value and solve too. The problem is if >> the call is not up anymore, I get a return == 0. This is the code of >> terminate_dlg function: >> >> struct dlg_cell * dlg = NULL; >> >> dlg = lookup_dlg(h_entry, h_id); >> >> if(!dlg) >> return 0; >> >> This function "lookup_dlg" isn't exported. >> >> Is there anyway to confirm if the call is still running, if I have these >> values Callid, h_entry and h_id? >> >> Thanks! >> >> > > > _______________________________________________ > Devel mailing > [email protected]http://lists.opensips.org/cgi-bin/mailman/listinfo/devel > > >
_______________________________________________ Devel mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
