[SR-Users] ***SPAM***Re: SDP Codec not removed with RTPengine - but with rtpproxy it worked

Oliver Roth oliver.roth at nexphone.ch
Wed Nov 23 10:05:10 CET 2016


That helped!
Now it works.

Thanks Daniel!

KR,
Oli

-----Ursprüngliche Nachricht-----
Von: sr-users [mailto:sr-users-bounces at lists.sip-router.org] Im Auftrag von Daniel-Constantin Mierla
Gesendet: Freitag, 18. November 2016 15:21
An: Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org>
Betreff: ***SPAM***Re: [SR-Users] SDP Codec not removed with RTPengine - but with rtpproxy it worked

Move the record_route() function to be executed somewhere after the msg_apply_changes().

Cheers,
Daniel


On 18/11/16 10:10, Oliver Roth wrote:
> Found the problem with msg_apply_changes:
> cannot apply msg changes after adding record-route header
>
> see log below:
>
> nxp-c4-gw03-pkzh1 /usr/sbin/kamailio[4456]: ERROR: *** cfgtrace:request_route=[SDP] c=[/etc/kamailio/kamailio-gw.cfg] l=745 a=24 n=msg_apply_changes                                              x
> NoxNov 18 10:04:27 nxp-c4-gw03-pkzh1 /usr/sbin/kamailio[4456]: ERROR: 
> textopsx [textopsx.c:171]: msg_apply_changes_f(): cannot apply msg 
> changes after adding record-route header - it breaks conditional 2nd 
> header
>
> Any idea?
>
>
> -----Ursprüngliche Nachricht-----
> Von: sr-users [mailto:sr-users-bounces at lists.sip-router.org] Im 
> Auftrag von Carsten Bock
> Gesendet: Freitag, 18. November 2016 09:42
> An: Kamailio (SER) - Users Mailing List 
> <sr-users at lists.sip-router.org>
> Betreff: Re: [SR-Users] SDP Codec not removed with RTPengine - but 
> with rtpproxy it worked
>
> Hi Oli,
>
> if you remove the codec before sending it to RTPEngine, you should call msg_apply_changes() after removing the codec.
>
> Thanks,
> Carsten
>
> 2016-11-18 9:39 GMT+01:00 Oliver Roth <oliver.roth at nexphone.ch>:
>> Hi,
>>
>>
>>
>> The codec is removed before sending it to rtpengine …
>>
>> See the log below
>>
>>
>>
>>
>>
>>
>>
>> Nov 18 09:37:38 nxp-c4-gw03-pkzh1 /usr/sbin/kamailio[4229]: ERROR: 
>> *** cfgtrace:request_route=[RTPPROXY] 
>> c=[/etc/kamailio/kamailio-gw.cfg]
>> l=1078
>> a=2 n=return
>>
>> Nov 18 09:37:38 nxp-c4-gw03-pkzh1 /usr/sbin/kamailio[4229]: DEBUG: 
>> sdpops
>> [sdpops_mod.c:199]: sdp_remove_str_codec_id_attrs(): removing line:
>> a=rtpmap:125 CLEARMODE/8000
>>
>> Nov 18 09:37:38 nxp-c4-gw03-pkzh1 /usr/sbin/kamailio[4229]: ERROR: 
>> *** cfgtrace:branch_route=[MANAGE_BRANCH]
>> c=[/etc/kamailio/kamailio-gw.cfg]
>> l=1889 a=24 n=rtpengine_manage
>>
>> Nov 18 09:37:38 nxp-c4-gw03-pkzh1 /usr/sbin/kamailio[4229]: DEBUG: 
>> <core>
>> [mem/f_malloc.c:444]: fm_malloc(): fm_malloc(0x7fe376c30010, 536) 
>> called from rtpengine: bencode.c: __bencode_piece_new(79)
>>
>> Nov 18 09:37:38 nxp-c4-gw03-pkzh1 /usr/sbin/kamailio[4229]: DEBUG: 
>> rtpengine
>> [rtpengine_funcs.c:140]: check_content_type(): type <application/sdp> 
>> found valid
>>
>>
>>
>> But in the outgoing sdp the codec is still listed
>>
>>
>>
>> v=0
>>
>> o=Dialogic_SDP 4043679 0 IN IP4 213.173.185.46
>>
>> s=Dialogic-SIP
>>
>> c=IN IP4 213.173.185.47
>>
>> t=0 0
>>
>> m=audio 9008 RTP/AVP 8 0 125 101
>>
>> a=rtpmap:0 PCMU/8000
>>
>> a=rtpmap:8 PCMA/8000
>>
>> a=rtpmap:125 CLEARMODE/8000
>>
>> a=rtpmap:101 telephone-event/8000
>>
>> a=fmtp:101 0-15
>>
>> a=silenceSupp:off - - - -
>>
>>
>>
>> Any ideas?
>>
>>
>>
>> Kr,
>>
>> Oli
>>
>>
>>
>> Von: Daniel-Constantin Mierla [mailto:miconda at gmail.com]
>> Gesendet: Freitag, 18. November 2016 09:27
>> An: Oliver Roth <oliver.roth at nexphone.ch>; Kamailio (SER) - Users 
>> Mailing List <sr-users at lists.sip-router.org>
>> Betreff: Re: AW: [SR-Users] SDP Codec not removed with RTPengine - 
>> but with rtpproxy it worked
>>
>>
>>
>> Hello,
>>
>>
>>
>> On 16/11/16 14:59, Oliver Roth wrote:
>>
>> Hi,
>>
>>
>>
>> I guess it is after executing rtpengine_maange() – but not really sure.
>>
>> How can I check that?
>>
>> load debugger module and enable cfgtrace option via modparam. Then 
>> you should see what functions are executed from config.
>>
>> Cheers,
>> Daniel
>>
>>
>>
>>
>> I get a different sdp header that is going out of the gateway
>>
>>
>>
>> v=0
>>
>> o=Dialogic_SDP 3975025 0 IN IP4 213.173.185.38
>>
>> s=Dialogic-SIP
>>
>> c=IN IP4 185.49.222.198
>>
>> t=0 0
>>
>> m=audio 20306 RTP/AVP 8 0 125 101
>>
>> a=rtpmap:0 PCMU/8000
>>
>> a=rtpmap:8 PCMA/8000
>>
>> a=rtpmap:125 CLEARMODE/8000
>>
>> a=rtpmap:101 telephone-event/8000
>>
>> a=fmtp:101 0-15
>>
>> a=silenceSupp:off - - - -
>>
>> a=sendrecv
>>
>> a=rtcp:20307
>>
>> a=ice-ufrag:UMTBynMy
>>
>> a=ice-pwd:63JdnvLS7cMyCQ978BA6syPmiI
>>
>> a=candidate:GUTMVOhP7VJyBkZg 1 UDP 2130706431 185.49.222.198 20306 
>> typ host
>>
>> a=candidate:GUTMVOhP7VJyBkZg 2 UDP 2130706430 185.49.222.198 20307 
>> typ host
>>
>>
>>
>> Incoming was
>>
>>
>>
>> v=0
>>
>> o=Dialogic_SDP 3975025 0 IN IP4 213.173.185.38
>>
>> s=Dialogic-SIP
>>
>> c=IN IP4 213.173.185.39
>>
>> t=0 0
>>
>> m=audio 9036 RTP/AVP 8 0 125 101
>>
>> a=rtpmap:0 PCMU/8000
>>
>> a=rtpmap:8 PCMA/8000
>>
>> a=rtpmap:125 CLEARMODE/8000
>>
>> a=rtpmap:101 telephone-event/8000
>>
>> a=fmtp:101 0-15
>>
>> a=silenceSupp:off - - - -
>>
>>
>>
>>
>>
>>
>>
>> Von: sr-users [mailto:sr-users-bounces at lists.sip-router.org] Im 
>> Auftrag von Daniel-Constantin Mierla
>> Gesendet: Mittwoch, 16. November 2016 10:34
>> An: Kamailio (SER) - Users Mailing List 
>> <sr-users at lists.sip-router.org>
>> Betreff: Re: [SR-Users] SDP Codec not removed with RTPengine - but 
>> with rtpproxy it worked
>>
>>
>>
>> Hello,
>>
>> are you executing rtpengine_manage() before or after removing the codec?
>>
>> Cheers,
>> Daniel
>>
>>
>>
>> On 16/11/16 10:03, Oliver Roth wrote:
>>
>> Hi there
>>
>>
>>
>> I have the following problem – I need to remove a codec in the 
>> initial INVITE.
>>
>> This happens since I changed from rtpproxy to rtpengine. I changed 
>> all
>> rtpproxy_manage() to rtpengine_manage().
>>
>>
>>
>> Originating INVITE with the “clearmode”
>>
>>
>>
>> m=audio 9196 RTP/AVP 8 0 125 101
>>
>> a=rtpmap:0 PCMU/8000
>>
>> a=rtpmap:8 PCMA/8000
>>
>> a=rtpmap:125 CLEARMODE/8000
>>
>> a=rtpmap:101 telephone-event/8000
>>
>>
>>
>>
>>
>> I do the following in the config
>>
>> route[SDP] {
>>
>>                 xlog(, "L_INFO", "SDP: request method $rm");
>>
>>
>>
>>                 # remove CLEARMODE if Colt
>>
>>                                if($avp(s:todirection) 
>> =~"^MyCarrier+") {
>>
>>
>>
>>                                if (is_method("INVITE")) {
>>
>>                                                xlog(, "L_INFO", "SDP remove:
>> request method $rm");
>>
>>                                                msg_apply_changes();
>>
>>
>> sdp_remove_codecs_by_name("CLEARMODE");
>>
>>
>> #sdp_remove_codecs_by_id("125");
>>
>>
>>
>>                                }
>>
>>                 }
>>
>> }
>>
>> This block gets hit as I can see with the xlog entry.
>>
>>
>>
>> In the sent INVITE the “Clearmode” is still in the sdp header
>>
>>
>>
>> a=rtpmap:0 PCMU/8000
>>
>> a=rtpmap:8 PCMA/8000
>>
>> a=rtpmap:125 CLEARMODE/8000
>>
>> a=rtpmap:101 telephone-event/8000
>>
>>
>>
>> So with rtpproxy – it worked
>>
>> With rtpengine not any more …
>>
>>
>>
>> Any idea?
>>
>>
>>
>> KR,
>>
>> Oli
>>
>>
>>
>>
>>
>> _______________________________________________
>>
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> list
>>
>> sr-users at lists.sip-router.org
>>
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>>
>> --
>>
>> Daniel-Constantin Mierla
>>
>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>
>> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 
>> http://www.asipto.com
>>
>>
>>
>> --
>>
>> Daniel-Constantin Mierla
>>
>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>
>> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 
>> http://www.asipto.com
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> list sr-users at lists.sip-router.org 
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
> Carsten Bock
> CEO (Geschäftsführer)
>
> ng-voice GmbH
> Millerntorplatz 1
> 20359 Hamburg / Germany
>
> http://www.ng-voice.com
> mailto:carsten at ng-voice.com
>
> Office +49 40 5247593-40
> Fax +49 40 5247593-99
>
> Sitz der Gesellschaft: Hamburg
> Registergericht: Amtsgericht Hamburg, HRB 120189
> Geschäftsführer: Carsten Bock
> Ust-ID: DE279344284
>
> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
> http://www.ng-voice.com/imprint/
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> list sr-users at lists.sip-router.org 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> list sr-users at lists.sip-router.org 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


More information about the sr-users mailing list