[OpenSIPS-Users] sipmsgops.so / codec_delete_except_re
    Alexey Kazantsev 
    kurgan-rus at inbox.ru
       
    Fri Sep 13 09:22:16 EDT 2019
    
    
  
Now I'm testing with this snippet:
	$var(aline_1_before) = $(rb{sdp.line,a,0});
	xlog("Route: $rT . 1 a line in the SDP body is $var(aline_1_before)\n");
	$var(aline_2_before) = $(rb{sdp.line,a,1});
	xlog("Route: $rT . 2 a line in the SDP body is $var(aline_2_before)\n");
	$var(aline_3_before) = $(rb{sdp.line,a,2});
	xlog("Route: $rT . 3 a line in the SDP body is $var(aline_3_before)\n");
	codec_delete_except_re("pcm"); #will delete all codecs except PCMA and PCMU
	$var(aline_1_after) = $(rb{sdp.line,a,0});
	xlog("Route: $rT . 1 a line in the SDP body is $var(aline_1_after)\n");
	$var(aline_2_after) = $(rb{sdp.line,a,1});
	xlog("Route: $rT . 2 a line in the SDP body is $var(aline_2_after)\n");
	$var(aline_3_after) = $(rb{sdp.line,a,2});
	xlog("Route: $rT . 3 a line in the SDP body is $var(aline_3_after)\n");
	if (!t_relay()) {
		send_reply(500,"Internal Error");
	}
And I see this:
 Route: request_route . 1 a line in the SDP body is a=rtpmap:0 PCMU/8000
 Route: request_route . 2 a line in the SDP body is a=rtpmap:8 PCMA/8000
 Route: request_route . 3 a line in the SDP body is a=rtpmap:9 G722/8000
 Route: request_route . 1 a line in the SDP body is a=rtpmap:0 PCMU/8000
 Route: request_route . 2 a line in the SDP body is a=rtpmap:8 PCMA/8000
 Route: request_route . 3 a line in the SDP body is a=rtpmap:9 G722/8000
 new branch at sip:lexus2 at 195.209.116.4:5061
 Route: request_route . 1 a line in the SDP body is <null>
 Route: request_route . 2 a line in the SDP body is <null>
 Route: request_route . 3 a line in the SDP body is <null>
 Route: request_route . 1 a line in the SDP body is <null>
 Route: request_route . 2 a line in the SDP body is <null>
 Route: request_route . 3 a line in the SDP body is <null>
 Route: request_route . 1 a line in the SDP body is <null>
 Route: request_route . 2 a line in the SDP body is <null>
 Route: request_route . 3 a line in the SDP body is <null>
 Route: request_route . 1 a line in the SDP body is <null>
 Route: request_route . 2 a line in the SDP body is <null>
 Route: request_route . 3 a line in the SDP body is <null>
But as we remember, the SIP debug looks OK (SDP is in all invites).
So what I'm doing wrong?!
-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
    
    
More information about the Users
mailing list