<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello Daniel,<div class=""><br class=""></div><div class="">for my needs it works with the socket name, however it of course would be a good enhancement to be able to evaluate attrs for variables.</div><div class=""><br class=""></div><div class="">Best Regards</div><div class=""><br class=""></div><div class="">Markus<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Am 22.10.2021 um 15:40 schrieb Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" class="">miconda@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
  
  <div class=""><p class="">Hello,</p><p class="">Karsten's suggestion is indeed a good way.</p><p class="">The preprocessor for kamailio.cfg is tightly integrated in the
      config interpreter, using lex/yacc to replace defined IDs with
      their associated value, that code cannot be easily reused for
      dispatcher input. Probably a simpler approach would be to evaluate
      attrs for variables, $def(ID) returning the values of '#!define ID
      ...', because the internal API for variables is available in
      modules, but it requires some C coding.</p><p class="">Cheers,<br class="">
      Daniel<br class="">
    </p>
    <div class="moz-cite-prefix">On 20.10.21 09:38, Markus Bönke wrote:<br class="">
    </div>
    <blockquote type="cite" cite="mid:EDB948C0-75CE-4281-B68D-04920B4847A5@tenios.de" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
      Hallo Karsten,
      <div class=""><br class="">
      </div>
      <div class="">thanks for the hint! With some modifications in my
        script it can work.</div>
      <div class=""><br class="">
      </div>
      <div class="">Best regards</div>
      <div class=""><br class="">
      </div>
      <div class="">Markus<br class="">
        <div class=""><br class="">
          <blockquote type="cite" class="">
            <div class="">Am 19.10.2021 um 16:21 schrieb Karsten
              Horsmann <<a href="mailto:khorsmann@gmail.com" class="" moz-do-not-send="true">khorsmann@gmail.com</a>>:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div dir="ltr" class="">Hi Markus,
                <div class=""><br class="">
                </div>
                <div class="">not testet but looked at latest doc
                  'sockname' instead of socket could be a solution.<br class="">
                  So you label your sockets with "name" in the listen
                  directive (in config file) and use 'sockname' in
                  dispatcher table.<a href="https://kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.ex.attributes" class="" moz-do-not-send="true">https://kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.ex.attributes</a><span style="font-family: Helvetica, Arial, sans-serif;
                    font-size: 15px; text-align: justify;" class=""><br class="">
                  </span></div>
                <div class="">
                  <pre class="gmail-programlisting" style="background-color: rgb(252, 255, 252); border: 1px solid rgb(153, 204, 204); padding-left: 15pt; overflow: auto; border-top-left-radius: 2.5px; border-top-right-radius: 2.5px; border-bottom-right-radius: 2.5px; border-bottom-left-radius: 2.5px; font-size: 15px;">listen=udp:<a href="http://1.2.3.4:5060/" class="" moz-do-not-send="true">1.2.3.4:5060</a> name "sock1"</pre>
                </div>
              </div>
              <br class="">
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">Am Di., 19. Okt. 2021
                  um 15:13 Uhr schrieb Markus Bönke <<a href="mailto:mb@tenios.de" class="" moz-do-not-send="true">mb@tenios.de</a>>:<br class="">
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">Hello all,<br class="">
                  <br class="">
                  I’ve a question regarding the dispatcher module. So
                  far we use on every server a separate database table,
                  where the attribute column is set to the local
                  internal or external socket like
                  "socket=<a class="moz-txt-link-freetext" href="udp:192.168.1.70:5060%E2%80%9C">udp:192.168.1.70:5060“</a> or
                  socket=<a class="moz-txt-link-freetext" href="udp:80.239.xxx.xxx:5060">udp:80.239.xxx.xxx:5060</a>. Is there a way to use
                  constants here like socket=<a class="moz-txt-link-freetext" href="udp:IPADDR_INTERN:5060">udp:IPADDR_INTERN:5060</a> or
                  socket=<a class="moz-txt-link-freetext" href="udp:IPADDR_EXTERN:5060">udp:IPADDR_EXTERN:5060</a> which are replaced when
                  the data is loaded from the DB? <br class="">
                  <br class="">
                  <br class="">
                  Thanks and regards<br class="">
                  <br class="">
                  Markus<br class="">
__________________________________________________________<br class="">
                  Kamailio - Users Mailing List - Non Commercial
                  Discussions<br class="">
                    * <a href="mailto:sr-users@lists.kamailio.org" target="_blank" class="" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br class="">
                  Important: keep the mailing list in the recipients, do
                  not reply only to the sender!<br class="">
                  Edit mailing list options or unsubscribe:<br class="">
                    * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank" class="" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class="">
                </blockquote>
              </div>
              <br class="" clear="all">
              <div class=""><br class="">
              </div>
              -- <br class="">
              <div dir="ltr" class="gmail_signature">Mit freundlichen
                Grüßen<br class="">
                *Karsten Horsmann*<br class="">
              </div>
              __________________________________________________________<br class="">
              Kamailio - Users Mailing List - Non Commercial Discussions<br class="">
               * <a href="mailto:sr-users@lists.kamailio.org" class="" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br class="">
              Important: keep the mailing list in the recipients, do not
              reply only to the sender!<br class="">
              Edit mailing list options or unsubscribe:<br class="">
               * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" class="" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class="">
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com/">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
Nov 08-11, 2021 (Europe Timezone) - Nov 22-25, 2021 (America Timezone)
  * <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </div>

</div></blockquote></div><br class=""></div></body></html>