1

Topic: stsproxy new feature request

MH , It would be nice to make an autorotation script for the channels ,
so this script would be able to stop those trunks which ran out of traffic / minute / credit .
i've written something already using bash , it's not the most efficient way though , but still it's better than nothing .
this way you can for instance start n skype channels at once , and when it finished it'll stop it , and start another configured channel .
what it lacks i guess , is that , it should be able to delete the trunk's stsProxy registration entry , so that sts proxy wouldn't wait to update it .
actually i don't know exactly how stsProxy works ,
thank you mh in advance .
the script isn't commented at all , but it's self explanatory if you needed some explanation about it , email me , thank you .

2

Re: stsproxy new feature request

Why do you need to stop the exhausted channel? stsProxy will skip over it if it gets the 480 response. I guess if you have a lot of exhausted channels maybe the delay is excessive?

stsProxy could be changed to remove the registration entry of the exhausted channel which would stop it from using that channel until it registers again.

3

Re: stsproxy new feature request

i need to stop the exhausted channel , because it's no use for me anymore .
and it uses cpu/memory .
i don't know why , but when i leave the system working for instance a day , memory/cpu usages rises , drastically .
so iwant it to stop exhausted channels , and start new channels instead .
i'll be greatful if you teach me how to remove exhausted channel from stsProxy registration database.

4

Re: stsproxy new feature request

You need to change the stsProxy code - changing the database won't work since it won't get read in until stsProxy is restarted.

Basic code would be:
if (status==480)
   location_service.removeUserContact(user,url);

user/url will have to be extracted from the current request.

You could reduce the registration expiration time so it will be removed sooner.
In the siptosis config files change:
expires=300  (5 minutes)
If a channel doesn't register within the 5 minutes, stsProxy will remove it by itself.


If you try this, you might want to change stsproxy.cfg
channelTestMs=1000
to
channelTestMs=500
Or whatever is acceptable.

Another change to stsProxy would be good - remove detected dead channel from database.

5

Re: stsproxy new feature request

MH wrote:

You need to change the stsProxy code - changing the database won't work since it won't get read in until stsProxy is restarted.

Basic code would be:
if (status==480)
   location_service.removeUserContact(user,url);

user/url will have to be extracted from the current request.

You could reduce the registration expiration time so it will be removed sooner.
In the siptosis config files change:
expires=300  (5 minutes)
If a channel doesn't register within the 5 minutes, stsProxy will remove it by itself.


If you try this, you might want to change stsproxy.cfg
channelTestMs=1000
to
channelTestMs=500
Or whatever is acceptable.

Another change to stsProxy would be good - remove detected dead channel from database.

I'll try to do it on my test box
so what i get is that i should add something like :
if (status==480)
   location_service.removeUserContact(user,url);
to STSProxy.java , code .
also
this question came to my mind , what does changing this:

You could reduce the registration expiration time so it will be removed sooner.
In the siptosis config files change:
expires=300  (5 minutes)

would do ?.

6

Re: stsproxy new feature request

I made up some code to do this. I'll send it to you via email. It is not tested. Read the changes.txt to setup the new parameters.

A SIP registration expires after some time period. By lowering the siptosis registration with stsProxy it will cause removal of a channel that you have stopped sooner.

7

Re: stsproxy new feature request

MH wrote:

I made up some code to do this. I'll send it to you via email. It is not tested. Read the changes.txt to setup the new parameters.

A SIP registration expires after some time period. By lowering the siptosis registration with stsProxy it will cause removal of a channel that you have stopped sooner.

thank you so much MH.
i'll test it , and give you the feedback.

8

Re: stsproxy new feature request

Change of plan - get it from the public downloads.

9

Re: stsproxy new feature request

new release ?
should i change anything then ?

10

Re: stsproxy new feature request

Add the two new parameters to stsproxy.cfg:
removeRegStatusCodes=480
removeDeadChannels=yes

Not setting them give previous behavior.

11

Re: stsproxy new feature request

thank you MH .  I'll test it in the morning ( it's already 2200 here ).
I'll write if i run into trouble .

12

Re: stsproxy new feature request

I managed to test it. Get the 20100109b version - it works. The prior one has some problems.