[Spce-user] Best way of restarting kamailio?

Andreas Granig agranig at sipwise.com
Tue Oct 6 05:10:06 EDT 2015


Hi,

kamailio lb is completely stateless, and kamailio proxy is only
transaction stateful. In case a BYE comes in after restart, it's routed
according to Route/Record-Route infos in the SIP message itself, no
issue here. If a BYE comes in while kamailio is down due to restart
(which usually just takes some seconds), the endpoints will or should
re-transmit the messages.

Having said that, there is a small risk of an endpoint getting a
100-Trying for a BYE from the proxy, making it stop to retransmit, and
then the proxy shuts down for restart. In that case, the endpoint would
wait for a 200, which will never arrive, so it's up to the endpoint how
to handle that timeout.

Andreas

On 10/05/2015 05:01 PM, Daniel Grotti wrote:
> for sure, yes.
> 
> --
> Daniel Grotti
> VoIP Engineer
> 
> 
> Sipwise GmbH
> Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
> 
> On 10/05/2015 04:59 PM, Marco Teixeira wrote:
>> I miss explained me... When the proxy is back up, will it correspond
>> that BYE with the initial INVITE (before the restart) ?
>> (i'm just not sure if the dialogs are statefull or stateless... i'm
>> using default setup in 3.8.3 LTS that does topology hidding)
>>
>> ​=Marco
>>
>>
>> On Mon, Oct 5, 2015 at 3:54 PM, Daniel Grotti <dgrotti at sipwise.com
>> <mailto:dgrotti at sipwise.com>> wrote:
>>
>>     if the BYE get lost and does not raech the proxy because it's down yes,
>>     but, the other side won't receive the BYE as well, so most likely he
>>     will close the call too, so probably this BYE will reach the proxy.
>>
>>     It is always recommended to restart proxy during a maintenance window if
>>     you are having high traffic.
>>
>>
>>     --
>>     Daniel Grotti
>>     VoIP Engineer
>>
>>
>>     Sipwise GmbH
>>     Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
>>     <http://www.sipwise.com>
>>
>>     On 10/05/2015 03:59 PM, Marco Teixeira wrote:
>>     > Just for clarification.... after that restart, for an ongoing call, when
>>     > one of the call legs sends the BYE, will it be correctly registered
>>     > against the call ?
>>     > I mean, will the CDR for those calls be correct ?
>>     >
>>     >
>>     > ​=Marco
>>     >
>>     >
>>     >
>>     > On Mon, Oct 5, 2015 at 2:32 PM, Daniel Grotti <dgrotti at sipwise.com <mailto:dgrotti at sipwise.com>
>>     > <mailto:dgrotti at sipwise.com <mailto:dgrotti at sipwise.com>>> wrote:
>>     >
>>     >     Hi,
>>     >     If you need to restart kamailio, theonly way is
>>     >     /etc/init.d/kamailio-proxy restart (or /kamailio-lb).
>>     >
>>     >     You will not loose the already connected calls, cause they are on RTP
>>     >     already. You may have some retransmission reagarding establishing calls,
>>     >     since your are tearing down proxy for few seconds.
>>     >
>>     >
>>     >
>>     >     --
>>     >     Daniel Grotti
>>     >     VoIP Engineer
>>     >
>>     >
>>     >     Sipwise GmbH
>>     >     Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com <http://www.sipwise.com>
>>     >     <http://www.sipwise.com>
>>     >
>>     >     On 10/03/2015 09:25 PM, Marco Teixeira wrote:
>>     >     > Hi,
>>     >     >
>>     >     > Need to restart kamailio.
>>     >     > What is the safest way, to avoid having sessions hanged, and wrong
>>     >     CDR's ?
>>     >     >
>>     >     > ---
>>     >     > ​B​
>>     >     > est regards
>>     >     > Marco
>>     >     >
>>     >     >
>>     >     >
>>     >     > _______________________________________________
>>     >     > Spce-user mailing list
>>     >     > Spce-user at lists.sipwise.com
>>     <mailto:Spce-user at lists.sipwise.com>
>>     <mailto:Spce-user at lists.sipwise.com
>>     <mailto:Spce-user at lists.sipwise.com>>
>>     >     > https://lists.sipwise.com/listinfo/spce-user
>>     >     >
>>     >     _______________________________________________
>>     >     Spce-user mailing list
>>     >     Spce-user at lists.sipwise.com
>>     <mailto:Spce-user at lists.sipwise.com>
>>     <mailto:Spce-user at lists.sipwise.com
>>     <mailto:Spce-user at lists.sipwise.com>>
>>     >     https://lists.sipwise.com/listinfo/spce-user
>>     >
>>     >
>>
>>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user
> 



More information about the Spce-user mailing list