TLS Transport Disconnected and auto reconnected

PC
Pasquale Caruso
Mon, Jul 15, 2013 1:01 PM

Hi,
i have configured my voip client with TLS transport. This is work great, with making call. The problem is that after about 2 minutes, i receive a call to pjsip callback "on_transport_state" that give me state: "PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a "PJSIP_TP_STATE_CONNECTED".
This process is repeated cyclically. After a few tries i receive "PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The question is:
why i receive this sequence of messages from pjsip ?

Note: I have a self-signed certificate, in my server configuration and i have disabled both verification ( client , server ).

In my client I have configured TLS transport in this way:

pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting);
app_config->tls_cfg.port = 65000;
….
….
pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg, &transport_id);
app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD;

I miss anything ? How can i solve this problem with continuous disconnection/reconnection ?

Any help will be appreciate.
Thanks in advance

Hi, i have configured my voip client with TLS transport. This is work great, with making call. The problem is that after about 2 minutes, i receive a call to pjsip callback "on_transport_state" that give me state: "PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a "PJSIP_TP_STATE_CONNECTED". This process is repeated cyclically. After a few tries i receive "PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The question is: why i receive this sequence of messages from pjsip ? Note: I have a self-signed certificate, in my server configuration and i have disabled both verification ( client , server ). In my client I have configured TLS transport in this way: pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting); app_config->tls_cfg.port = 65000; …. …. pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg, &transport_id); app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD; I miss anything ? How can i solve this problem with continuous disconnection/reconnection ? Any help will be appreciate. Thanks in advance
KP
Khoa Pham
Mon, Jul 15, 2013 4:22 PM

You're running pjsip on Windows, Linux or mobile ?
Can you debug into it ?

On Mon, Jul 15, 2013 at 8:01 PM, Pasquale Caruso
pasquale.caruso@n4com.itwrote:

Hi,
i have configured my voip client with TLS transport. This is work great,
with making call. The problem is that after about 2 minutes, i receive a
call to pjsip callback "on_transport_state" that give me state:
"PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a
"PJSIP_TP_STATE_CONNECTED".
This process is repeated cyclically. After a few tries i receive
"PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The
question is:
why i receive this sequence of messages from pjsip ?

Note: I have a self-signed certificate, in my server configuration and i
have disabled both verification ( client , server ).

In my client I have configured TLS transport in this way:

pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting);
app_config->tls_cfg.port = 65000;
….
….
pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg,
&transport_id);
app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD;

I miss anything ? How can i solve this problem with continuous
disconnection/reconnection ?

Any help will be appreciate.
Thanks in advance


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

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

--
Khoa Pham
HCMC University of Science
www.fantageek.com

You're running pjsip on Windows, Linux or mobile ? Can you debug into it ? On Mon, Jul 15, 2013 at 8:01 PM, Pasquale Caruso <pasquale.caruso@n4com.it>wrote: > Hi, > i have configured my voip client with TLS transport. This is work great, > with making call. The problem is that after about 2 minutes, i receive a > call to pjsip callback "on_transport_state" that give me state: > "PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a > "PJSIP_TP_STATE_CONNECTED". > This process is repeated cyclically. After a few tries i receive > "PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The > question is: > why i receive this sequence of messages from pjsip ? > > Note: I have a self-signed certificate, in my server configuration and i > have disabled both verification ( client , server ). > > In my client I have configured TLS transport in this way: > > pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting); > app_config->tls_cfg.port = 65000; > …. > …. > pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg, > &transport_id); > app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD; > > I miss anything ? How can i solve this problem with continuous > disconnection/reconnection ? > > Any help will be appreciate. > Thanks in advance > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- Khoa Pham HCMC University of Science www.fantageek.com
PC
Pasquale Caruso
Tue, Jul 16, 2013 7:59 AM

I'm running on mobile ( objective - c ).
Yes, i can debug into iphone.

Il giorno 15/lug/2013, alle ore 18:22, Khoa Pham ha scritto:

You're running pjsip on Windows, Linux or mobile ?
Can you debug into it ?

On Mon, Jul 15, 2013 at 8:01 PM, Pasquale Caruso pasquale.caruso@n4com.it wrote:
Hi,
i have configured my voip client with TLS transport. This is work great, with making call. The problem is that after about 2 minutes, i receive a call to pjsip callback "on_transport_state" that give me state: "PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a "PJSIP_TP_STATE_CONNECTED".
This process is repeated cyclically. After a few tries i receive "PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The question is:
why i receive this sequence of messages from pjsip ?

Note: I have a self-signed certificate, in my server configuration and i have disabled both verification ( client , server ).

In my client I have configured TLS transport in this way:

pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting);
app_config->tls_cfg.port = 65000;
….
….
pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg, &transport_id);
app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD;

I miss anything ? How can i solve this problem with continuous disconnection/reconnection ?

Any help will be appreciate.
Thanks in advance


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

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

--
Khoa Pham
HCMC University of Science
www.fantageek.com


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

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

I'm running on mobile ( objective - c ). Yes, i can debug into iphone. Il giorno 15/lug/2013, alle ore 18:22, Khoa Pham ha scritto: > You're running pjsip on Windows, Linux or mobile ? > Can you debug into it ? > > > On Mon, Jul 15, 2013 at 8:01 PM, Pasquale Caruso <pasquale.caruso@n4com.it> wrote: > Hi, > i have configured my voip client with TLS transport. This is work great, with making call. The problem is that after about 2 minutes, i receive a call to pjsip callback "on_transport_state" that give me state: "PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a "PJSIP_TP_STATE_CONNECTED". > This process is repeated cyclically. After a few tries i receive "PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The question is: > why i receive this sequence of messages from pjsip ? > > Note: I have a self-signed certificate, in my server configuration and i have disabled both verification ( client , server ). > > In my client I have configured TLS transport in this way: > > pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting); > app_config->tls_cfg.port = 65000; > …. > …. > pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg, &transport_id); > app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD; > > I miss anything ? How can i solve this problem with continuous disconnection/reconnection ? > > Any help will be appreciate. > Thanks in advance > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > -- > Khoa Pham > HCMC University of Science > www.fantageek.com > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
JA
J Alex Antony Vijay
Thu, Jul 18, 2013 12:03 PM

Hi,

Have you set any interval time for keep-alive mechanism ?

On Tue, Jul 16, 2013 at 1:29 PM, Pasquale Caruso
pasquale.caruso@n4com.itwrote:

I'm running on mobile ( objective - c ).
Yes, i can debug into iphone.

Il giorno 15/lug/2013, alle ore 18:22, Khoa Pham ha scritto:

You're running pjsip on Windows, Linux or mobile ?
Can you debug into it ?

On Mon, Jul 15, 2013 at 8:01 PM, Pasquale Caruso <pasquale.caruso@n4com.it

wrote:

Hi,
i have configured my voip client with TLS transport. This is work great,
with making call. The problem is that after about 2 minutes, i receive a
call to pjsip callback "on_transport_state" that give me state:
"PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a
"PJSIP_TP_STATE_CONNECTED".
This process is repeated cyclically. After a few tries i receive
"PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The
question is:
why i receive this sequence of messages from pjsip ?

Note: I have a self-signed certificate, in my server configuration and i
have disabled both verification ( client , server ).

In my client I have configured TLS transport in this way:

pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting);
app_config->tls_cfg.port = 65000;
….
….
pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg,
&transport_id);
app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD;

I miss anything ? How can i solve this problem with continuous
disconnection/reconnection ?

Any help will be appreciate.
Thanks in advance


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

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

--

Regards,
J Alex Antony Vijay.

Hi, Have you set any interval time for keep-alive mechanism ? On Tue, Jul 16, 2013 at 1:29 PM, Pasquale Caruso <pasquale.caruso@n4com.it>wrote: > I'm running on mobile ( objective - c ). > Yes, i can debug into iphone. > > > > Il giorno 15/lug/2013, alle ore 18:22, Khoa Pham ha scritto: > > You're running pjsip on Windows, Linux or mobile ? > Can you debug into it ? > > > On Mon, Jul 15, 2013 at 8:01 PM, Pasquale Caruso <pasquale.caruso@n4com.it > > wrote: > >> Hi, >> i have configured my voip client with TLS transport. This is work great, >> with making call. The problem is that after about 2 minutes, i receive a >> call to pjsip callback "on_transport_state" that give me state: >> "PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a >> "PJSIP_TP_STATE_CONNECTED". >> This process is repeated cyclically. After a few tries i receive >> "PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The >> question is: >> why i receive this sequence of messages from pjsip ? >> >> Note: I have a self-signed certificate, in my server configuration and i >> have disabled both verification ( client , server ). >> >> In my client I have configured TLS transport in this way: >> >> pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting); >> app_config->tls_cfg.port = 65000; >> …. >> …. >> pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg, >> &transport_id); >> app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD; >> >> I miss anything ? How can i solve this problem with continuous >> disconnection/reconnection ? >> >> Any help will be appreciate. >> Thanks in advance >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > > > -- > Khoa Pham > HCMC University of Science > www.fantageek.com > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- Regards, J Alex Antony Vijay.
KP
Khoa Pham
Thu, Jul 18, 2013 4:01 PM

Do you run on Wifi or 3G, some mobile providers can cut your TCP connection
if it idles for some time
Again, if you can debug, try debug into pjsua_call_on_tp_changed (I don't
remember the exact name)

On Thu, Jul 18, 2013 at 7:03 PM, J Alex Antony Vijay
jfalexvijay@gmail.comwrote:

Hi,

 Have you set any interval time for keep-alive mechanism ?

On Tue, Jul 16, 2013 at 1:29 PM, Pasquale Caruso <pasquale.caruso@n4com.it

wrote:

I'm running on mobile ( objective - c ).
Yes, i can debug into iphone.

Il giorno 15/lug/2013, alle ore 18:22, Khoa Pham ha scritto:

You're running pjsip on Windows, Linux or mobile ?
Can you debug into it ?

On Mon, Jul 15, 2013 at 8:01 PM, Pasquale Caruso <
pasquale.caruso@n4com.it> wrote:

Hi,
i have configured my voip client with TLS transport. This is work great,
with making call. The problem is that after about 2 minutes, i receive a
call to pjsip callback "on_transport_state" that give me state:
"PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a
"PJSIP_TP_STATE_CONNECTED".
This process is repeated cyclically. After a few tries i receive
"PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The
question is:
why i receive this sequence of messages from pjsip ?

Note: I have a self-signed certificate, in my server configuration and i
have disabled both verification ( client , server ).

In my client I have configured TLS transport in this way:

pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting);
app_config->tls_cfg.port = 65000;
….
….
pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg,
&transport_id);
app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD;

I miss anything ? How can i solve this problem with continuous
disconnection/reconnection ?

Any help will be appreciate.
Thanks in advance


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

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

--

Regards,
J Alex Antony Vijay.


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

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

--
Khoa Pham
HCMC University of Science
www.fantageek.com

Do you run on Wifi or 3G, some mobile providers can cut your TCP connection if it idles for some time Again, if you can debug, try debug into pjsua_call_on_tp_changed (I don't remember the exact name) On Thu, Jul 18, 2013 at 7:03 PM, J Alex Antony Vijay <jfalexvijay@gmail.com>wrote: > Hi, > > Have you set any interval time for keep-alive mechanism ? > > > On Tue, Jul 16, 2013 at 1:29 PM, Pasquale Caruso <pasquale.caruso@n4com.it > > wrote: > >> I'm running on mobile ( objective - c ). >> Yes, i can debug into iphone. >> >> >> >> Il giorno 15/lug/2013, alle ore 18:22, Khoa Pham ha scritto: >> >> You're running pjsip on Windows, Linux or mobile ? >> Can you debug into it ? >> >> >> On Mon, Jul 15, 2013 at 8:01 PM, Pasquale Caruso < >> pasquale.caruso@n4com.it> wrote: >> >>> Hi, >>> i have configured my voip client with TLS transport. This is work great, >>> with making call. The problem is that after about 2 minutes, i receive a >>> call to pjsip callback "on_transport_state" that give me state: >>> "PJSIP_TP_STATE_DISCONNECTED" and immediately after i receive a >>> "PJSIP_TP_STATE_CONNECTED". >>> This process is repeated cyclically. After a few tries i receive >>> "PJSIP_TP_STATE_DISCONNECTED" without more send callback connection. The >>> question is: >>> why i receive this sequence of messages from pjsip ? >>> >>> Note: I have a self-signed certificate, in my server configuration and i >>> have disabled both verification ( client , server ). >>> >>> In my client I have configured TLS transport in this way: >>> >>> pjsip_tls_setting_default(&app_config->tls_cfg.tls_setting); >>> app_config->tls_cfg.port = 65000; >>> …. >>> …. >>> pjsua_transport_create(PJSIP_TRANSPORT_TLS, &app_config->tls_cfg, >>> &transport_id); >>> app_config->tls_cfg.tls_setting.method = PJSIP_TLSV1_METHOD; >>> >>> I miss anything ? How can i solve this problem with continuous >>> disconnection/reconnection ? >>> >>> Any help will be appreciate. >>> Thanks in advance >>> >>> >>> _______________________________________________ >>> Visit our blog: http://blog.pjsip.org >>> >>> pjsip mailing list >>> pjsip@lists.pjsip.org >>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>> >>> >> >> >> -- >> Khoa Pham >> HCMC University of Science >> www.fantageek.com >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > > > -- > > Regards, > J Alex Antony Vijay. > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- Khoa Pham HCMC University of Science www.fantageek.com