<p>I would go for first option if it is the fastest at runtime by avoiding workarounds. I don't expect to be a very dynamic part in the future, so we ca live with two dedicated parts of code there.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/678#issuecomment-227352091">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AF36Zd4GwLgkVc8oVrPq1eZTPc7A_70bks5qN4U7gaJpZM4I6XsJ">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZaD_86iXJLG--tQ7AnS2Nr7P-hgDks5qN4U7gaJpZM4I6XsJ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/678#issuecomment-227352091"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>