<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 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:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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;}
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;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@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 lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-CA" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">What Steven says is correct. Our problem was that failover was being invoked on receipt of any rejection code due to the bug described in FS-7678
 and this led to the error you are seeing. What we wanted was for failover to only occur if the gateway was actually unavailable, in which case there would be no existing session to be a duplicate of. The solution I described worked for us but perhaps your
 requirements and scenario are slightly different and Steven's approach would be more appropriate.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org]
<b>On Behalf Of </b>Steven Ayre<br>
<b>Sent:</b> 29 July 2016 10:35<br>
<b>To:</b> FreeSWITCH Users Help &lt;freeswitch-users@lists.freeswitch.org&gt;<br>
<b>Subject:</b> Re: [Freeswitch-users] Duplicate UUID<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal">If you set the origination_uuid in {} braces it'll try to use that UUID for all of the B-legs.<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
You need to set a different uuid for each leg in [] braces, for example:<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
&lt;action application=&quot;set&quot; data=&quot;uuid1=${create_uuid()}&quot;/&gt;<o:p></o:p></p>
</div>
<p class="MsoNormal">&lt;action application=&quot;set&quot; data=&quot;uuid2=${create_uuid()}&quot;/&gt;<br>
&lt;action application=&quot;set&quot; data=&quot;uuid3=${create_uuid()}&quot;/&gt;<o:p></o:p></p>
<div>
<p class="MsoNormal">&lt;action application=&quot;bridge&quot; data=&quot;[origination_uuid=${uuid1}]sofia/gateway/gw1/12345|[origination_uuid=${uuid2}]sofia/gateway/gw2/12345|[origination_uuid=${uuid3}]sofia/gateway/gw3/12345&quot;/&gt;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">fail_on_single_reject wouldn't help you if you're using {} since if you failover to the 2nd leg both 1st and 2nd leg would try using the same UUID<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On 29 July 2016 at 06:36, Petr Parýzek &lt;<a href="mailto:PetrParyzek@seznam.cz" target="_blank">PetrParyzek@seznam.cz</a>&gt; wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Thanks for reply!</span><span lang="CS"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">I</span><span lang="EN-CA" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">'m
 using uuid created with create_uuid api function, so by my opinion it should be unique.</span><span lang="CS"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-CA" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">The error began occur after I started using operator | for failover. So if I understand
 this correctly, with this operator origination_uuis can't be set.</span><span lang="CS"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-CA" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Is this correct?</span><span lang="CS"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-CA" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Petr</span><span lang="CS"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">&nbsp;</span><span lang="CS"><o:p></o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="CS" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,sans-serif">From:</span></b><span lang="CS" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,sans-serif">
<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Anthony Minessale<br>
<b>Sent:</b> Thursday, July 28, 2016 11:42 PM<br>
<b>To:</b> FreeSWITCH Users Help<br>
<b>Subject:</b> Re: [Freeswitch-users] Duplicate UUID</span><span lang="CS"><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">&nbsp;<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">When you supply the uuid with origination_uuid, it becomes your duty to make sure its unique id the uuid is in use already it will fail.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">&nbsp;<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">On Thu, Jul 28, 2016 at 5:36 AM, Petr Parýzek &lt;<a href="mailto:PetrParyzek@seznam.cz" target="_blank">PetrParyzek@seznam.cz</a>&gt; wrote:<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">Hi all,<br>
I'm using Freeswitch with a few Javascript scripts like automatic phone<br>
dialer. Sometimes, when called party is BUSY, FS reports &quot;Duplicate UUID!&quot;<br>
error and the session was ended with case DESTINATION_OUT_OF_ORDER. This is<br>
contents of console from yesterday:<br>
<br>
2016-07-27 20:46:56.249500 [INFO] amds.js:315<br>
{origination_uuid=82b8a17d-c627-45dd-9eaf-86e9f31c57b1,origination_caller_id<br>
_number=950330980,origination_caller_id_name=AMDS}sofia/gateway/gw91/0725045<br>
121|sofia/gateway/gw90/0725045121<br>
2016-07-27 20:46:56.249500 [NOTICE] switch_channel.c:1105 New Channel<br>
sofia/external/0725045121 [82b8a17d-c627-45dd-9eaf-86e9f31c57b1]<br>
2016-07-27 20:46:57.789511 [NOTICE] sofia.c:7891 Hangup<br>
sofia/external/0725045121 [CS_CONSUME_MEDIA] [USER_BUSY]<br>
2016-07-27 20:46:57.799501 [CRIT] switch_core_session.c:2232 Duplicate UUID!<br>
2016-07-27 20:46:57.799501 [CRIT] mod_sofia.c:4456 Error Creating Session<br>
2016-07-27 20:46:57.799501 [NOTICE] switch_ivr_originate.c:2762 Cannot<br>
create outgoing channel of type [sofia] cause: [DESTINATION_OUT_OF_ORDER]<br>
2016-07-27 20:46:57.799501 [NOTICE] switch_core_session.c:1664 Session 9903<br>
(sofia/external/0725045121) Ended<br>
2016-07-27 20:46:57.799501 [NOTICE] switch_core_session.c:1668 Close Channel<br>
sofia/external/0725045121 [CS_DESTROY]<br>
2016-07-27 20:46:57.799501 [NOTICE] amds.js:86 Script exited with info []<br>
<br>
Can anyone say what is wrong?<br>
<br>
Thanks!<br>
<br>
Petr<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS"><br>
<br clear="all">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">&nbsp;<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">--
<o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">Anthony Minessale II &nbsp; &nbsp; &nbsp;
</span><span style="font-family:&quot;MS Mincho&quot;,serif">♬</span><span lang="CS"> @anthmfs&nbsp;&nbsp;</span><span style="font-family:&quot;MS Mincho&quot;,serif">♬</span><span lang="CS"> @FreeSWITCH&nbsp;&nbsp;</span><span style="font-family:&quot;MS Mincho&quot;,serif">♬</span><span lang="CS"><o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">&nbsp;<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:&quot;MS Mincho&quot;,serif">☞</span>
<span lang="CS"><a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a> &nbsp;</span><span style="font-family:&quot;MS Mincho&quot;,serif">☞</span>
<span lang="CS"><a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a> &nbsp;</span><span style="font-family:&quot;MS Mincho&quot;,serif">☞</span>
<span lang="CS"><a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><span style="font-family:&quot;MS Mincho&quot;,serif">☞</span>
<span lang="CS"><a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch&nbsp;</span><span style="font-family:&quot;MS Mincho&quot;,serif">☞</span>
<u><span lang="CS"><a href="http://freeswitch.org/g&#43;" target="_blank">http://freeswitch.org/g&#43;</a></span></u><span lang="CS"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">ClueCon Weekly Development Call&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:&quot;MS Mincho&quot;,serif">☎</span><span lang="CS">&nbsp;<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a> &nbsp;</span><span style="font-family:&quot;MS Mincho&quot;,serif">☎</span>
<span lang="CS"><a href="tel:%2B19193869900" target="_blank">&#43;19193869900</a>&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS">&nbsp;<o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS"><a href="https://www.youtube.com/watch?v=9XXgW34t40s" target="_blank"><span style="font-size:9.5pt;color:#1155CC">https://www.youtube.com/watch?v=9XXgW34t40s</span></a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="CS"><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank">https://www.youtube.com/watch?v=NLaDpGQuZDA</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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>
</blockquote>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>