<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Arsen,<br>
      <br>
      Yes, you can try setting the AVP in branch route - it will have
      local (per branch only) effect, so you can do different values for
      each destination.<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
    <div class="moz-cite-prefix">On 10/11/2017 05:00 PM, Arsen wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CABoraY7yFSK8asbDMn2s=Cf5wK_fqaOgELvxiEsj76dY6XWWMA@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>Hi guys,</div>
              <div><br>
              </div>
              <div>I am trying to implement scenario when REGISTER
                requests are replicated to more than one server.
                Documentation says that each new server have to be added
                using append_branch function.</div>
              <div><br>
              </div>
              <div>So it will look like this:</div>
              <div><br>
              </div>
              <div>append_branch("sip:<a href="http://reg1.domain.com"
                  moz-do-not-send="true">reg1.domain.com</a>")</div>
              <div>append_branch("sip:<a href="http://reg2.domain.com"
                  moz-do-not-send="true">reg2.domain.com</a>") </div>
              <div>t_replicate("sip:<a href="http://reg3.domain.com"
                  moz-do-not-send="true">reg3.domain.com</a>")</div>
              <div><br>
              </div>
              <div>The servers must communicate via TLS. All servers
                form a cluster and share one main domain (tls default
                domain) for end users. For intra-servers communication I
                use self-signed certificates and mod tls_mgm. </div>
              <div><br>
              </div>
              <div>Replication only to one server works fine, I select
                client_domain by setting $avp(tls_cli_dom) avp right
                before t_replicate("<a href="http://reg2.domain.com"
                  moz-do-not-send="true">reg2.domain.com</a>");</div>
              <div><br>
              </div>
              <div>Now the issue: what is the best way to set
                client_domain avp for each particular domain in the
                cluster so, for example, to replicate to <a
                  href="http://reg1.domain.com" moz-do-not-send="true">reg1.domain.com</a>
                opensips will use client crt for reg1, for <a
                  href="http://reg2.domain.com" moz-do-not-send="true">reg2.domain.com</a>
                cert for reg2 and so on.</div>
              <div><br>
              </div>
              <div>can I set  client_domain_avp in the branch route? </div>
              <div><br>
              </div>
              <div>branch_route[1] {</div>
              <div><br>
              </div>
              <div>if ($rd == "<a href="http://reg1.domain.com"
                  moz-do-not-send="true">reg1.domain.com</a>")</div>
              <div>        $avp(tls_cli_dom) = "reg1";</div>
              <div>    else if ($rd == "<a href="http://reg2.domain.com"
                  moz-do-not-send="true">reg2.domain.com</a>")</div>
              <div>        $avp(tls_cli_dom) = "reg2";</div>
              <div>...</div>
              <div>}</div>
            </div>
          </div>
        </div>
        <div>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>Thanks,</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div><span style="font-size:12.8px">Arsen Semionov</span><br>
                  </div>
                  <div><a href="http://www.eurolan.info" target="_blank"
                      moz-do-not-send="true">www.eurolan.info</a></div>
                  <div>cell: +442035198881</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>