<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <tt>Maybe, on the first pass through opensips you could save the
      domain part into a custom hdr (before sending to Asterisk) and
      configure Asterisk to propagate this hdr. On the second pass
      through, opensips will do the uac_replace_from() based on that
      hdr...<br>
      <br>
      Just an idea :)<br>
      <br>
      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>
    <br>
    On 02/28/2013 09:03 PM, Duane Larson wrote:
    <blockquote
cite="mid:CAFcM1Eq3m4gEMH9Y7dt+hdRjkczR40vFmyfRsOu7a-GHpbr6nw@mail.gmail.com"
      type="cite">Right I will use uac_replace_from to update the from
      domain but the issue is that when the INVITE comes back from the
      Asterisk server the original FROM domain is no longer anywhere in
      the INVITE. &nbsp;So I need to save it with the dialog variables before
      I send it to Asterisk so that when it comes back from Asterisk I
      recognize the INVITE thanks to the fU and rU and can find the
      dialog variable I saved.
      <div>
        <br>
      </div>
      <div>The INVITE that comes back from Asterisk is a new dialog with
        its own CALLID and totag created by Asterisk.</div>
      <div><br>
      </div>
      <div>I'll try just using the uac_replace_from() function and see
        if that helps before I get complicated with the dialog variables
        stuff.<br>
        <br>
        <div class="gmail_quote">On Thu, Feb 28, 2013 at 11:56 AM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:bogdan@opensips.org"
              target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div bgcolor="#ffffff" text="#000000"> <tt>No need to do
                anything by hand :) - see the uac_replace_from()
                function from uac module - it will do all replacements
                to guarantee a consistency at dialog level.<br>
                <br>
                Regards,<br>
              </tt>
              <div class="im">
                <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                <br>
              </div>
              <div>
                <div class="h5"> On 02/28/2013 06:10 PM, Duane Larson
                  wrote:
                  <blockquote type="cite">Yeah. &nbsp;I figure with the
                    Dialog module I will need to save the from domain
                    before I send it to Asterisk and then when Asterisk
                    sends it back I will have to match the new INVITE
                    dialog to the original INVITE so that I can grab
                    that from domain. &nbsp;I don't see this as being hard to
                    implement.
                    <div> <br>
                    </div>
                    <div>Thanks for looking at this.<br>
                      <br>
                      <div class="gmail_quote">On Thu, Feb 28, 2013 at
                        10:08 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:bogdan@opensips.org"
                            target="_blank">bogdan@opensips.org</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:
                          0pt 0pt 0pt 0.8ex; border-left: 1px solid
                          rgb(204, 204, 204); padding-left: 1ex;">
                          <div bgcolor="#ffffff" text="#000000"> <tt>Well,
                              do not know much on Asterisk, so cannot
                              comment :). What I wanted to point out is
                              that we have the option to do it on
                              opensips in an easy way -&gt; this will
                              make quite irrelevant what Asterisk can
                              do.<br>
                              <br>
                              Regards,<br>
                            </tt>
                            <div>
                              <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                              <br>
                            </div>
                            <div>
                              <div> On 02/28/2013 05:56 PM, Duane Larson
                                wrote:
                                <blockquote type="cite">I kind of
                                  figured this but just wanted to check
                                  since that post about Asterisk and the
                                  From Header was from back in 2007.
                                  <div><br>
                                  </div>
                                  <div>Thanks<br>
                                    <br>
                                    <div class="gmail_quote">On Thu, Feb
                                      28, 2013 at 7:08 AM, Bogdan-Andrei
                                      Iancu <span dir="ltr">&lt;<a
                                          moz-do-not-send="true"
                                          href="mailto:bogdan@opensips.org"
                                          target="_blank">bogdan@opensips.org</a>&gt;</span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote"
                                        style="margin: 0pt 0pt 0pt
                                        0.8ex; border-left: 1px solid
                                        rgb(204, 204, 204);
                                        padding-left: 1ex;">
                                        <div bgcolor="#ffffff"
                                          text="#000000"> <tt>Hi Duane,<br>
                                            <br>
                                            I guess this leaves you with
                                            no alternatives rather than
                                            changing the domain on
                                            opensips - it is not
                                            something complex to do and
                                            you can use the dialog
                                            support for that to avoid
                                            any dependency from the
                                            end-point devices .<br>
                                            <br>
                                            Regards,<br>
                                          </tt>
                                          <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                                          <div>
                                            <div> <br>
                                              On 02/28/2013 04:50 AM,
                                              Duane Larson wrote: </div>
                                          </div>
                                          <blockquote type="cite">
                                            <div>
                                              <div>
                                                <div>I wanted to see if
                                                  I could get this
                                                  answered on the
                                                  OpenSIPS mailing list
                                                  even though this kind
                                                  of has to do with how
                                                  Asterisk works. &nbsp;I am
                                                  hoping someone has run
                                                  into this and figured
                                                  a way to resolve the
                                                  issue.</div>
                                                <div><br>
                                                </div>
                                                <div>I have OpenSIPS set
                                                  up to be a proxy for a
                                                  cluster of Asterisk
                                                  servers. &nbsp;When a call
                                                  comes into OpenSIPS it
                                                  relays it to an
                                                  Asterisk server,
                                                  Asterisk handles the
                                                  call based on what is
                                                  in the dialplan and
                                                  will always send a new
                                                  INVITE back to
                                                  OpenSIPS and then
                                                  OpenSIPS sends the
                                                  INVITE to the callee.</div>
                                                <div><br>
                                                </div>
                                                <div>This works fine but
                                                  the new INVITE that
                                                  Asterisk generates
                                                  changes the domain in
                                                  the FROM header to be
                                                  the IP address of the
                                                  Asterisk server. &nbsp;I
                                                  want to make it so
                                                  that Asterisk doesn't
                                                  change the From domain
                                                  or else my only other
                                                  option is for OpenSIPS
                                                  to rewrite the From
                                                  domain and change it
                                                  back to what it should
                                                  be. &nbsp;I found the
                                                  following post from
                                                  back in 2007 but I am
                                                  not sure if anything
                                                  has been changed
                                                  within Asterisk</div>
                                                <div><br>
                                                </div>
                                                <a
                                                  moz-do-not-send="true"
href="https://issues.asterisk.org/jira/browse/ASTERISK-10836"
                                                  target="_blank">https://issues.asterisk.org/jira/browse/ASTERISK-10836</a><br
                                                  clear="all">
                                                <div><br>
                                                </div>
                                                <div>I can't really
                                                  change the fromdomain
                                                  in my sip.conf file on
                                                  the Asterisk servers
                                                  because the Asterisk
                                                  servers are a
                                                  multitenant/multidomain.</div>
                                                <div><br>
                                                </div>
                                                <div>Any thoughts on
                                                  this?</div>
                                              </div>
                                            </div>
                                            <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                                          </blockquote>
                                        </div>
                                      </blockquote>
                                    </div>
                                    <br>
                                    <br clear="all">
                                    <div><br>
                                    </div>
                                    -- <br>
                                    --<br>
                                    *--*--*--*--*--*<br>
                                    Duane<br>
                                    *--*--*--*--*--*<br>
                                    -- </div>
                                </blockquote>
                              </div>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <div><br>
                      </div>
                      -- <br>
                      --<br>
                      *--*--*--*--*--*<br>
                      Duane<br>
                      *--*--*--*--*--*<br>
                      -- </div>
                  </blockquote>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        --<br>
        *--*--*--*--*--*<br>
        Duane<br>
        *--*--*--*--*--*<br>
        --
      </div>
    </blockquote>
  </body>
</html>