<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 10:56 AM, Scott Griepentrog <span dir="ltr"><<a href="mailto:sgriepentrog@digium.com" target="_blank">sgriepentrog@digium.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="color:rgb(102,0,0)">Hi all-</div><div style="color:rgb(102,0,0)"><br></div>
<div style="color:rgb(102,0,0)">I'm working on the ability to set the uniqueid on channel creation via ami and ari, and I've run into a quandary:</div>
<div style="color:rgb(102,0,0)"><br></div><div style="color:rgb(102,0,0)">When Asterisk dials over chan_local, it creates a LOCAL/something;1 channel, and another LOCAL/something;2 channel to handle the other end of the call.  If I'm specifying the uniqueid when I originate the call, I would presume it would be set to the ;1 channel, as that's the one I'm actually talking to.  But should there be something identifiable (rather than the standard 012345678.123 uniqueid format) on the ;2 channel?  For example, if I create the ;1 channel as 'MyCustomId', would it be useful to have the uniqueid of the ;2 channel be 'MyCustomId;2' ?</div>

<div style="color:rgb(102,0,0)"><br></div><div style="color:rgb(102,0,0)">Although it's probably not a good idea, it's not technically impossible to set the same 'MyCustomId' to both channels.  Any other ideas on how best to handle this?</div>
</div></blockquote><div><br></div><div>It is definitely not a good idea to have both the ;1 and ;2 channels to have the same uniqueid.<br>They are different channels and if you look up a channel by uniqueid you won't know which<br>
local channel you will get.<br><br></div><div>Pretty much the choices you have are:<br></div><div>1) Give ;1 the requested id and let the ;2 generate its own id.<br><br></div><div><div>2) Give ;1 the requested id and give the ;2 the same id with an 
appended ;2 or some other differentiator that lets the two channels be 
associated by a similar id.<br><br></div>3) Give ;1 the requested id and give the ;2 an extra given id by the requester.  This option has the drawback of requiring the user to pass two ids when creating a local channel.<br>
</div><br><div>Richard<br></div></div><br></div></div>