<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=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@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:"\0027Helvetica Neue\0027";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
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.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>There is/was a feature that did this: copy_xml_cdr, which sticks the b-leg CDR into the a-leg XML as a channel var. In practice I’ve found it sometimes just doesn’t work, so don’t use it if it’s still there. There’s also failed_xml_cdr_prefix which will write the failed b-legs into the main CDR. But I’m seeing a bug there too, where sometimes the b-leg CDR XML gets truncated. I have to do more research and I’ll open a jira on it.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If you don’t need the full b-leg CDR, it’ll make your life a lot easier to just track the few pieces of info you need right on the a-leg by setting variables before bridging. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>-Michael<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Michael Collins<br><b>Sent:</b> Friday, April 30, 2010 1:55 AM<br><b>To:</b> freeswitch-users@lists.freeswitch.org<br><b>Subject:</b> Re: [Freeswitch-users] How does Freeswitch CDR determine which gateway was used in failover?<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>It's late and I can't seem to locate it right now but Mathieu Rene mentioned that there was a way to embed the b-leg cdr into the a leg cdr. Math, am I losing it? :)<br><br>-MC<o:p></o:p></p><div><p class=MsoNormal>On Fri, Apr 30, 2010 at 12:32 AM, David Ponzone <<a href="mailto:david.ponzone@gmail.com">david.ponzone@gmail.com</a>> wrote:<o:p></o:p></p><div><p class=MsoNormal>Frank,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>first of all, be sure you enabled writing leg B to CDR. If you don't, you won't see a gateway in there anytime soon.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>In CSV CDR, you can change the template used by adding the field ${sip_gateway_name}.<o:p></o:p></p></div><div><p class=MsoNormal>In XML CDR, you get this variable automatically, of course only in the leg B file.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><div><div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"'Helvetica Neue'","serif";color:#1C00FF'>David Ponzone </span><span style='font-size:9.0pt;font-family:"'Helvetica Neue'","serif";color:black'>Direction Technique</span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:black'>email: <a href="mailto:david.ponzone@ipeva.fr" target="_blank">david.ponzone@ipeva.fr</a></span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:black'>tel: 01 74 03 18 97</span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:black'>gsm: 06 66 98 76 34</span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"'Helvetica Neue'","serif";color:#1C00FF'>Service Client </span><span style='font-size:10.5pt;font-family:"'Helvetica Neue'","serif";color:red'>IP</span><span style='font-size:10.5pt;font-family:"'Helvetica Neue'","serif";color:#1C00FF'>eva</span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:black'>tel: 0811 46 26 26</span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><div><p class=MsoNormal><u><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:#0022F3'><a href="http://www.ipeva.fr">www.ipeva.fr</a></span></u><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:#656895'> - </span><u><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:#0022F3'><a href="http://www.ipeva-studio.com">www.ipeva-studio.com</a></span></u><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:#0022F3'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:#0022F3'><o:p> </o:p></span></p></div><div><p class=MsoNormal style='text-align:justify'><i><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:silver'>Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. <b>IPeva</b> décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.</span></i><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:silver'><o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><u><span style='font-size:10.0pt;font-family:"'Helvetica Neue'","serif";color:#0022F3'><o:p><span style='text-decoration:none'> </span></o:p></span></u></p></div></div></div></div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Le 30/04/2010 à 09:06, Frank Church a écrit :<o:p></o:p></p></div><div><div><p class=MsoNormal><br><br><o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>I am not sure if you misunderstood my question.<br><br>The XML provided by mod_xml_cdr does not tell which gateway succeeded. When I use a single gateway without failover I know the gateway specified in lastapp was used. When I use failover the last_app string contains all the gateways. I am looking for a value which tells which gateway was used.<o:p></o:p></p><p class=MsoNormal><include><br> <context name="external"><br> <extension name="external_outbound"><br> <condition field="destination_number" expression="(.*)"> <br> <!-- <action application="set" data="proxy_media=true"/> --><br> <action application="set" data="hangup_after_bridge=true"/><br> <action application="set" data="continue_on_fail=true"/><br> <action application="set" data="originate_timeout=2"/><br> <action application="set" data="originate_retries=1"/><br> <action application="set" data="progress_timeout=15"/><br> <action application="set" data="call_timeout=35"/><br> <action application="set" data="proxy_media=true"/><br> <action application="bridge" data="sofia/gateway/provider1/$1|sofia/gateway/provider2/$1|sofia/gateway/provider3/$1" /> <br> </condition> <br> </extension> <br> </context><br></include><o:p></o:p></p><p class=MsoNormal><br><br><br>On 30 April 2010 04:09, Rupa Schomaker <<a href="mailto:rupa@rupa.com" target="_blank">rupa@rupa.com</a>> wrote:<br>> set a var for each leg, this is how I do it in mod_lcr:<br>> [gateway=foo]sofia/gateway/foo/$1|[gateway=bar]sofia/gateway/bar/$1<br>><br>> On Thu, Apr 29, 2010 at 8:20 PM, Frank Church <<a href="mailto:vfclists@googlemail.com" target="_blank">vfclists@googlemail.com</a>><br>> wrote:<br>>><br>>> How does Freeswitch CDR determine which gateway was used in failover?<br>>><br>>> I am looking at the xml cdr and cdr_csv and they don't appear to show<br>>> which gateway was used in the bridge data.<br>>><br>>> Is there a separate uuid for each bridging attempt, that can be<br>>> obtained from the CDR, or the event socket as last resort?<br>>><br>>> --<br>>> Frank Church<br>>><br>>> =======================<br>>> <a href="http://devblog.brahmancreations.com" target="_blank">http://devblog.brahmancreations.com</a><br>>><br>>> _______________________________________________<br>>> FreeSWITCH-users mailing list<br>>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>> --<br>> -Rupa<br>><br>> _______________________________________________<br>> FreeSWITCH-users mailing list<br>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br><br><br><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com" target="_blank">http://devblog.brahmancreations.com</a><br><br>_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>