<div dir="ltr"><div class="gmail_default" style="color:#660000">An in the long run that's probably a lot easier. But not as cool. ;-)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 29, 2013 at 3:54 PM, Olle E. Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div class="im"><div>On 29 Oct 2013, at 20:38, Scott Griepentrog <<a href="mailto:sgriepentrog@digium.com" target="_blank">sgriepentrog@digium.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="color:#660000">One I totally commiserate with... ;-)</div><div class="gmail_default" style="color:#660000"><br></div><div class="gmail_default" style="color:#660000">
What I was envisioning though is a "wrapper" function which would translate the existing value into the required format. So you would have to do a search/replace and wrap each reference to the error code with the error_to_isdn() function so that everything still works correctly. The references in sip code could then use error_to_sip() instead, and in both cases you set the error based on what you have (isdn or sip). Kinda like ulaw/alaw translation, you save what you have, and translate it from what's there to what you need if you need to. Difference being that since the values don't overlap, the value also tells you if it's in ISDN or SIP. I think it's totally doable - and would then resolve the issue of certain SIP error codes getting lost in translation to/from ISDN. Also provides then a path between SIP & PJSIP.</div>
</div></blockquote></div>Or just add a SIp error code to the channel structure and use both in parallell. Each channel MUST provide ISDN and MAY provide a SIP error code to get more granularity.</div><div><div class="h5">
<div><br></div><div>/O<br><blockquote type="cite"><div dir="ltr">
<div class="gmail_default" style="color:#660000"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 29, 2013 at 2:21 PM, Olle E. Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div>On 29 Oct 2013, at 19:00, Scott Griepentrog <<a href="mailto:sgriepentrog@digium.com" target="_blank">sgriepentrog@digium.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="color:rgb(102,0,0)">I like that idea. A value >128 means a SIP code, and <128 means an ISDN code, and you can then use the original native code or translate to the desired range by using a to_sip() or to_isdn() function.</div>
<div class="gmail_default" style="color:rgb(102,0,0)"><br></div><div class="gmail_default" style="color:rgb(102,0,0)">Or would it create inconsistencies that would break customer's solutions?</div></div></blockquote>
<br></div>The problem is that we're still a multiprotocol PBX. Switching to SIP may hurt other channels</div><div>and be as stupid as ISDN. Now, SIP has more finegrained error codes than ISDN, so translation</div><div>
will be better for most channels.</div><div><br></div><div>I know that I'm contradicting myself. That's an art form you learn as you grow older ;-)</div><div><span><font color="#888888">/O</font></span><div>
<div><br><blockquote type="cite"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Oct 29, 2013 at 11:21 AM, Tilghman Lesher <span dir="ltr"><<a href="mailto:tilghman@meg.abyt.es" target="_blank">tilghman@meg.abyt.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Tue, Oct 29, 2013 at 10:43 AM, Olle E. Johansson <<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>> wrote:<br>
><br>
> On 29 Oct 2013, at 15:33, Tilghman Lesher <<a href="mailto:tilghman@meg.abyt.es" target="_blank">tilghman@meg.abyt.es</a>> wrote:<br>
><br>
>> On Tue, Oct 29, 2013 at 4:01 AM, Olle E. Johansson <<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>> wrote:<br>
</div><div>>>> The questions are:<br>
>>> - is this too dangerous, to grab some ISDN cause codes?<br>
>>> - will it have side effects?<br>
>>> - what will other channels do if they get a hangup(119) ?<br>
>>><br>
>>> All of this is of course a bit dangerous and have to be used only by<br>
>>> experienced asterisk admins, but is something that have been asked for for a<br>
>>> long time. There is nothing stopping you from redefining any cause code to<br>
>>> 401, 180 or something else, like 302. But that will hurt...<br>
>><br>
>> The only thing I fear from such a change is that it will lead to a<br>
>> support nightmare if any of the cause codes that you've appropriated<br>
>> are eventually used in another way by the ITU. Since that's the<br>
>> standards body involved with the definition of ISDN, I'd suggest that<br>
>> you obtain from them an assurance that such cause codes land in a<br>
>> "reserved" or "vendor-defined" state, to avoid this potential<br>
>> future-compatibility issue. It also creates a potential future issue<br>
>> within Asterisk, whereby if the lowest cause code is allocated, and<br>
>> that custom code needs to be moved, then there will be an issue with<br>
>> "custom1" being assigned to a different integer on two different<br>
>> versions of Asterisk. This only potentially matters when the cause<br>
>> code is transmitted externally, as we might in the ISDN driver.<br>
><br>
> Noted.<br>
><br>
> Eventually I want a core that is not based on ISDN anymore. But that's another story.<br>
<br>
</div>Speaking historically, we could just have easily chosen SIP cause<br>
codes as the internal representation. Or we could have made up our<br>
own. For that matter, if the issue is backwards compatibility to<br>
ISDN, then using values in the 128+ range would make sense, possibly<br>
enjoining the ISDN driver from sending those codes directly. Assuming<br>
that you wouldn't want to ever send a SIP cause code lower than 128,<br>
using the SIP cause code directly in this field (it is, after all, a<br>
full integer) may be preferable. If you would need to send lower<br>
values, however, then multiplying the SIP cause code by a certain<br>
factor (say 1,000) may be sufficient. Changes would need to be made,<br>
though, to ensure that other areas of Asterisk do not assume that the<br>
value will fit within a single 8-bit field.<br>
<span><font color="#888888"><br>
-Tilghman<br>
</font></span><div><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><img alt="Digium logo" width="288" height="50" style="font-family:Arial,Helvetica,sans-serif;font-size:12px"><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px">
<strong style="font-family:Arial,Helvetica,sans-serif;font-size:12px">Scott Griepentrog</strong><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px">Digium, Inc · Software Developer</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="font-family:Arial,Helvetica,sans-serif;font-size:12px">445 Jan Davis Drive NW · Huntsville, AL 35806 · US</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="font-family:Arial,Helvetica,sans-serif;font-size:12px">direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="font-family:Arial,Helvetica,sans-serif;font-size:12px">Check us out at: </span><a href="http://www.digium.com/" style="font-family:Arial,Helvetica,sans-serif;font-size:12px" target="_blank">http://digium.com</a><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px"> · </span><a href="http://www.asterisk.org/" style="font-family:Arial,Helvetica,sans-serif;font-size:12px" target="_blank">http://asterisk.org</a><br>
</div>
</div>
-- <br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" target="_blank">http://www.api-digital.com</a> --<br><br>asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote></div></div></div><br></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">
<img alt="Digium logo" width="288" height="50" style="font-family:Arial,Helvetica,sans-serif;font-size:12px"><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px">
<strong style="font-family:Arial,Helvetica,sans-serif;font-size:12px">Scott Griepentrog</strong><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px">Digium, Inc · Software Developer</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="font-family:Arial,Helvetica,sans-serif;font-size:12px">445 Jan Davis Drive NW · Huntsville, AL 35806 · US</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="font-family:Arial,Helvetica,sans-serif;font-size:12px">direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="font-family:Arial,Helvetica,sans-serif;font-size:12px">Check us out at: </span><a href="http://www.digium.com/" style="font-family:Arial,Helvetica,sans-serif;font-size:12px" target="_blank">http://digium.com</a><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px"> · </span><a href="http://www.asterisk.org/" style="font-family:Arial,Helvetica,sans-serif;font-size:12px" target="_blank">http://asterisk.org</a><br>
</div>
</div>
-- <br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br><br>asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote></div><br></div></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">
<img alt="Digium logo" src="https://my.digium.com/images/graphics/digium_RGB_signature.gif" width="288" height="50" style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px"><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">
<strong style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">Scott Griepentrog</strong><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px"><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">Digium, Inc · Software Developer</span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">445 Jan Davis Drive NW · Huntsville, AL 35806 · US</span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029</span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">Check us out at: </span><a href="http://www.digium.com" style="font-family:Arial,Helvetica,sans-serif;font-size:12px" target="_blank">http://digium.com</a><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px"> · </span><a href="http://www.asterisk.org" style="font-family:Arial,Helvetica,sans-serif;font-size:12px" target="_blank">http://asterisk.org</a><br>
</div>
</div>