Bandwidth Control of P2P

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/
exten => 613,2,Dial(IAX2/iaxfwd/613)
exten => 613,3,System(/root/

priority 1 and 2 work well with the /root/ 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 ?


what about

that SHOULD get called when the extension is hung up…

i might be totally wrong though.

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)

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.


i created a context :-

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

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

works a treat.

thanks all