Bug-report: Unable to create local SDP at reinvite with SRTP

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

 



Hi Arie,

Just fixed this in https://trac.pjsip.org/repos/ticket/1165.

Thanks,
nanang


On Mon, Nov 15, 2010 at 11:10 PM, Arie Velthoen
<arie_velthoen at hotmail.com> wrote:
> Hi,
>
> At least one correction: add next line, see below
>
>
>>>??? ??? ??pjsua_acc *acc = &pjsua_var.acc[call->acc_id];
>
>
> Arie
>
> ________________________________
> From: arie_velthoen@xxxxxxxxxxx
> To: pjsip at lists.pjsip.org
> Date: Mon, 15 Nov 2010 16:43:31 +0100
> Subject: Re: Bug-report: Unable to create local SDP at reinvite with
> SRTP
>
> Hi PJSIP-maintainers,
>
> I have made a fix, which appears to work.
>
> I am not 100% sure through whether it is ok for all cases.
> Can you give me some comment, or if it is ok, add it to the trunk?
>
>
> My solution based on release 1.8.5?is as follows:
>
> In pjsua_media.c??in pjsua_media_channel_create_sdp?add?the marked lines
> before the pj_assert
> pjsua_media_channel_create_sdp call find_audio_index ro remote-sdp.
>
>
>>>??? // Determine audio_idx from rem_sdp
>
>>>??? // [Code copied from pjsua_media_channel_init]
>
>>>??? if (rem_sdp && rem_sdp->media_count != 0)
>
>>>??? {
>
>>>????????? /* Find out the candidate audio media line in SDP */
>
>>>????????? pj_bool_t srtp_active;
>
>>>
>
>>>#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
>
>>>>>????????pjsua_acc *acc = &pjsua_var.acc[call->acc_id];
>
>>>????????? srtp_active = acc->cfg.use_srtp && srtp != NULL;
>
>>>#else
>
>>>????????? srtp_active = PJ_FALSE;
>
>>>#endif
>
>>>????????? call->audio_idx = find_audio_index(rem_sdp, srtp_active);
>
>>>??? }
>
>
>
> ????? /* Media index must have been determined before */
>
> ????? pj_assert(call->audio_idx != -1);
>
>
>
>
> Thank you,
> Arie
>
>
>
>
> ________________________________
> From: arie_velthoen@xxxxxxxxxxx
> To: pjsip at lists.pjsip.org
> Date: Mon, 15 Nov 2010 11:31:18 +0100
> Subject: Bug-report: Unable to create local SDP at reinvite with
> SRTP
>
> Hi PJSIP-maintainers,
>
> I have a reproducable problem with PJSUA at receiving a reinvite with 2
> media-lines.
>
> At a re-INVITE with new SDP PJSUA (release 1.8.5) gives next error:
> ?10:42:56.092?? pjsua_call.c? Call 0: received updated media offer
> ?10:42:56.092?? pjsua_call.c? Unable to create local SDP: Invalid SDP media
> transport protocol (PJMEDIA_SDP_EINPROTO) [status=220036]
>
> Call scenario:
> First INVITE has been answered succesfully with 200, RTP is flowing
> Next at the re-INVITE with new remote SDP, no local SDP could be created.
>
> The remote SDP contains 2 media-lines, first one with SRTP, next without:
> v=0
> o=- 21 21 IN IP4 192.168.9.42
> s=Polycom IP Phone
> c=IN IP4 192.168.9.42
> t=0 0
> m=audio 49212 RTP/SAVP 8 0 18 96
> a=crypto:55 AES_CM_128_HMAC_SHA1_80
> inline:yLw6kigvfpbr6T/aPxuTHZJLz4aj65xEf2Fo/0D/
> a=rtpmap:8 PCMA/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:96 telephone-event/8000
> m=audio 49212 RTP/AVP 8 0 18 96
> a=rtpmap:8 PCMA/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:96 telephone-event/8000
>
> The complete PJSUA-log is attached.
>
> I have disabled SRTP in PJSUA by the following line in config_site.h :
> #define PJMEDIA_HAS_SRTP 0
> [Note: enabling SRTP by removing this line did not solve the problem, only
> gave another error
> ?"Invalid SDP media transport for SRTP (PJMEDIA_SRTP_ESDPINTRANSPORT)
> [status=220227]"]
>
> I found that with callstack:
> ? transport_udp.c - transport_encode_sdp
> ? transport.h - pjmedia_transport_encode_sdp
> ? pjsua_media.c - pjsua_media_channel_create_sdp
> ? pjsua_call.c - pjsua_call_on_rx_offer
>
> ??transport_udp.c - transport_encode_sdp? returns PJMEDIA_SDP_EINPROTO
> because it is called with media_index 0, and
> rem_sdp->media[media_index]->desc.transport
> contains ?RTP/SAVP? instead of ?RTP/AVP?.
>
>
> Can you give me some guidance how to solve this problem?
>
>
> Thank you,
>
> Aire
>
>
>
>
>
> _______________________________________________ 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