How to PJSIP reload config.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

These changes in a source code allow to choose a free port at program 
start :)

================================
pjsua_app.c
================================
pj_status_t app_init(int argc, char *argv[])
{
......
unsigned int udp_port_max = 10000; /* app_config.udp_cfg.port = 5060; */

/* Add UDP transport unless it's disabled. */
if (!m_app_config.no_udp)
{
pjsua_acc_id aid;
do {
status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, 
&app_config.udp_cfg, &transport_id);
if (status == PJ_SUCCESS) break;
++app_config.udp_cfg.port;
} while (status != PJ_SUCCESS && app_config.udp_cfg.port <= udp_port_max);
if (status != PJ_SUCCESS) goto on_error;
......
}
......
}



Wanlop Runsiyangkul ???????(??):
>
>
> Hi!
> I want to reload PJSIP. I do exit programe and run programe again. But 
> have error with bind port. This follow print
> 01:33:24.877 pjsua_core.c bind() error: Address already in use 
> [status=120125]
> 01:33:24.877 pjsua_app.c Error pjsua_transport_create: Address already 
> in use [status=120125]
> It don't work. How to reload config with do not rerun programe.
> Thank you.
------
Oleg L.Didenko




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux