Hi All, Is there a way to change the mappings of disconnect reasons to certain SIP messages? E.G. I need to change the mapping for SIP 402 ?Payment Required? from 16 (normal termination) like it is in 1.4.24 to 21 (call rejected) as defined in RFC 3398. For me this is a big issue because my dial plan will look for alternative termination in the event of network error (e.g. reason 3 or 21 which is resulting call status ?CONGESTION?) but will not do so for all normal terminations (16, Normal Termnation, 17 Busy, 18 No Answer). Thanks, Harel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100802/73c7c907/attachment-0001.htm
Hi!> Is there a way to change the mappings of disconnect reasons to certain > SIP messages? E.G. I need to change the mapping for SIP 402 "Payment > Required" from 16 (normal termination) like it is in 1.4.24 to 21 > (call rejected) as defined in RFC 3398.* if you think the mapping is wrong, then you should open a ticket on the Asterisk bug tracker * the mapping can only be changed in the code - which you ahve * Asterisk 1.8 will allow to read SIP response codes in the dialplan via {HASH(SIP_CAUSE,<channel-name>)}. Asterisk 1.8 also comes with a 'use_q850_reason' configuration option for generating and parsing, if available, "Reason: Q.850;cause=<cause code>". Philipp
On Tuesday 03 August 2010 06:21:23 Philipp von Klitzing wrote:> > Is there a way to change the mappings of disconnect reasons to certain > > SIP messages? E.G. I need to change the mapping for SIP 402 "Payment > > Required" from 16 (normal termination) like it is in 1.4.24 to 21 > > (call rejected) as defined in RFC 3398. > > * if you think the mapping is wrong, then you should open a ticket on the > Asterisk bug trackerActually, much of the mapping is specified by RFC 3398 section 8.2.6.1. Thus, if you think the mapping is wrong, you should submit a suggestion for amendment to the RFC editor. Only for response codes specified differently than in this section should you open an issue in the tracker. -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org
Tilghman, thank you for your reply. The mapping in RFC 3398 is logically correct therefore I do not need to submit a suggestion to its editor. The mapping in Asterisk 1.4.24 is the problem: 402 "Payment Required" is mapped to 16 "Normal termination" instead of 21 "Call Rejected". Could you direct me to the relevant file of code where these mappings are done? Before reporting a bug I would like to confirm whether this issue has been addressed on newer releases. Thanks, Harel ------------------------------ On Tuesday 03 August 2010 06:21:23 Philipp von Klitzing wrote:> > Is there a way to change the mappings of disconnect reasons to certain > > SIP messages? E.G. I need to change the mapping for SIP 402 "Payment > > Required" from 16 (normal termination) like it is in 1.4.24 to 21 > > (call rejected) as defined in RFC 3398. > > * if you think the mapping is wrong, then you should open a ticket on the > Asterisk bug trackerActually, much of the mapping is specified by RFC 3398 section 8.2.6.1. Thus, if you think the mapping is wrong, you should submit a suggestion for amendment to the RFC editor. Only for response codes specified differently than in this section should you open an issue in the tracker. -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org
> The mapping in Asterisk 1.4.24 is the problem: 402 "Payment Required" > is mapped to 16 "Normal termination" instead of 21 "Call Rejected". > Could you direct me to the relevant file of code where these mappings > are done? Before reporting a bug I would like to confirm whether this > issue has been addressed on newer releases.Look in channels/chan_sip.c and search for "3398" See also: http://www.voip- info.org/wiki/index.php?page=Asterisk+variable+hangupcause Philipp
Sorry for the late response. Philipp, I've checked the file below and also the suggested voip-info link. None of those describe how or why Asterisk assumed that 402 should be mapped to "NORMAL TERMINATION" status. Both places refer to how Asterisk status should be mapped to SIP cause and not vice-versa. Could you (or someone) please take another look to locate the correct file? Thanks Harel ------------------------------ Message: 4 Date: Wed, 04 Aug 2010 15:20:05 +0200 From: Philipp von Klitzing <klitzing at pool.informatik.rwth-aachen.de> Subject: Re: [asterisk-users] mapping of disconnect reasons To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Message-ID: <4C598525.14932.1D6237 at klitzing.pool.informatik.rwth-aachen.de> Content-Type: text/plain; charset=US-ASCII> The mapping in Asterisk 1.4.24 is the problem: 402 "Payment Required" > is mapped to 16 "Normal termination" instead of 21 "Call Rejected". > Could you direct me to the relevant file of code where these mappings > are done? Before reporting a bug I would like to confirm whether this > issue has been addressed on newer releases.Look in channels/chan_sip.c and search for "3398" See also: http://www.voip- info.org/wiki/index.php?page=Asterisk+variable+hangupcause Philipp ------------------------------