Using Calls Rejection Reasons

Home » Asterisk Users » Using Calls Rejection Reasons
Asterisk Users 4 Comments

Hello all,

We would like to “inform” the caller of the reason for a failed call.

For example, when we get a “486 Busy Here”, the system accepts it and in the
CLI we see “Everyone is busy/congested at this time”.

Can we use this data to play an announcement to the caller?

Thank you in advance for your help.

Michael

4 thoughts on - Using Calls Rejection Reasons

  • _____

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com
    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of VoIP Question
    Sent: Wednesday, October 20, 2010 8:51 AM

    Hello all,

    We would like to “inform” the caller of the reason for a failed call.

    For example, when we get a “486 Busy Here”, the system accepts it and in the
    CLI we see “Everyone is busy/congested at this time”.

    Can we use this data to play an announcement to the caller?

    Thank you in advance for your help.

    Michael

    Yes. You can use the built-in options and sounds like this:

    Exten => 123,1,dial(SIP/100,30,m)

    Exten => 123-BUSY,1,playback(all-reps-busy)

    Exten => 123-BUSY,n,hangup

    Exten => 123-CONGESTION,1,playback(all-circuits-busy-now)

    Exten => 123-CONGESTION,n,hangup

    Or you can get “fancy” and interpret the return and play back a verbatim
    message through swift/Cepstral. That’s another post.

  • Thank you guys for the quick answer.

    To complicate it a bit, is there a way to extract the rejection reason (in
    this case 486) without using the DIALSTATUS and to use it? It can be useful
    for rejections that are not handled by DIALSTATUS.

  • Hi!

    If the other side is also an Asterisk system: When call is hang up that
    involves a SIP channel, Asterisk sends the extra SIP headers “X-Asterisk-
    HangupCause” and “X-Asterisk-HangupCauseCode” in in the BYE message.
    You can read this using the SIP_HEADER() function in the h extension.

    Asterisk 1.8 will allow to read SIP response codes in the dialplan via
    {HASH(SIP_CAUSE,)}.
    Asterisk 1.8 also comes with a ‘use_q850_reason’ configuration option for
    generating and parsing, if available, “Reason: Q.850;cause=“.

    See:
    http://www.voip-
    info.org/wiki/index.php?page=Asterisk+variable+hangupcause

    Apart from the two approaches outlined above the answer is to your
    question is “no”: You would need a real SIP proxy to do that.

    Philipp