PJSUA no TCP transport

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

 



On Thu, Jun 26, 2008 at 6:43 PM, Knight Tiger <caugar at gmail.com> wrote:
> Hi,
>
> I just downloaded the latest version of pjsip (0.8) and built it in
> Windows XP. The build worked fine. I set up an user account on brekeke
> server that allows TCP connection from client and fired up
> pjsua_vc8d.exe and it complained with the following result
>
>>>>
> Account list:
>  [ 0] <sip:192.168.1.2:5060;transport=TCP>: does not register
>       Online status: Online
>  *[ 1] sip:2001 at 192.168.1.3: 503/Service Unavailable (expires=-1)
>       Online status: Online
> Buddy list:
>
>
> I did  a packet capture and I found that no packets were sent and I
> found this message on the console
>
>  10:20:19.023    tsx00CF83DC Failed to send Request msg REGISTER/cseq=18509 (tdt
> a00CF7348)! err=171060 (Unsupported transport (PJSIP_EUNSUPTRANSPORT))
>  10:20:19.023    pjsua_acc.c SIP registration failed, status=503 (Service Unavai
> lable)
>
> I see that TCP transport is not supported. I would like to know how do
> I enable support for TCP.
>

First of all, TCP *is* supported, and it's been there for long time,
so I suppose it should be pretty stable. When you want to send
requests using TCP, you need to tell PJSIP that the request is to be
sent with TCP, and this is done by adding ";transport=tcp" parameter
either in the target URI or by adding a route set that uses TCP (the
--proxy or --outbound option in pjsua, e.g. --proxy
"sip:theproxy;lr;transport=tcp").


> Also, I have another related question. The TCP listen port is 5060. So
> PJSIP listens for incoming SIP requests on that port. When I send out
> SIP requests, do I use the same TCP connection with the server or do I
> use another TCP connection with an ephemeral port on the local machine
> and talk to TCP port 5060 on the remote host. The reason I am asking

The UAC side always uses ephemeral TCP port.

> this question, is I would like to keep the TCP connection between the
> client and the server open for as long as the the client is online
> (i.e. connected to the network). Therefore, I can receive incoming
> requests on the same TCP connection. I would like to know if it is
> feasible to do so.
>

That is how it's done in pjsip now. When you register to the server
with TCP, pjsip will keep the socket open and server can send inbound
requests using this connection.

Cheers
 Benny


> Thanks again
> Regards
> Knight
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>



[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