[Home]

Summary:ASTERISK-07415: [patch][post 1.4] SIP support for PRI_CAUSE on Hangup() of unaswered calls...
Reporter:Eric Futch (efutch)Labels:
Date Opened:2006-07-28 16:07:02Date Closed:2006-08-08 09:48:14
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pricause-trunk.patch
Description:Currently, when a SIP call is hungup before it is answered, Asterisk always returns a 603 Declined message.  This patch allows you to use the PRI_CAUSE channel variable to set an alternative message.  The implementation is borrowed from chan_zap.c where it is used on actual PRI calls.  chan_sip.c already has the required functions to convert PRI causes to SIP message numbers.

It's important for us to send back the appropriate SIP response depending on why the call was hungup on so that our MetaSwitch will play the appropriate recording to people calling in from the PSTN.

Please note that this only affects calls that have not yet been answered.  I'm faily sure that ones that have been answered have to be ended with a BYE message.
Comments:By: Olle Johansson (oej) 2006-08-07 04:27:03

I think there may be another patch that handles this issue by adding a value to hangup(). I have some catching up to do, but will be back...

By: Olle Johansson (oej) 2006-08-08 03:37:39

It's actually in trunk:

"  Hangup([causecode]): This application will hang up the calling channel.\n"
       "If a causecode is given the channel's hangup cause will be set to the given\n"
       "value.\n"

By: Olle Johansson (oej) 2006-08-08 03:38:12

Maybe pri_cause should be deprecated.

By: Eric Futch (efutch) 2006-08-08 06:31:00

Last time I tried Hangup([causecode]) with trunk it didn't work.  I'll try it again later on today and post the results.

By: Eric Futch (efutch) 2006-08-08 08:46:19

Ok, it works with SIP in the newest trunk.  I guess we can say goodbye to PRI_CAUSE.

By: Olle Johansson (oej) 2006-08-08 09:48:03

Already fixed in trunk. Marked PRI_CAUSE as deprecated in upgrade.txt. Thanks for testing!