* You are viewing the archive for the ‘Asterisk Tips’ Category

Outbound Call Load Balancing

Due to high volume of outbound calls you might be asked to alternate the outbound traffic by your termination provider.

Basically, what what you need to do here is: Having 2 destinations (Dst_A, Dst_B), check/set a variable in the AstDB. Then if the variable is 1, set it to 2 and route via Dst_A; otherwise, set it to 1 and route via Dst_B.

This code snippet might be what  you are looking for:

GotoIf(${SET(DB(sw/provider)=$[!0${DB(sw/provider)}])}?Dst_A:Dst_B)

 

Maybe in a future you might want to think in another approach to this task, but in the meantime this might come in handy.

Starting things off without a Dial Tone

Is it possible to make Asterisk jump into action and play a sound file as soon as a handset is lifted, instead of providing a Dial Tone and waiting for the user to dial an extension.

With analog phones (chan_dahdi) – you just have to set ‘immediate = yes’ in chan_dahdi.conf , with a SIP phone: that’s something to configure the handset for, as it only sends out a call once you “dialed”.

 

Thanks to: Tzafrir Cohen