[OpenSIPS-Users] codec_delete() not working in 3.0

Mark Farmer farmorg at gmail.com
Fri Sep 27 04:36:02 EDT 2019


Thanks James, that's interesting. However my understanding is that all
mention of the target codec should be removed but in this case it seems to
be unchanged.

According to this list:
https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml

G.729 is represented in the m=audio line by a value of 18 which is still
present in the resulting INVITE.
The SDP from the initial INVITE from a phone:

v=0
o=- 1569572039 1569572039 IN IP4 xxx.xxx.xxx.xxx
s=Polycom IP Phone
c=IN IP4 xxx.xxx.xxx.xxx
b=AS:512
t=0 0
m=audio 2226 RTP/AVP 9 8 0 *18* 127
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
*a=rtpmap:18 G729/8000*
a=fmtp:18 annexb=no
a=rtpmap:127 telephone-event/8000
m=video 2228 RTP/AVP 109 34
a=rtpmap:109 H264/90000
a=fmtp:109 profile-level-id=42800d; packetization-mode=0
a=rtpmap:34 H263/90000
a=fmtp:34 CIF=1;QCIF=1;SQCIF=1

And the resulting outbound INVITE:

v=0
o=- 1569572039 1569572039 IN IP4 xxx.xxx.xxx.xxx
s=Polycom IP Phone
c=IN IP4 xxx.xxx.xxx.xxx
b=AS:512
t=0 0
m=audio 10552 RTP/AVP 9 8 0 *18* 127
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
*a=rtpmap:18 G729/8000*
a=rtpmap:127 telephone-event/8000
a=fmtp:18 annexb=no
a=sendrecv
a=rtcp:10553
a=ice-ufrag:NaBg56me
a=ice-pwd:oWZ4Hzrn4kJtnYfXo4Q7oCNx95
a=candidate:wWTC1VOV2dAOfI4x 1 UDP 2130706431 xxx.xxx.xxx.xxx 10552 typ host
a=candidate:wWTC1VOV2dAOfI4x 2 UDP 2130706430 xxx.xxx.xxx.xxx 10553 typ host
m=video 10574 RTP/AVP 109 34
a=rtpmap:109 H264/90000
a=rtpmap:34 H263/90000
a=fmtp:109 profile-level-id=42800d; packetization-mode=0
a=fmtp:34 CIF=1;QCIF=1;SQCIF=1
a=sendrecv
a=rtcp:10575
a=ice-ufrag:U1Lig1Dm
a=ice-pwd:wzCYNGN9FyuFLChyqqVR7YqLRE
a=candidate:wWTC1VOV2dAOfI4x 1 UDP 2130706431 xxx.xxx.xxx.xxx 10574 typ host
a=candidate:wWTC1VOV2dAOfI4x 2 UDP 2130706430 xxx.xxx.xxx.xxx 10575 typ host



On Thu, 26 Sep 2019 at 16:59, James Hogbin <james at ip-sentinel.com> wrote:

> I think this is helpful?
>
> https://opensips.org/pipermail/users/2016-September/035510.html
>
> james
>
>
> *James Hogbin*
> *Director*
> [image: IP Sentinel Logo] <http://ip-sentinel.com>
> t. +44 (0)20 3011 4150 <+442030114150>
> m. +44 7786910895
> w. https://www.ip-sentinel.com
>
> On 26 Sep 2019, at 16:37, Mark Farmer <farmorg at gmail.com> wrote:
>
> Been looking at this for a while now and it just won't play ball.
> I have an avp defined:
>
> # Codecs we do NOT support!
> $avp(BadCodec) = "G729";
> $avp(BadCodec) = "G729a";
>
> Then I use a for each to remove any instances of the codecs:
>
> for ($var(ToDelete) in $(avp(BadCodec)[*]))
>                 if (codec_delete($var(ToDelete))) {
>                             xlog("CUSTOM_LOG: Invalid codec detected and
> deleted: $var(ToDelete)");
>                 }
>
> sipmsgops reports that it's trying to remove codecs:
>
> DBG:sipmsgops:codec_delete: deleting codec <G729a> with clock <>
> ---
> DBG:sipmsgops:codec_delete: deleting codec <G729> with clock <>
> ---
>
> My custom logs only generate a single entry since only G729 is present in
> SDP:
>
> CUSTOM_LOG: Invalid codec detected and deleted: G729
>
> But when the call is routed, the G729 codecs remain in the SDP:
>
> a=rtpmap:18 G729/8000
>
> Can anyone suggest why might that be?
>
> Regards
> Mark.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> IP Sentinel Disclaimer
> The information contained in this e-mail, and any attachment, is
> confidential and is intended solely for the use of the intended recipient.
> Access, copying or re-use of the e-mail or any attachment, or any
> information contained therein, by any other person is not authorized.
> Unintended recipients are prohibited from taking action on the basis of
> information in this e-mail. If you are not the intended recipient or have
> received this email in error, please notify the sender immediately by
> return email and delete the email from your computer. E-mail messages may
> contain computer viruses or other defects, may not be accurately replicated
> on other systems, or may be intercepted, deleted or interfered with without
> the knowledge of the sender or the intended recipient. We do not guarantee
> that either are virus-free and accept no liability for any damage sustained
> as a result of computer viruses or other defects. . IP Sentinel Ltd is a
> limited company registered in England and Wales under Registered Number
> 08648097. Registered Office: Newnhams Wood, Horsted Keynes, West Sussex,
> RH17 7BT.
> Q3dhRSrm_disclaimer
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 
Mark Farmer
farmorg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190927/490882ea/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 119092616571201171.png
Type: image/png
Size: 3317 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20190927/490882ea/attachment.png>


More information about the Users mailing list