<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Thanks Razvan,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>That is working great now.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Many thanks<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Chris<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> users-bounces@lists.opensips.org [mailto:users-bounces@lists.opensips.org] <b>On Behalf Of </b>Razvan Crainea<br><b>Sent:</b> 18 July 2011 12:12<br><b>To:</b> users@lists.opensips.org<br><b>Subject:</b> Re: [OpenSIPS-Users] Deleting a line from SDP<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi Chris,<br><br>I've made some changes on the SDP line transformation. Please update your sources and try again. Let me know if you still have problems.<br><br>Regards,<br><br><o:p></o:p></p><pre>Razvan Crainea<o:p></o:p></pre><pre>OpenSIPS Developer<o:p></o:p></pre><p class=MsoNormal><br>On 18.07.2011 12:34, Chris Martineau wrote: <o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:-moz-use-text-color -moz-use-text-color'><p class=MsoNormal><span style='color:#1F497D'>Further to my email below I tried setting the index to 2 and the results were just as random. Sometimes it detected 1 c line as 2 ( in this case 3!) causing an incorrect replacement and others it just completely ignored it even when there were 2 c lines.</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Conclusion is that this particular function does not work consistently enough to be useful.</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Any help you could offer would be greatly appreciated.</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Regards</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Chris</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I am trying to delete an extra (c) record from the sdp we get from certain carriers as this is causing some issues downstream.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I have sort of done it using the following in the reply route<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>If 183 or 200....<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>$var(line1)=$(rb{sdp.line,c,0});<o:p></o:p></p><p class=MsoNormal>$var(line2)=$(rb{sdp.line,c,1});<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>If ($var(line2)!=””){<o:p></o:p></p><p class=MsoNormal> Replace_body(“c=IN IP4 [.0-9]*”,”t=0 0”); # replaces the first c record it comes across<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Can’t seem to actually delete the line as I can’t get rid of the CRLF so I have replaced it with a filler line which is effectively ignored anyway.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>The problem I have is under no load conditions the above works fine but if the server is loaded then the indexes seem to get screwed with the index+1 being filled when it shouldn’t.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>So with a single (c) record both indexes 0 and 1 contain the contents of the c record which screws the above as it will replace it regardless.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>With 2 (c) records indexes 0 1 and 2 are filled but this isn’t a problem as the check still works and replaces the first (c) record.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I suppose I could just check index 2 assuming that the behaviour remains constant given that it isn’t supposed to do that.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>To simulate the condition on a no load system just run xlog(“$rb”) before the above and that seems to have the same loading effect.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Any ideas?<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Many thanks<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Chris<o:p></o:p></p><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>Users mailing list<o:p></o:p></pre><pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre><pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre></div></body></html>