Hangup cause function -extended

Hi there Community,

I’ve been trying to properly understand if Hangupcause() function could display extended information,

The Wiki shows some syntax but i don’t really get it.

With HANGUPCAUSE(channel,type) i should get:

Channel: channel/dstchannel or Channel Type (SIP, pjSIP for ex)?
Type: Would be the Cause Code “Language” (For example, ISDN)?

Hope the idea is clear
Kind Regards!

As documented in:

there are only two possible values of type:

tech gives the value from the channel driver, in some sort of native format;

ast gives a text translation of the internal code, as per the long string in the table at:

The internal codes are based on the ISDN (ISUP) values.

Channel (a few lines up in the first extract) is the name of the channel.

1 Like

Thanks a lot for your reply!
So, Tech will prompt me the following information? Values

Kind Regards

I believe that tech will give you what the channel driver originally saw, so for chan_sip or chan_pjsip it will be what was in the status line of the response. Without trying it, I’m not sure whether it includes both number and description.

The table you referenced only applies to what gets sent as a status to the remote endpoint.

Some SIP codes may map many to one to the internal code. The purpose of the function is to allow you to see what was actually received not what it got translated to.

1 Like

Dear @david551 as always,
Thanks a lot for your advices!

This is water clear for me now
Kind Regards

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.