[Spce-user] R: Doubt in call peers routing

Alessandro Bolletta alessandro at mediaspot.net
Wed Aug 19 09:21:00 EDT 2015

Yes, you are sure but my mobile phone forgot CC's :)

However, thanks for your support at the moment.

Now everything it's more clear. I'll try to setup it as I explained on these days.

Alessandro Bolletta
Mediaspot Srl

-----Messaggio originale-----
Da: Daniel Grotti [mailto:dgrotti at sipwise.com] 
Inviato: mercoledì 19 agosto 2015 11.28
A: Alessandro Bolletta <alessandro at mediaspot.net>
Cc: spce-user at lists.sipwise.com
Oggetto: Re: [Spce-user] Doubt in call peers routing

Hi Alessandro,
please remember to reply to the list always.

If you want to do a static and predicted failover, so try peer1 then
peer2 then peer3 always you have to create 3 peering group with 1 peering server each. And then set the PRIORITY to each peering group, so the system wll try first the group with highest priority then the other accordingly to the priority value.

403 Does not trigger a failover by default.
By default the codes triggering a failover are 408, 500, 503:

from /etc/ngcp-config/templates/etc/kamailio/proxy/proxy.cfg.tt2

xlog("L_INFO", "Filter reply code - S=$rs SS='$rr' M=$rm R=$ru F=$fu T=$tu IP=$avp(s:ip):$avp(s:port)($si:$sp) UAIP=$si UA='$ua' ID=$ci \n");
                xlog("L_NOTICE", "No failover routing needed for this response code - S=$rs SS='$rr' M=$rm R=$ru F=$fu T=$tu
IP=$avp(s:ip):$avp(s:port)($si:$sp) UAIP=$si UA='$ua' ID=$ci \n");

If you want to trigger a failover with 403, you should add 403 (or other
codes) in that list, for instance:


remeber to create a proxy.cfg.customtt.tt2 file and apply your changes.

Daniel Grotti
VoIP Engineer

Sipwise GmbH
Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

On 08/19/2015 10:36 AM, Alessandro Bolletta wrote:
> Hi Daniel,
> So how I could reproduce a simple failover (try the first, then the 
> second, then... When the first, second, etc. are always the same) in 
> sipwise?
> Then, why I noticed that a 403 forbidden message by the peer stops the 
> call, while Sipwise should try the second peer before considering it dead?
> --
> Alessandro Bolletta
> Mediaspot Srl
> *Da:* Daniel Grotti <dgrotti at sipwise.com>
> *Inviato:* 19/ago/2015 01:01
> *A:* Alessandro Bolletta
> *Cc:* spce-user at lists.sipwise.com
> *Oggetto:* Re: [Spce-user] Doubt in call peers routing
> Hi Alessandro,
> Weights just define a probability that the peer is used in general. 
> Does not mean the peer with highest weight will be the fisrt one 
> always, neither that the second will be the one with lowest weight. It 
> just a statistic.
> If the first peer fails, it goes to the second in the list loaded by 
> kamailio.
> You can check more info about Weights by looking at the lcr module of
> kamailio:
> http://kamailio.org/docs/modules/4.0.x/modules/lcr.html
> Daniel
> On Aug 18, 2015 8:03 PM, Alessandro Bolletta 
> <alessandro at mediaspot.net>
> wrote:
>> Hi,
>> I'm using Sipwise from 2 months and everything is going great, but there are still some things that are not clear to me:
>> -          When I set the Weight on a peer, which is routing choice' logic? Calls will be *always* forwarded to the higher value weighted peer? Or they will be distributed in a round-robin fashion?
>> -          When the first peer which Sipwise try to use for the call is unavailable or, for example, returns a 403 error code (forbidden) or whatever code which is not 200 OK, why Sipwise doesn't try to route the call towards the second peer, following the weight logic?
>> Thanks in advance,
>> Alessandro

More information about the Spce-user mailing list