When I use the DIAL command, my goal is to announce, that subscriber has dialed a wrong number, when a number does not exist.

I cannot currently distinguish dialing wrong phone numbers from those that are temporarily unavailable. Although in traces I receive different results (480 temporary unavailable and 404 not found), the DIALSTATUS in both cases is CHANUNAVAIL. How to accomplish this?

There is additional functionality[1] to iterate and examine more specific hangup causes.


Thank you. This is what I looked for.

This function, HANGUPCAUSE, returns code description, not the code itself. For example, for the code AST_CAUSE_UNALLOCATED it returns Unallocated (unassigned) number, not the code itself. Is there a way to get codes?

HANGUPCAUSE[1] provides the ability to get the technology specific cause using the tech type or the Asterisk cause code. There is an example which outputs this on the original wiki page I gave. If this isn’t working you’ll need to provide precisely how you are using it and what you are getting.


I try to envoke {HANGUPCAUSE({item},ast), but insteade of code I get its description. For example, instead of AST_CAUSE_UNALLOCATED I get Unallocated (unassigned) number. Is this okey?

Yes, that is the way it works.

I understood, thank you very much.

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