<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>5 sep 2011 kl. 08:54 skrev Walter Doekes:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>before filing a bug report and writing a patch, I wanted some input on the following:<br><br>When using uncached realtime friends with transport=UDP,TCP users are allowed to register/call using either TCP or UDP. This works fine.<br><br>However, when asterisk calls the user, it always uses the "preferred" transport, namely the first option: UDP, *even* though the user registered with transport=tcp in the Contact header.<br></div></blockquote>Was it in the URI or in the header parameter? Can you please copy the contact here. If it's in the URI, it should be stored in the reg database.</div><div><br><blockquote type="cite"><div><br>The cause of this simple: the sipregs table has no place to store the transport -- except for the fullcontact column, see below -- ergo, it does not know that the client prefers (and in many cases, *only* does) TCP.<br><br>I see two easy solutions here:<br><br>(a) Add an extra column `transport` to the sipregs table where we store the "current" preferred protocol.<br><br>(b) Adjust chan_sip to store/read the fullcontact header if available. This is currently only written when rtcachefriends=yes, but I see no reason why we cannot use this for uncached friends. From the fullcontact, asterisk can read and use the transport= uri parameter.<br></div></blockquote>It should at least be stored in the peer structure, if not cached to astdb and/or realtime.<br><blockquote type="cite"><div><br><br>Both have their disadvantages:<br><br>(a) Needs extra backward compatibility code to check at runtime whether this extra column exists.<br><br>(b) I do not know why fullcontact is not already used for uncached friends. If it was deliberately not used for uncached friends, we can break things if we start using it. (It also suffers from the drawback of (a), but we get to remove some code at the same time, leaving the lines added/removed more balanced.)<br></div></blockquote>I can't comment on the TCP/TLS part of the code since that's been having a lot of issues (it's still marked experimental for a reason). If we go ahead and change the astdb structure, we should add</div><div>&nbsp;- expiry time for the registration</div><div>&nbsp;- asterisk version (to avoid issues when upgrading and make it possible to change the data structure in the future).</div><div><br></div><div>/O</div><div><blockquote type="cite"><div><br><br>Does anyone familiar with the fullcontact/sipregs code in chan_sip have anything to say about this?<br><br>Regards,<br>Walter Doekes<br>OSSO B.V.<br><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --<br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:<br> &nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>---</div><div>* Olle E Johansson -&nbsp;<a href="mailto:oej@edvina.net">oej@edvina.net</a></div><div>* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden</div><div><br class="webkit-block-placeholder"></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>