PJSIP_INV_STATE_DISCONNECTED not received when callee disconnects call

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

 



Hi,

Coming in late to the discussion I know (but better late then never?)

I think this is interesting. When switching to TCP, we should still
have UDP in the Contact that we send with our INVITE. This is
intentional, as the switch to TCP is only temporary just for sending
the INVITE, and for subsequent communication we'd like to use UDP
(because that's what the app wants).

If the proxy sends it with UDP to the address that we give in the
Contact, I would guess that it should reach us, since it normally
does. If the proxy sends it with the existing TCP, I guess it should
reach us too, as normally we keep the idle TCP connection open for
something like 10 minutes or so. Unless, of course, if the call has
been going for more than 10 minutes, and the server tried to send the
BYE with TCP, which in this case will fail since we would have closed
the TCP connection by then.

On the contrary to your suggestion, I myself always use TCP when using
pjsip over the Internet. Of course I know beforehand that it works
well with the proxy that I'm using (an old version of OpenSER).

Best regards,
?Benny

On Mon, Jun 6, 2011 at 5:58 AM, Samuel Vinson <samuelv at laposte.net> wrote:
> Hello,
>
> I continued my investigation. I made my tests with OpenSIPS 1.6.3-notls and
> pjsip svn branch 1.x
>
> The issue appears when pjsip (iPhone) calls only. And not when the pjsip
> (iPhone) receives a call.
> In fact in our case we place a call with many codecs, so the message size is
> bigger than 1300 bytes. And the RFC 3261 tells that we have to switch to TCP
> (extract from 'sip_config.h'/'sip_util.c')
>
> ?* RFC 3261 section 18.1.1:
> ?* If a request is within 200 bytes of the path MTU, or if it is larger
> ?* than 1300 bytes and the path MTU is unknown, the request MUST be sent
> ?* using an RFC 2914 [43] congestion controlled transport protocol, such
> ?* as TCP.
>
> In the next messages, the server and device continue to use TCP. And in this
> case the server doesn't send BYE message.
> I don't know:
> ??? - whether the server has to continue using TCP, and not UDP,
> ??? - why the server doesn't send BYE message with TCP connection
>
>
> For the moment we have several solutions
> ??? - reduce the number of codec
> ??? - use compact form (global variables
> pjsip_use_compact_form/pjsip_include_allow_hdr_in_dlg/pjmedia_add_rtpmap_for_static_pt)
> ??? - increase the UDP size threshold (define PJSIP_UDP_SIZE_THRESHOLD)
> ??? - force to use UDP (define PJSIP_DONT_SWITCH_TO_TCP)
>
> If someone has an other idea or an opinion/advice, I'm interested.
>
> Regards
>
> Samuel
>
> Le 02/06/11 23:57, Samuel Vinson a ?crit?:
>
> Hello,
>
> I confirm your issue, and it's present in ipjsua too.
>
> But it's very weird, because:
> ??? - if the iphone calls someone, and someone ends the call, the
> PJSIP_INV_STATE_DISCONNECTED message is not triggered by the iPhone
> ??? - if someone calls the iphone, and someone ends the call, the BYE
> message is triggered by the iPhone.
>
> I use the last version of svn branch 1.x.
>
> Regards
>
> Samuel
>
> Le 01/06/11 09:14, Dia Kharrat a ?crit?:
>
> Hi,
> We're implementing a voip-based iphone app, and I'm facing a situation where
> I'm not receiving the call state PJSIP_INV_STATE_DISCONNECTED event when the
> callee disconnects the call (on a PSTN). When I tried testing out the ipjsip
> sample iphone app provided in the SDK, I noticed that it receives the
> disconnect event properly. So, it seems like I'm missing something in my
> code. Comparing how the sample app does things did not yield anything that
> stands out from how we're using pjsip. Does anyone happen to know why
> PJSIP_INV_STATE_DISCONNECTED would not be triggered? I receive the other
> events properly, so it's very strange. Any pointers as to where to look
> would be appreciated.
> Thanks,
> Dia
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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