Re: [asterisk-users] ${HASH(SIP_CAUSE, ...)} and peer name

2011-07-12 Thread ik
On Tue, Jul 12, 2011 at 00:22, Philippe Sultan philippe.sul...@gmail.comwrote:

 The destination channel dies right after your Dial statement exits,
 but you can retrieve the info in the channel that's still alive :
 exten = _XXX,n,Dial(SIP/${EXTEN})
 exten = _XXX,n,NoOp(SIP return code :
 ${HASH(SIP_CAUSE,${CDR(dstchannel)})})

 Works fine on the Asterisk server I'm running (1.8.3.3).


Thanks, that works for me as well.



 Philippe


Ido



 On Mon, Jul 11, 2011 at 11:01 PM, ik ido...@gmail.com wrote:
  Hello,
 
  I'm trying to figure out what was the return code of SIP for a call.
  The problem is that HASH(SIP_CAUSE) require a peer name, but when I try
 to
  retrieve the peer name using ${CHANNEL(peername)}, I have an error
 message
  that CHANNEL does not have peername or it is not available to be used.
  I tried to print it with NOOP on a live channel, and also after hangup,
 both
  with the same error message.
 
  So how can I get SIP_CAUSE, or how can I get the peer name ?
 
  Thanks,
 
  Ido
 
  --
  _
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
  New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 



 --
 Philippe Sultan

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] ${HASH(SIP_CAUSE, ...)} and peer name

2011-07-11 Thread ik
Hello,

I'm trying to figure out what was the return code of SIP for a call.
The problem is that HASH(SIP_CAUSE) require a peer name, but when I try to
retrieve the peer name using ${CHANNEL(peername)}, I have an error message
that CHANNEL does not have peername or it is not available to be used.
I tried to print it with NOOP on a live channel, and also after hangup, both
with the same error message.

So how can I get SIP_CAUSE, or how can I get the peer name ?

Thanks,

Ido
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] ${HASH(SIP_CAUSE, ...)} and peer name

2011-07-11 Thread Philippe Sultan
The destination channel dies right after your Dial statement exits,
but you can retrieve the info in the channel that's still alive :
exten = _XXX,n,Dial(SIP/${EXTEN})
exten = _XXX,n,NoOp(SIP return code : ${HASH(SIP_CAUSE,${CDR(dstchannel)})})

Works fine on the Asterisk server I'm running (1.8.3.3).

Philippe

On Mon, Jul 11, 2011 at 11:01 PM, ik ido...@gmail.com wrote:
 Hello,

 I'm trying to figure out what was the return code of SIP for a call.
 The problem is that HASH(SIP_CAUSE) require a peer name, but when I try to
 retrieve the peer name using ${CHANNEL(peername)}, I have an error message
 that CHANNEL does not have peername or it is not available to be used.
 I tried to print it with NOOP on a live channel, and also after hangup, both
 with the same error message.

 So how can I get SIP_CAUSE, or how can I get the peer name ?

 Thanks,

 Ido

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Philippe Sultan

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users