Bandwidth Control of P2P


#1

I am running Asterisk and mldonkey P2P app on my server and want to control the bandwidth of mldonkey when I am making or receiving a SIP/IAX call.

So far I have this :-

exten => 613,1,System(/root/mldonkey-slow.sh)
exten => 613,2,Dial(IAX2/iaxfwd/613)
exten => 613,3,System(/root/mldonkey-fast.sh)

priority 1 and 2 work well with the /root/mldonkey-slow.sh script slowing down mldonkey to 1kb up / 1kb down then dialing.
the echo test goes well.

but , priority 3 never activates as the dial command completes the context.

any ideas I can use to restore the normal P2P settings when no SIP/IAX is in progress ?

Thanks


#2

what about

that SHOULD get called when the extension is hung up…

i might be totally wrong though.


#3

Thanks whoiswes , I couldn`t find any references to that in the “Asterisk - The Future of Telephony book” and I get this error on a reload

WARNING[30282]: pbx_config.c:1700 pbx_load_module: Invalid priority/label 'h' at line 126

I have found that this works , so long as you end the call with the * key :-

exten => 613,2,Dial(IAX2/iaxfwd/613,10,hHg)

#4

h isn’t the priority it is the extension.

however - why not get somethign that intelligently filters the packets to/from the network (in place of in addition). If you have a basic SOHO setup, you could look at something like the dlink DI-102 which works great. If you have more of a business environement (real routers, etc.) then you may want to off load everything but the phone system from your asterisk box anyhow, and in addition, you probably have other QoS abilities in your router setup that you could deploy.

p


#5

i created a context :-

[hangup]
exten => h,1,System(${MLDONKEY-FAST})

so whenever a call is finished the mldonkey-fast script is called.

works a treat.

thanks all