<html>
<head>
<style>
 .sw_message P{margin:0px;padding:0px;}
 .sw_message {FONT-SIZE: 12pt;FONT-FAMILY:Tahoma,Arial,Helvetica,sans-serif;background:white;}
 .sw_message blockquote{margin-left:5px;padding-left:5px;border-left:2px solid #144fae;color: #144fae;}
 .sw_message blockquote blockquote{border-left:2px solid #006312;color: #006312;}
 .sw_message blockquote blockquote blockquote{border-left:2px solid #8e5656;color: #8e5656;}
 .sw_message blockquote blockquote blockquote blockquote{border-left:2px solid #888;color: #888;}
</style>
</head>
<body class="sw_message">
<div>Hi Richard,</div><div><br></div><div>That was a very good tip indeed. But I had to do some more tricks to get it to work.</div><div>Here is what I did if anyone has same issue:</div><div>1. Incoming call comes in to Stasis app</div><div>2. Create bridge</div><div>3. Move first channel to bridge</div><div>4. Create second outgoing channel</div><div>5. Set channel variables, CONNECTEDLINE(num)</div><div>6. Now do Dial()</div><div>7. Sleep 100ms (maybe some event we can wait for here)</div><div>8. Now move channel into bridge.</div><div><br></div><div>So dialling before moving and a short pause was the trick. (Dont ask why)</div><div><span style="font-size: 12pt;">Also, I had to set sendrpid=0 as my ITSP doea not like the re-invite.</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">Thanks again Richard!</span></div><div> </div><div id="editor_signature"></div><div>On Friday 09/12/2016 at 18:35, Richard Mudgett  wrote: </div><blockquote type="cite"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 9, 2016 at 8:54 AM,  <span><<a href="mailto:sven.evensen@teletopia.com" target="_blank">sven.evensen@teletopia.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">Hi All,<br><br>I have a scenario where an incoming external call comes into Asterisk and into my Stasis application, I there check my database to find the destination so I can route the call there. I follow the recommended procedure:<br>1. Create bridge<br>2. Create channel for outbound call<br>3. Add incoming channel to bridge<br>4. Add outbound channel to bridge<br>5. Dial() destination.<br><br>I have Asterisk 14.1 and I use Ari4Java. I try to set some channel variables before the Dial(), both "SIPFROMUSER" and "CALLERID(num)". These values I can see when the call proceeds and I receive Dial events. So it seems Ari4java is doing the right thing. But no matter what, the second outbound call gets the callerId of the inbound call.<br><br>Has anyone been able to do what I am attempting. It seems like a very normal feature, should be possible.<br></blockquote><div><br></div><div>You need to understand the relationship between caller-id and connected-line.<br></div><div>See the link [1] for further information.<br><br></div><div>Richard<br><br>[1] <a target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information#ManipulatingPartyIDInformation-PartyIDpropagation">https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information#ManipulatingPartyIDInformation-PartyIDpropagation</a><br></div></div><br></div></div>-- <br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a target="_blank" href="http://www.api-digital.com">http://www.api-digital.com</a> --<br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:<br>      <a target="_blank" href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote><br> 
</body></html>