[asterisk-dev] Potentially naughty patch

Olle E. Johansson oej at edvina.net
Mon Oct 28 13:46:25 CDT 2013


Friends,

I did something that may cause issues today, but solved a lot of issues. I need your feedback on this.

I have a branch that makes it possible to add custom mappings to the isdn cause code to SIP codes table in chan_sip - and the opposite ones.

In order to a fine grained control I may want a cause code to send a very specific SIP message, maybe even a custome one. And in some cases I want to translate a specific SIP code to the same without affecting other calls in sip2sip situations.

My solution was to add five custom codes to the cause table - custom1 to custom5 in the range 115-119 that is not used as far as I can tell.

This solved the problem we worked on and also added the benefit of being able to run "hangup(118)" on a SIP call to generate "498 IAX2 not supported" in the SIP channel.

The questions are:
- is this too dangerous, to grab some ISDN cause codes?
- will it have side effects?
- what will other channels do if they get a hangup(119) ?

All of this is of course a bit dangerous and have to be used only by experienced asterisk admins, but is something that have been asked for for a long time. There is nothing stopping you from redefining any cause code to 401, 180 or something else, like 302. But that will hurt...

Cheers,
/O


---
* Olle E Johansson - oej at edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131028/c2d06fa8/attachment.html>


More information about the asterisk-dev mailing list