<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:x="urn:schemas-microsoft-com:office:excel" 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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 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";
        mso-fareast-language:EN-US;}
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;}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
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 lang="IT" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi List<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a problem with callworwarding and accounting.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">First, here’s my model:<o:p></o:p></p>
<p class="MsoNormal">MY USERS --> OPENSIPS (registrar, accounting, router, nat, …) --> ASTERISK (transcoder, T38) --> SIP TRUNK for pstn (EXTERNAL PROVIDER)<o:p></o:p></p>
<p class="MsoNormal">I use asterisk because my provider doesn’t accept any codec so I transcode everything to G711a.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is my complete working config:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://voip.fabryb.com/opensips_proxy.m4">http://voip.fabryb.com/opensips_proxy.m4</a><o:p></o:p></p>
<p class="MsoNormal"><a href="http://voip.fabryb.com/asterisk_sip.conf">http://voip.fabryb.com/asterisk_sip.conf</a><o:p></o:p></p>
<p class="MsoNormal"><a href="http://voip.fabryb.com/asterisk_extensions.conf">http://voip.fabryb.com/asterisk_extensions.conf</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">opensips configuration is based on Live VM (1.7.0) which I upgraded to 1.7.2 and compiled module b2b_logic because it was not present.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please ignore block #---- handle country -----# of opensips<o:p></o:p></p>
<p class="MsoNormal">I know it could be done better, but I was in hurry :(<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a problem with opensips<->asterisk:<o:p></o:p></p>
<p class="MsoNormal">when I do the forward asterisk sees a new request incoming with the same callid of the first leg and sends a cancel to opensips and goes on with the call by itself.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">To avoid that behaviour I tried to setup “topology hiding” both with dialog module and b2bua module:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://voip.fabryb.com/opensips_proxy.m4.b2b">http://voip.fabryb.com/opensips_proxy.m4.b2b</a><o:p></o:p></p>
<p class="MsoNormal"><a href="http://voip.fabryb.com/opensips_proxy.m4.tophid">http://voip.fabryb.com/opensips_proxy.m4.tophid</a><o:p></o:p></p>
<p class="MsoNormal">without complete success.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With dialog module topology hiding asterisk will still behave like there wasn’t.<o:p></o:p></p>
<p class="MsoNormal">With b2bua module topology hiding asterisk will obviously behave correctly because it sees completely new transaction but I have accounting problems:<o:p></o:p></p>
<p class="MsoNormal">invites are accounted with empty to_tag and byes are not accounted at all.<o:p></o:p></p>
<p class="MsoNormal">I tried to account them manually in local_route and b2b routes but I get a non-empty to/from tag and I can’t get rid of it before manual acc_db_request.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am probably doing something wrong between asterisk and opensips because I don’t think all this topology hiding is really needed.<o:p></o:p></p>
<p class="MsoNormal">Just the part of opensips_proxy.m4.tophid where I implemented the multileg accounting and some extra to tell asterisk not to cut short opensips.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does somebody have an idea?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks everyone for helping!<o:p></o:p></p>
<p class="MsoNormal">Fabrizio<o:p></o:p></p>
</div>
</body>
</html>