<div dir="ltr">On Tue, Jul 12, 2011 at 00:22, Philippe Sultan <span dir="ltr"><<a href="mailto:philippe.sultan@gmail.com">philippe.sultan@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The destination channel dies right after your Dial statement exits,<br>
but you can retrieve the info in the channel that's still alive :<br>
exten => _XXX,n,Dial(SIP/${EXTEN})<br>
exten => _XXX,n,NoOp(SIP return code : ${HASH(SIP_CAUSE,${CDR(dstchannel)})})<br>
<br>
Works fine on the Asterisk server I'm running (1.8.3.3).<br></blockquote><div><br>Thanks, that works for me as well.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Philippe<br></blockquote><div><br>Ido<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5"><br>
On Mon, Jul 11, 2011 at 11:01 PM, ik <<a href="mailto:idokan@gmail.com">idokan@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I'm trying to figure out what was the return code of SIP for a call.<br>
> The problem is that HASH(SIP_CAUSE) require a peer name, but when I try to<br>
> retrieve the peer name using ${CHANNEL(peername)}, I have an error message<br>
> that CHANNEL does not have peername or it is not available to be used.<br>
> I tried to print it with NOOP on a live channel, and also after hangup, both<br>
> with the same error message.<br>
><br>
> So how can I get SIP_CAUSE, or how can I get the peer name ?<br>
><br>
> Thanks,<br>
><br>
> Ido<br>
><br>
</div></div>> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
> New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
> <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
<br>
<br>
<br>
--<br>
Philippe Sultan<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br></div>