<div dir="ltr">The + before the $var(from) was removed.</div><div class="gmail_extra"><br><div class="gmail_quote">On 12 November 2014 21:31, Răzvan Crainea <span dir="ltr">&lt;<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div><tt>I was pointing to the way you are
        building the header in append_hf() function.<br>
        <br>
        Best regards,<br>
      </tt><span class="">
      <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre></span><div><div class="h5">
      On 11/12/2014 11:35 AM, Sahil Gupta wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hi Razvan,</div>
        <div>Thanks for getting back to me.</div>
        <div><br>
        </div>
        <div>The code was:</div>
        $var(from)=&#39;sip:&#39;+$var(cid)+&#39;@<a href="http://54.76.30.63" target="_blank">54.76.30.63</a>&#39;;<br>
        <div><br>
        </div>
        <div>I modified it to become:</div>
        <div>var(from)=&#39;sip:+&#39;+$var(cid)+&#39;@<a href="http://54.76.30.63" target="_blank">54.76.30.63</a>&#39;;<br>
        </div>
        <div><br>
        </div>
        <div>The PAID function is definately being called as our far end
          carrier receives the P-Asserted-ID but they don&#39;t see a &quot;+&quot;
          before the CLI unless the caller sends it.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Sahil</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 12 November 2014 20:09, Răzvan
          Crainea <span dir="ltr">&lt;<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div><tt>Hi, Sahil!<br>
                  <br>
                  Are you sure the PAID function is called at all? The
                  PAI header you are adding contains an invalid URI, it
                  is something like +<a href="mailto:sip%3A%2Bcid@54.76.30.63" target="_blank">sip:+cid@54.76.30.63</a>.<br>
                  Try to add some xlogs in the PAID route to check if it
                  is really called.<br>
                  <br>
                  Best regards,<br>
                </tt>
                <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                <div>
                  <div> On 11/11/2014 08:15 PM, Sahil Gupta
                    wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div dir="ltr">Hi,
                      <div>I&#39;m trying to add P-Asserted-ID by default on
                        one of our OpenSIPS deployments.</div>
                      <div><br>
                      </div>
                      <div>In my config file I have:</div>
                      <div>
                        <div>               
                          $var(from)=&#39;sip:+&#39;+$var(cid)+&#39;@<a href="http://54.76.30.63" target="_blank">54.76.30.63</a>&#39;;</div>
                        <div><br>
                        </div>
                        <div>
                          <div>               
                            $var(from)=&#39;sip:+&#39;+$var(cid)+&#39;@<a href="http://54.76.30.63" target="_blank">54.76.30.63</a>&#39;;</div>
                        </div>
                        <div><br>
                        </div>
                        <div>
                          <div>route[PAID]{</div>
                          <div> if (is_present_hf(&quot;Remote-Party-ID&quot;)) {</div>
                          <div>    remove_hf(&quot;Remote-Party-ID&quot;);</div>
                          <div> }</div>
                          <div> if
                            (is_present_hf(&quot;P-Asserted-Identity&quot;)) {</div>
                          <div>    remove_hf(&quot;P-Asserted-Identity&quot;);</div>
                          <div> }</div>
                          <div> if (is_present_hf(&quot;Privacy&quot;)) {</div>
                          <div>    remove_hf(&quot;Privacy&quot;);</div>
                          <div> }</div>
                          <div> append_hf(&quot;P-Asserted-Identity:
                            &lt;+$var(from)&gt;\r\n&quot;);</div>
                          <div>}</div>
                        </div>
                        <div><br>
                        </div>
                        <div>However, unless the CID is set with a + it
                          doesn&#39;t seem to automatically prefix the &quot;+&quot;
                          sign.</div>
                        <div><br>
                        </div>
                        -- <br>
                        <div>Thanks,
                          <div>Sahil</div>
                        </div>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
            <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div>Thanks,
          <div>Sahil</div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Thanks,<div>Sahil</div></div>
</div>