Solved it with returning from Dial to Macro<br>exten =&gt; _X.,1,NoOp(SIPID1 = ${SIPCALLID})<br>exten =&gt; _X.,n,Dial(SIP/${EXTEN}@some_IP,120,M(to))<br><br>exten =&gt; h,1,NoOp<br>[macro-to]<br>exten =&gt; s,1,NoOp(${DIALSTATUS},1)<br>
exten =&gt; s,n,Set(SIPID2=${SIPCALLID})<br>exten =&gt; s,n,Set(CDR(sipid2)=${SIPID2})<br>exten =&gt; s,n,Set(CDR(userfield)=${SIPID2})<br><br><br>SIPID2 will provide Call ID for outbound call leg. I also tryed ${BRIDGEPEER} and ${BRIDGEPVTCALLID} but they don&#39;t show anything in my case.  <br>
<br><br><div class="gmail_quote">On Tue, Feb 15, 2011 at 3:15 PM, Borin <span dir="ltr">&lt;<a href="mailto:katerin.borin@gmail.com">katerin.borin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello everyone<br>Is there a possibility to catch an outbound callleg ID for the follovong scenario: some carrier -----&gt; ------(asterisk1) ---&gt;-----asterisk2 ?<br>I can get inbound callid for asterisk1 with a ${SIPCALLID} in extensions.conf or to look it up in cdrs field (are the same). But how about outbound? I have all calls just forwarded through asterisk1, not answered and for every call I have 1 cdr record with only inbound call leg callid. <br>

I can see all the call legs with  rasterisk -x &quot;sip show channels&quot;, but I would like to get the data in cdrs as well. Does anyone have any idea? I have asterisk 1.6.2 and I don&#39;t want to fork cdrs, just another field for the came call.  <br>

<br>Regards, Kate<br><br><br>
</blockquote></div><br>