[pjsip] Various questions

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

 



Alexander Agranovsky wrote:
> As far as TCP goes, does that mean that we pretty much are limited to  
> one socket per stack instance? 

Not quite. What is not supported in pjsip is specifying more than 
one *listening* TCP sockets, so we cannot listen to more than one 
TCP ports.

But multiple TCP sockets is well supported in pjsip. For a new 
destination address, one TCP socket and transport will be created 
automatically for the requests. And similarly each incoming TCP 
connection, a TCP socket and transport will be created for the 
connection.

Apart from the one (and currently only) TCP listening socket, the 
remaining TCP sockets are ephemeral or temporary. They will be 
closed automatically by the stack once the reference count reaches 
zero and idle timer has fired after PJSIP_TRANSPORT_IDLE_TIME 
seconds (default is 600).

> RFC stresses that
> TCP must be supported for every socket ... is there a workaround? Any  
> plans to add support for multiple TCP sockets?
> 
> You're correct about REFER, sir. I was missing the call to  
> pjsip_evsub_init_module().

Ah I see. I'll add an assertion to check this.

cheers,
  -benny

> Cheers,
> Alex
> 
> On Oct 24, 2007, at 1:41 AM, Benny Prijono wrote:
> 
>> Alexander Agranovsky wrote:
>>> 1) Attempting to call pjsip_tcp_transport_start() more than once
>>> produces error code PJSIP_ETYPEEXISTS. I guess attaching more than
>>> one TCP socket should be done differently -- if so, how?
>> Currently registering more than once TCP listener is not supported,
>> since TCP listener also registers transport factory for the
>> transport type (TCP), and unfortunately there can only be one
>> transport factory for one particular type.
>>
>>> 2) Calling pjsip_xfer_init_module() causes a crash with the stack
>>>
>>> pj_stricmp(const pj_str_t * 0x00000008, const pj_str_t * 0x08619550
>>> _STR_REFER) line 205 + 3 bytes
>>> find_pkg(const pj_str_t * 0x08619550 _STR_REFER) line 382 + 16 bytes
>>> pjsip_evsub_register_pkg(pjsip_module * 0x08623118 mod_xfer, const
>>> pj_str_t * 0x08619550 _STR_REFER, unsigned int 300, unsigned int 1,
>>> const pj_str_t * 0x00121dd4) line 410 + 9 bytes
>>> pjsip_xfer_init_module(pjsip_endpoint * 0x0222ea7c) line 156 + 26  
>>> bytes
>>>
>>> Without attempt to init the REFER package the system seems to
>>> initialize fine. Is it a bug, or am I doing something wrong?
>> You must be doing something wrong, although I don't like the fact
>> that the stack crashes instead of asserting or reporting the error.
>>
>> Please see pjsua_core.c on how to call pjsip_xfer_init_module().
>> Maybe some modules are supposed to be initialized first before this
>> module.
>>
>>> 3) Is there an API to control the buffer size for SIP sockets?
>> For UDP, there are PJSIP_UDP_SO_SNDBUF_SIZE and
>> PJSIP_UDP_SO_RCVBUF_SIZE macros (see sip_transport_udp.c).
>>
>> cheers,
>>   -benny
>>
>>> Thanks,
>>> Alex
>>
>>
>> _______________________________________________
>> 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
> 
> 
> _______________________________________________
> 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


-- 
Benny Prijono
http://www.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