PJSIP Endpoint Restart Issue - Supported header

SK
Steve King
Fri, Oct 15, 2010 1:37 AM

Hi all,

As part of our application, there is a need to shutdown the SIP endpoint
during configuration changes (Hostname / IP Address / Port etc...).

The simplified steps to handle re-configuration are:

  1. pjsip_endpt_destroy()
  2. Configuration update.
  3. pjsip_endpt_create()
  4. Initialize modules (100rel timer etc...)

The issue I have noticed is that the capabilities of the endpoint
(pjsip_endpt_get_capability()) for the Supported headers will not be
updated due to static initialization within certain modules (i.e
replaces, timer) stopping calls to pjsip_endpt_add_capability(). So
outgoing INVITE and outgoing OPTIONS Supported header will not include
all supported features of the endpoint.

Perhaps others have come across a way to handle changes to IP?

--
BRgds,
Steve King

Design Engineer
Zetron Australasia

Hi all, As part of our application, there is a need to shutdown the SIP endpoint during configuration changes (Hostname / IP Address / Port etc...). The simplified steps to handle re-configuration are: 1. pjsip_endpt_destroy() 2. Configuration update. 3. pjsip_endpt_create() 4. Initialize modules (100rel timer etc...) The issue I have noticed is that the capabilities of the endpoint (pjsip_endpt_get_capability()) for the Supported headers will *not* be updated due to static initialization within certain modules (i.e replaces, timer) stopping calls to pjsip_endpt_add_capability(). So outgoing INVITE and outgoing OPTIONS Supported header will *not* include all supported features of the endpoint. Perhaps others have come across a way to handle changes to IP? -- BRgds, Steve King Design Engineer Zetron Australasia
BP
Benny Prijono
Fri, Oct 15, 2010 2:31 AM

On Fri, Oct 15, 2010 at 8:37 AM, Steve King sking@zetron.com wrote:

Hi all,

As part of our application, there is a need to shutdown the SIP endpoint
during configuration changes (Hostname / IP Address / Port etc...).

The simplified steps to handle re-configuration are:

  1. pjsip_endpt_destroy()
  2. Configuration update.
  3. pjsip_endpt_create()
  4. Initialize modules (100rel timer etc...)

The issue I have noticed is that the capabilities of the endpoint
(pjsip_endpt_get_capability()) for the Supported headers will not be
updated due to static initialization within certain modules (i.e
replaces, timer) stopping calls to pjsip_endpt_add_capability(). So
outgoing INVITE and outgoing OPTIONS Supported header will not include
all supported features of the endpoint.

Hi Steve, you'd also need to call pj_shutdown(). This will call the
atexit() handlers, which would reset the static variables.

Benny

On Fri, Oct 15, 2010 at 8:37 AM, Steve King <sking@zetron.com> wrote: > Hi all, > > As part of our application, there is a need to shutdown the SIP endpoint > during configuration changes (Hostname / IP Address / Port etc...). > > The simplified steps to handle re-configuration are: > 1. pjsip_endpt_destroy() > 2. Configuration update. > 3. pjsip_endpt_create() > 4. Initialize modules (100rel timer etc...) > > The issue I have noticed is that the capabilities of the endpoint > (pjsip_endpt_get_capability()) for the Supported headers will *not* be > updated due to static initialization within certain modules (i.e > replaces, timer) stopping calls to pjsip_endpt_add_capability(). So > outgoing INVITE and outgoing OPTIONS Supported header will *not* include > all supported features of the endpoint. > Hi Steve, you'd also need to call pj_shutdown(). This will call the atexit() handlers, which would reset the static variables. Benny
SK
Steve King
Fri, Oct 15, 2010 4:33 AM

Hi Benny,

Thanks for the information.

However, other portions of our application require the PJ library to be
available (even if the SIP endpoint is not running).

My current hack is to

  1. Over ride the transport IP/port/host information when new
    configuration is available.
    We are writing a custom transport so this is easy for us.
  2. Update the endpoint name member.

Hopefully, this will work :)

Cheers,

Steve

On Fri, 2010-10-15 at 09:31 +0700, Benny Prijono wrote:

On Fri, Oct 15, 2010 at 8:37 AM, Steve King sking@zetron.com wrote:

Hi all,

As part of our application, there is a need to shutdown the SIP endpoint
during configuration changes (Hostname / IP Address / Port etc...).

The simplified steps to handle re-configuration are:

  1. pjsip_endpt_destroy()
  2. Configuration update.
  3. pjsip_endpt_create()
  4. Initialize modules (100rel timer etc...)

The issue I have noticed is that the capabilities of the endpoint
(pjsip_endpt_get_capability()) for the Supported headers will not be
updated due to static initialization within certain modules (i.e
replaces, timer) stopping calls to pjsip_endpt_add_capability(). So
outgoing INVITE and outgoing OPTIONS Supported header will not include
all supported features of the endpoint.

Hi Steve, you'd also need to call pj_shutdown(). This will call the
atexit() handlers, which would reset the static variables.

Benny


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
BRgds,
Steve King

Design Engineer
Zetron Australasia

Hi Benny, Thanks for the information. However, other portions of our application require the PJ library to be available (even if the SIP endpoint is not running). My current hack is to 1. Over ride the transport IP/port/host information when new configuration is available. We are writing a custom transport so this is easy for us. 2. Update the endpoint name member. Hopefully, this will work :) Cheers, Steve On Fri, 2010-10-15 at 09:31 +0700, Benny Prijono wrote: > On Fri, Oct 15, 2010 at 8:37 AM, Steve King <sking@zetron.com> wrote: > > Hi all, > > > > As part of our application, there is a need to shutdown the SIP endpoint > > during configuration changes (Hostname / IP Address / Port etc...). > > > > The simplified steps to handle re-configuration are: > > 1. pjsip_endpt_destroy() > > 2. Configuration update. > > 3. pjsip_endpt_create() > > 4. Initialize modules (100rel timer etc...) > > > > The issue I have noticed is that the capabilities of the endpoint > > (pjsip_endpt_get_capability()) for the Supported headers will *not* be > > updated due to static initialization within certain modules (i.e > > replaces, timer) stopping calls to pjsip_endpt_add_capability(). So > > outgoing INVITE and outgoing OPTIONS Supported header will *not* include > > all supported features of the endpoint. > > > > Hi Steve, you'd also need to call pj_shutdown(). This will call the > atexit() handlers, which would reset the static variables. > > Benny > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -- BRgds, Steve King Design Engineer Zetron Australasia