Hello, I read on the wiki : Asterisk 1.8 will allow to read SIP response codes in the dialplan via *${HASH(SIP_CAUSE,<channel-name>)}*. Additionally make sure you're using the destination channel, not the source channel. But when I use this in my dialplan, this 'variable' is empty. Dialplan : exten => h,n,NoOp(sip cause = ${HASH(SIP_CAUSE,${CHANNEL})}) exten => h,n,NoOp(sip cause = ${HASH(SIP_CAUSE,CHANNEL)}) CLI : [Oct 30 14:48:03] -- Executing [h at pbx-routing:5] NoOp("SIP/SipAT01-00000015", "sip cause = ") in new stack [Oct 30 14:48:03] -- Executing [h at pbx-routing:6] NoOp("SIP/SipAT01-00000015", "sip cause = ") in new stack Can anyone tell me how this should be used ? Kind regards, Jonas. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20141030/12ccf117/attachment.html>
On 30/10/14 13:52, Jonas Kellens wrote:> Hello, > > I read on the wiki : > > Asterisk 1.8 will allow to read SIP response codes in the dialplan via > *${HASH(SIP_CAUSE,<channel-name>)}*. Additionally make sure you're > using the destination channel, not the source channel. > > But when I use this in my dialplan, this 'variable' is empty. > > Dialplan : > > exten => h,n,NoOp(sip cause = ${HASH(SIP_CAUSE,${CHANNEL})}) > exten => h,n,NoOp(sip cause = ${HASH(SIP_CAUSE,CHANNEL)}) > > CLI : > > [Oct 30 14:48:03] -- Executing [h at pbx-routing:5] > NoOp("SIP/SipAT01-00000015", "sip cause = ") in new stack > [Oct 30 14:48:03] -- Executing [h at pbx-routing:6] > NoOp("SIP/SipAT01-00000015", "sip cause = ") in new stack > >Take a look at my blog entry about it :- http://gblades.blogspot.co.uk/2013/07/how-to-get-sip-response-code-in.html -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20141030/ddaa79e9/attachment.html>
On Thu, Oct 30, 2014 at 9:52 AM, Jonas Kellens <jonas.kellens at telenet.be> wrote:> Hello, > > I read on the wiki : > > Asterisk 1.8 will allow to read SIP response codes in the dialplan via > ${HASH(SIP_CAUSE,<channel-name>)}. Additionally make sure you're using the > destination channel, not the source channel. > > But when I use this in my dialplan, this 'variable' is empty. > > Dialplan : > > exten => h,n,NoOp(sip cause = ${HASH(SIP_CAUSE,${CHANNEL})}) > exten => h,n,NoOp(sip cause = ${HASH(SIP_CAUSE,CHANNEL)}) > > CLI : > > [Oct 30 14:48:03] -- Executing [h at pbx-routing:5] > NoOp("SIP/SipAT01-00000015", "sip cause = ") in new stack > [Oct 30 14:48:03] -- Executing [h at pbx-routing:6] > NoOp("SIP/SipAT01-00000015", "sip cause = ") in new stack > > > Can anyone tell me how this should be used ? >sip.conf: storesipcause=yes -- Paul Belanger | PolyBeacon, Inc. Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode) Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger