<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>there is a dedicated function to set the body, do not use
append_hf(), because kamailio doesn't detect there is a change of
the body and content length is 0.<br>
</p>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 27.07.17 13:25, Nicolas Breuer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:HE1PR0401MB258538E0C1032DF5E75B923489BE0@HE1PR0401MB2585.eurprd04.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@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: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;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"Préformaté HTML Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;
mso-fareast-language:FR-BE;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;
mso-fareast-language:FR-BE;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.PrformatHTMLCar
{mso-style-name:"Préformaté HTML Car";
mso-style-priority:99;
mso-style-link:"Préformaté HTML";
font-family:Consolas;
color:black;
mso-fareast-language:EN-US;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext">Hello
Daniel,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">I added this<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">if
(status=~"[1][8][0-3]"){<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
setflag(22);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
if (is_method("INVITE")) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
xlog("L_NOTICE", " No SDP");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("Content-Type: application/sdp\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("v=0\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("o=XX 10 10 IN IP4 217.112.180.9\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("s=XX \r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("c=IN IP4 217.121.180.9\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("t=0 0\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("m=audio 0 RTP/AVP 8 101\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("a=rtpmap:8 PCMA/8000\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("a=rtpmap:101 telephone-event/8000\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("a=fmtp:101 0-15\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("a=sendrecv\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
append_hf("a=ptime:20\r\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
msg_apply_changes();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
rtpproxy_manage("corbf");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
#rtpproxy_stream2uac("/root/wait.wav", "-1");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">
</span><span style="color:windowtext">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Seems
that proxy was not engaged. -> The port is not altered..<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Trace
:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Allow:
INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Content-Length:
0.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Content-Type:
application/sdp.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Server:
Belcenter SIP Voice Gateway.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">v=0.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">o=XX
10 10 IN IP4 217.112.180.9.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">s=XX
.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">c=IN
IP4 217.121.180.9.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">t=0
0.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">m=audio
0 RTP/AVP 8 101.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">a=rtpmap:8
PCMA/8000.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">a=rtpmap:101
telephone-event/8000.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">a=fmtp:101
0-15.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">a=sendrecv.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">a=ptime:20.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="color:windowtext;mso-fareast-language:FR-BE"
lang="FR">De :</span></b><span
style="color:windowtext;mso-fareast-language:FR-BE"
lang="FR"> Daniel-Constantin Mierla
[<a class="moz-txt-link-freetext" href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a>]
<br>
<b>Envoyé :</b> jeudi 27 juillet 2017 11:41<br>
<b>À :</b> Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a>; Nicolas Breuer
<a class="moz-txt-link-rfc2396E" href="mailto:Nicolas.Breuer@belcenter.biz"><Nicolas.Breuer@belcenter.biz></a><br>
<b>Objet :</b> Re: [SR-Users] Add SDP Body<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hello,<span
style="font-size:12.0pt;mso-fareast-language:FR-BE"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 27.07.17 09:57, Nicolas Breuer wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’m trying to add a
SDP Body on 183 replies.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">From some carriers I
don’t get any SDP.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">The goal is to add SDP
, Engage PROXY & stream2uac on all 183 packets without
SDP</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Do you think it’s
possible ? </span><span style="font-family:Wingdings"
lang="EN-US">J</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif;mso-fareast-language:FR-BE">it may be
possible, if you try to combine adding content-type header
and the sdp body, then use msg_apply_changes() inside
reply_route{}. Later engage the rtpproxy. However, if you
don't know the codecs of caller/callee, it may end in a
mismatch.<br>
<br>
Just dropping such 183 is not ok? If not, what about turning
183 in an 180? Or setting an SDP with media IP 0.0.0.0 (old
on hold style)?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla<o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
<pre>Kamailio Advanced Training - <a href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a><o:p></o:p></pre>
<pre>Kamailio World Conference - <a href="http://www.kamailioworld.com" moz-do-not-send="true">www.kamailioworld.com</a><o:p></o:p></pre>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>