<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi everybody,<br>
<br>
Finally it works!. <br>
If somebody has the same problem, I inserted the modification in two
places:<br>
<br>
/etc/ngcp-config/templates/etc/kamailio/proxy/<b>proxy.cfg.customtt.tt2</b><br>
<br>
########################################################################<br>
# Reply route 'base-nat-reply'<br>
########################################################################<br>
onreply_route[REPLY_ROUTE_NAT]<br>
{<br>
xlog("L_INFO", "NAT-Reply - [% logres_init -%]\n");<br>
force_rport();<br>
<br>
if(has_body("application/sdp") &&
($avp(s:from_faxserver) == 1 || $avp(s:to_faxserver) == 1))<br>
{<br>
# fix for T.38 to patton faxserver gateway, which chokes
on upper-case<br>
xlog("L_INFO", "Rewriting T.38 'UDPTL' to 'udptl' - [%
logres -%]\n");<br>
replace_body_all(" UDPTL ", " udptl ");<br>
}<br>
<br>
<b>if(has_body("application/sdp"))</b><b><br>
</b><b> {</b><b><br>
</b><b> # fix SDP direction attribute for Sonus SBC</b><b><br>
</b><b> xlog("L_INFO", "Removing direction attribute
from SDP - [% logreq -%]\n");</b><b><br>
</b><b> replace_body_all("a=direction:active\r?\n", "");</b><b><br>
</b><b> }</b><br>
<br>
if(status=~"(180)|(183)|2[0-9][0-9]") <br>
...<br>
...<br>
<br>
########################################################################<br>
# Branch route 'cli-rtp'<br>
########################################################################<br>
branch_route[BRANCH_ROUTE_CLI_RTP]<br>
...<br>
...<br>
if($avp(s:callee_uuid) != $null &&
!is_present_hf("P-Callee-UUID"))<br>
{<br>
xlog("L_INFO", "Setting P-Callee-UUID to
'$avp(s:callee_uuid)' - [% logreq -%]\n");<br>
append_hf("P-Callee-UUID: $avp(s:callee_uuid)\r\n");<br>
}<br>
<br>
<b>if(has_body("application/sdp"))</b><b><br>
</b><b> {</b><b><br>
</b><b> # fix SDP direction attribute for Sonus SBC</b><b><br>
</b><b> xlog("L_INFO", "Removing direction attribute
from SDP - [% logreq -%]\n");</b><b><br>
</b><b> replace_body_all("a=direction:active\r?\n", "");</b><b><br>
</b><b> }</b><br>
<br>
xlog("L_INFO", "Request leaving server, D-URI='$du' - [%
logreq -%]\n");<br>
}<br>
<br>
I hope it would be helpful for somebody.<br>
<br>
Thanks Andreas<br>
Best regards<br>
Imanol<br>
<br>
<div class="moz-cite-prefix">El 14/11/2012 10:20, Andreas Granig
escribió:<br>
</div>
<blockquote cite="mid:50A36254.4010109@sipwise.com" type="cite">
<pre wrap="">Hi,
You might want to remove the newline as well, like this:
replace_body_all("a=directmedia:active\r?\n", "");
Andreas
On 11/14/2012 10:12 AM, Imanol Pardavila wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I was able to remove the directionline, but the problem is that it
leaves an empty line between ptime and oldmediaip and SBC returns "400
Bad Request"due to malformed INVITE:
a=sendrecv
a=ptime:20
a=oldmediaip:10.34.240.60
a=nortpproxy:yes
I tried both:
replace_body_all("a=direction:active" ,"");
replace_body_all("a=direction:active" ,"");
with same result.
How could I remove the empty line?
Thanks
Best regards
Imanol
El 09/11/2012 14:05, Imanol Pardavila escribió:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Andreas,
"kamailio.cfg.tt2" file has the following main structure:
route
...
route[ROUTE_RELAY]
...
route[ROUTE_REQUEST]
...
onreply_route
...
onsend_route
...
I guess that I have to insert something like this:
if(has_body("application/sdp")
{
# fix for Sonus SBC - remove directmedia attribute
xlog("L_INFO", "Removing directmedia attribute - [% logreq -%]\n");
replace_body_all(" a=directmedia:active ", "");
}
But I'm not sure about where to insert it. Could you help me?
Thanks
Best regards
Imanol
El 09/11/2012 12:45, Andreas Granig escribió:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Imanol,
Oh, right, it's added by the proxy then after mediaproxy is engaged. So
the best place would be the load-balancer config at
/etc/ngcp-config/templates/etc/kamailio/lb/kamailio.cfg.customtt.tt2.
Andreas
On 11/09/2012 11:49 AM, Imanol Pardavila wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Andreas,
Looking at my traces I'm sure that endpoints aren't sending this
attribute; I've just filtered the first packet with this line on SDP
body and it's been sent by CE.
* SDP sent from our SBC to CE:
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): Sonus_UAC IN IP4 10.34.241.67
Session Name (s): SIP Media Capabilities
Connection Information (c): IN IP4 10.34.240.60
Time Description, active time (t): 0 0
Media Description, name and address (m): audio 1552 RTP/AVP
0 8 101
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute (a): rtpmap:101 telephone-event/8000
Media Attribute (a): fmtp:101 0-15
Media Attribute (a): sendrecv
Media Attribute (a): ptime:20
* SDP sent from CE to our SBC (following packet in the sequence):
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): Sonus_UAC IN IP4 10.34.242.11
Session Name (s): SIP Media Capabilities
Connection Information (c): IN IP4 10.34.242.11
Time Description, active time (t): 0 0
Media Description, name and address (m): audio 30132 RTP/AVP
0 8 101
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute (a): rtpmap:101 telephone-event/8000
Media Attribute (a): fmtp:101 0-15
Media Attribute (a): sendrecv
Media Attribute (a): ptime:20
*Media Attribute (a): direction:active**
** Media Attribute (a): oldmediaip:10.34.240.60**
** Media Attribute (a): nortpproxy:yes*
Flow diagram:
|endpoint A| ------------- |SBC| ------------- |CE| ------------- |SBC|
------------- |endpoint B|
SBC: 10.34.240.60, 10.34.241.67
CE: 10.34.242.11
Any ideas?
Thanks
Best regards
Imanol
El 08/11/2012 20:22, Andreas Granig escribió:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
On 11/08/2012 05:25 PM, Imanol Pardavila wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm not sure about who builds SDP? lb, proxy, sems? I guess that the
</pre>
</blockquote>
<pre wrap="">The SDP is created by the endpoints, not by the CE.
</pre>
<blockquote type="cite">
<pre wrap="">idea is create my customtt.tt2 file and use replace_body_all () function
something like:
# remove direction attribute
replace_body_all(" a=directmedia:active ", "");
Is it correct?
</pre>
</blockquote>
<pre wrap="">Not sure about the whitespaces, you might need to leave them out I guess.
Andreas
_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a>
-----
No se encontraron virus en este mensaje.
Comprobado por AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Version: 2012.0.2221 / Base de datos de virus: 2441/5382 - Fecha de publicacion: 11/08/12
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a>
-----
No se encontraron virus en este mensaje.
Comprobado por AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Version: 2012.0.2221 / Base de datos de virus: 2441/5383 - Fecha de publicacion: 11/08/12
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">-----
No se encontraron virus en este mensaje.
Comprobado por AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Version: 2012.0.2221 / Base de datos de virus: 2441/5393 - Fecha de publicacion: 11/13/12
</pre>
</blockquote>
<br>
</body>
</html>