Re: [OpenSIPS-Users] Handle end of a transaction/dialog

2010-12-02 Thread Bogdan-Andrei Iancu

Hi Anton,

a.zagors...@oyster-telecom.ru wrote:

So, you explained how to store and grouping counters. Thanks.
But how to catch the moment when the opensips transaction is going 
down? I need to react immediately.
when a dialog ends, opensips automatically removes it from the profile, 
so the profile size goes one unit down...You do not have anything to do 
about this..



Regards,
Bogdan


I can catch a BYE request when a established sip session is ending. 
What about other cases?



On Fri, 19 Nov 2010 09:27:38 -0800
 Dave Singer  wrote:
You can use a combination of the following dialog profiles (grouping 
calls)

functions for this:
get_profile_size(profile,[value],size) 


Check
if a prifile is at limit.
set_dlg_profile(profile,[value]) 


If
not at limit, increment the count for the profile (NOTE the value 
option is

not actually supported yet)
unset_dlg_profile(profile,[value]) 


If
need to remove from a profile like carrier failover
is_in_profile(profile,[value]) 


Not
sure this would be needed but...

When a call ends it will automatically be removed from any profiles 
it was

part of.

On Fri, Nov 19, 2010 at 1:29 AM, Anton Zagorskiy <
a.zagors...@oyster-telecom.ru> wrote:

Nobody uses limitation on amount of established sessions?  I don't 
believe!

=)






WBR, Anton Zagorskiy
VoIP Developer, Oyster Telecom
Phone.: +7 812 601-0666
Fax: +7 812 601-0593
a.zagors...@oyster-telecom.ru
www.oyster-telecom.ru



> -Original Message-
> From: users-boun...@lists.opensips.org [mailto:users-
> boun...@lists.opensips.org] On Behalf Of Anton Zagorskiy
> Sent: Thursday, November 18, 2010 4:58 PM
> To: 'OpenSIPS users mailling list'
> Subject: [OpenSIPS-Users] Handle end of a transaction/dialog
>
> Hello.
>
> I need to control how much SIP dialogs (established or pending) has
> each
> domain. If that value is equal to certain constant then I should drop
> any
> new INVITE from that domain.
> There is no problem with catching initial requests, but with
> terminating.
> How can I control that an openSIPS transaction is in the terminating
> stage?
>
>
>
>
>
>
> WBR, Anton Zagorskiy
> VoIP Developer, Oyster Telecom
> Phone.: +7 812 601-0666
> Fax: +7 812 601-0593
> a.zagors...@oyster-telecom.ru
> www.oyster-telecom.ru
>
>
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Handle end of a transaction/dialog

2010-11-22 Thread Dave Singer
I'm not shure exactly when the automatick removal from groups is, you would
have to expiriment.
There are only a few end of call situations to cover.
   Bye after a call was accepted (200 OK to INVITE). That comes in main
routing block but would usually be forwarded in the loose_route section. Add
an if (is_method("BYE")) and put logic there.
   Cancel. That also comes in main routing block and is usually handled just
below the has_totag() stuff. Find is_method("CANCEL"). You would add it to
the if (t_check_trans())
   Failures. Handled in the failure route block you activated for the call
with t_on_failure("?")
In each section, just use the unset_dlg_profile function for the group it
would be in.
Be careful with the BYE as it can come from either side of the call and
depending on what your grouping formula is based on you might need to make a
special case depending which end the BYE came from. I haven't looked at BYE
packets much. You may want to use
store_dlg_value(name,val)
to
sore the group to pull it out at BYE with
fetch_dlg_value(name,pvar)
.

On Fri, Nov 19, 2010 at 3:16 PM,  wrote:

> So, you explained how to store and grouping counters. Thanks.
> But how to catch the moment when the opensips transaction is going down? I
> need to react immediately.
>
> I can catch a BYE request when a established sip session is ending. What
> about other cases?
>
>
>
> On Fri, 19 Nov 2010 09:27:38 -0800
>  Dave Singer  wrote:
>
>> You can use a combination of the following dialog profiles (grouping
>> calls)
>> functions for this:
>> get_profile_size(profile,[value],size)<
>> http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294302>
>>
>> Check
>> if a prifile is at limit.
>> set_dlg_profile(profile,[value])<
>> http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294092>
>>
>> If
>> not at limit, increment the count for the profile (NOTE the value option
>> is
>> not actually supported yet)
>> unset_dlg_profile(profile,[value])<
>> http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294162>
>>
>> If
>> need to remove from a profile like carrier failover
>> is_in_profile(profile,[value])<
>> http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294231>
>>
>> Not
>> sure this would be needed but...
>>
>> When a call ends it will automatically be removed from any profiles it was
>> part of.
>>
>> On Fri, Nov 19, 2010 at 1:29 AM, Anton Zagorskiy <
>> a.zagors...@oyster-telecom.ru> wrote:
>>
>>  Nobody uses limitation on amount of established sessions?  I don't
>>> believe!
>>> =)
>>>
>>>
>>>
>>>
>>>
>>>
>>> WBR, Anton Zagorskiy
>>> VoIP Developer, Oyster Telecom
>>> Phone.: +7 812 601-0666
>>> Fax: +7 812 601-0593
>>> a.zagors...@oyster-telecom.ru
>>> www.oyster-telecom.ru
>>>
>>>
>>>
>>> > -Original Message-
>>> > From: users-boun...@lists.opensips.org [mailto:users-
>>> > boun...@lists.opensips.org] On Behalf Of Anton Zagorskiy
>>> > Sent: Thursday, November 18, 2010 4:58 PM
>>> > To: 'OpenSIPS users mailling list'
>>> > Subject: [OpenSIPS-Users] Handle end of a transaction/dialog
>>> >
>>> > Hello.
>>> >
>>> > I need to control how much SIP dialogs (established or pending) has
>>> > each
>>> > domain. If that value is equal to certain constant then I should drop
>>> > any
>>> > new INVITE from that domain.
>>> > There is no problem with catching initial requests, but with
>>> > terminating.
>>> > How can I control that an openSIPS transaction is in the terminating
>>> > stage?
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > WBR, Anton Zagorskiy
>>> > VoIP Developer, Oyster Telecom
>>> > Phone.: +7 812 601-0666
>>> > Fax: +7 812 601-0593
>>> > a.zagors...@oyster-telecom.ru
>>> > www.oyster-telecom.ru
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > ___
>>> > Users mailing list
>>> > Users@lists.opensips.org
>>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Handle end of a transaction/dialog

2010-11-19 Thread a.zagorskiy
So, you explained how to store and grouping counters. 
Thanks.
But how to catch the moment when the opensips transaction 
is going down? I need to react immediately.


I can catch a BYE request when a established sip session 
is ending. What about other cases?



On Fri, 19 Nov 2010 09:27:38 -0800
 Dave Singer  wrote:
You can use a combination of the following dialog 
profiles (grouping calls)

functions for this:
get_profile_size(profile,[value],size)
Check
if a prifile is at limit.
set_dlg_profile(profile,[value])
If
not at limit, increment the count for the profile (NOTE 
the value option is

not actually supported yet)
unset_dlg_profile(profile,[value])
If
need to remove from a profile like carrier failover
is_in_profile(profile,[value])
Not
sure this would be needed but...

When a call ends it will automatically be removed from 
any profiles it was

part of.

On Fri, Nov 19, 2010 at 1:29 AM, Anton Zagorskiy <
a.zagors...@oyster-telecom.ru> wrote:

Nobody uses limitation on amount of established 
sessions?  I don't believe!

=)






WBR, Anton Zagorskiy
VoIP Developer, Oyster Telecom
Phone.: +7 812 601-0666
Fax: +7 812 601-0593
a.zagors...@oyster-telecom.ru
www.oyster-telecom.ru



> -Original Message-
> From: users-boun...@lists.opensips.org [mailto:users-
> boun...@lists.opensips.org] On Behalf Of Anton 
Zagorskiy

> Sent: Thursday, November 18, 2010 4:58 PM
> To: 'OpenSIPS users mailling list'
> Subject: [OpenSIPS-Users] Handle end of a 
transaction/dialog

>
> Hello.
>
> I need to control how much SIP dialogs (established or 
pending) has

> each
> domain. If that value is equal to certain constant 
then I should drop

> any
> new INVITE from that domain.
> There is no problem with catching initial requests, 
but with

> terminating.
> How can I control that an openSIPS transaction is in 
the terminating

> stage?
>
>
>
>
>
>
> WBR, Anton Zagorskiy
> VoIP Developer, Oyster Telecom
> Phone.: +7 812 601-0666
> Fax: +7 812 601-0593
> a.zagors...@oyster-telecom.ru
> www.oyster-telecom.ru
>
>
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Handle end of a transaction/dialog

2010-11-19 Thread Dave Singer
You can use a combination of the following dialog profiles (grouping calls)
functions for this:
get_profile_size(profile,[value],size)
Check
if a prifile is at limit.
set_dlg_profile(profile,[value])
If
not at limit, increment the count for the profile (NOTE the value option is
not actually supported yet)
unset_dlg_profile(profile,[value])
If
need to remove from a profile like carrier failover
is_in_profile(profile,[value])
Not
sure this would be needed but...

When a call ends it will automatically be removed from any profiles it was
part of.

On Fri, Nov 19, 2010 at 1:29 AM, Anton Zagorskiy <
a.zagors...@oyster-telecom.ru> wrote:

> Nobody uses limitation on amount of established sessions?  I don't believe!
> =)
>
>
>
>
>
>
> WBR, Anton Zagorskiy
> VoIP Developer, Oyster Telecom
> Phone.: +7 812 601-0666
> Fax: +7 812 601-0593
> a.zagors...@oyster-telecom.ru
> www.oyster-telecom.ru
>
>
>
> > -Original Message-
> > From: users-boun...@lists.opensips.org [mailto:users-
> > boun...@lists.opensips.org] On Behalf Of Anton Zagorskiy
> > Sent: Thursday, November 18, 2010 4:58 PM
> > To: 'OpenSIPS users mailling list'
> > Subject: [OpenSIPS-Users] Handle end of a transaction/dialog
> >
> > Hello.
> >
> > I need to control how much SIP dialogs (established or pending) has
> > each
> > domain. If that value is equal to certain constant then I should drop
> > any
> > new INVITE from that domain.
> > There is no problem with catching initial requests, but with
> > terminating.
> > How can I control that an openSIPS transaction is in the terminating
> > stage?
> >
> >
> >
> >
> >
> >
> > WBR, Anton Zagorskiy
> > VoIP Developer, Oyster Telecom
> > Phone.: +7 812 601-0666
> > Fax: +7 812 601-0593
> > a.zagors...@oyster-telecom.ru
> > www.oyster-telecom.ru
> >
> >
> >
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Handle end of a transaction/dialog

2010-11-19 Thread Anton Zagorskiy
Nobody uses limitation on amount of established sessions?  I don't believe!
=)






WBR, Anton Zagorskiy
VoIP Developer, Oyster Telecom
Phone.: +7 812 601-0666
Fax: +7 812 601-0593
a.zagors...@oyster-telecom.ru
www.oyster-telecom.ru



> -Original Message-
> From: users-boun...@lists.opensips.org [mailto:users-
> boun...@lists.opensips.org] On Behalf Of Anton Zagorskiy
> Sent: Thursday, November 18, 2010 4:58 PM
> To: 'OpenSIPS users mailling list'
> Subject: [OpenSIPS-Users] Handle end of a transaction/dialog
> 
> Hello.
> 
> I need to control how much SIP dialogs (established or pending) has
> each
> domain. If that value is equal to certain constant then I should drop
> any
> new INVITE from that domain.
> There is no problem with catching initial requests, but with
> terminating.
> How can I control that an openSIPS transaction is in the terminating
> stage?
> 
> 
> 
> 
> 
> 
> WBR, Anton Zagorskiy
> VoIP Developer, Oyster Telecom
> Phone.: +7 812 601-0666
> Fax: +7 812 601-0593
> a.zagors...@oyster-telecom.ru
> www.oyster-telecom.ru
> 
> 
> 
> 
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users