<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all,<br>
    <br>
    I'm trying to copy some of custom headers from A-leg to B-leg so I
    have tried this:<br>
    <br>
    sip_h_P-HEADER1=${sip_h_P-HEADER1}<br>
    <br>
    but it seems like I cannot access customer header variables
    ${sip_h_} if I don't set before sip_copy_custom_headers=true. <br>
    If I do that, all the headers are being copied automatically from
    LegA to LegB. <br>
    Is there any other way of doing it? I don't need them all to be
    copied. I know I can remove them afterwards but since they are
    dynamic I cannot predict how would they look like.<br>
    <br>
    &nbsp;<br>
    Another issue I have is that Freeswitch seems to be adding locally
    generated P-Asserted-Identity (based on From header) to&nbsp; every final
    response. I tried to disable it by settiing sip_cid_type=none but no
    luck so far.&nbsp; Removing it by 'unset' did not help either - PAI
    header is always there.<br>
    <br>
    here is an example:<br>
    <small><tt><br>
      </tt><tt>U 10.0.6.136:5060 -&gt; 10.0.3.56:5060</tt><tt><br>
      </tt><tt>INVITE <a class="moz-txt-link-freetext" href="sip:+4470000606@example.domain.comSIP/2.0">sip:+4470000606@example.domain.comSIP/2.0</a>.</tt><tt><br>
      </tt><tt>Via: SIP/2.0/UDP 10.0.6.136:5060;branch=z9hG4bK-3766-1-0.</tt><tt><br>
      </tt><tt>From: <a class="moz-txt-link-rfc2396E" href="sip:+447000000155@example.domain.com">&lt;sip:+447000000155@example.domain.com&gt;</a>;tag=1.</tt><tt><br>
      </tt><tt>To: <a class="moz-txt-link-rfc2396E" href="sip:+4470000606@example.domain.com:5060">&lt;sip:+4470000606@example.domain.com:5060&gt;</a>.</tt><tt><br>
      </tt><tt>Call-ID: <a class="moz-txt-link-abbreviated" href="mailto:ABC///1-3766@10.0.6.136">ABC///1-3766@10.0.6.136</a>.</tt><tt><br>
      </tt><tt>CSeq: 1 INVITE.</tt><tt><br>
      </tt><tt>Contact: <a class="moz-txt-link-freetext" href="sip:+447000000155@10.0.6.136:5060">sip:+447000000155@10.0.6.136:5060</a>.</tt><tt><br>
      </tt><tt>Max-Forwards: 10.</tt><tt><br>
      </tt><tt>P-Asserted-Identity:
        <a class="moz-txt-link-freetext" href="sip:+447000000155@example.domain.com">sip:+447000000155@example.domain.com</a>.</tt><tt><br>
      </tt><tt>Content-Type: application/sdp.</tt><tt><br>
      </tt><tt>Content-Length:&nbsp;&nbsp; 133.</tt><tt><br>
      </tt><tt>.</tt><tt><br>
      </tt><tt>v=0.</tt><tt><br>
      </tt><tt>o=user1 53655765 2353687637 IN IP4 10.0.6.136.</tt><tt><br>
      </tt><tt>s=-.</tt><tt><br>
      </tt><tt>c=IN IP4 10.0.6.136.</tt><tt><br>
      </tt><tt>t=0 0.</tt><tt><br>
      </tt><tt>m=audio 6000 RTP/AVP 97.</tt><tt><br>
      </tt><tt>a=rtpmap:97 iLBC/8000</tt><tt><br>
      </tt><tt><br>
      </tt><tt><br>
      </tt><tt><br>
      </tt><tt>U 10.0.3.56:5060 -&gt; 10.0.6.136:5060</tt><tt><br>
      </tt><tt>SIP/2.0 100 Trying.</tt><tt><br>
      </tt><tt>Via: SIP/2.0/UDP 10.0.6.136:5060;branch=z9hG4bK-3766-1-0.</tt><tt><br>
      </tt><tt>From: <a class="moz-txt-link-rfc2396E" href="sip:+447000000155@example.domain.com">&lt;sip:+447000000155@example.domain.com&gt;</a>;tag=1.</tt><tt><br>
      </tt><tt>To: <a class="moz-txt-link-rfc2396E" href="sip:+4470000606@example.domain.com:5060">&lt;sip:+4470000606@example.domain.com:5060&gt;</a>.</tt><tt><br>
      </tt><tt>Call-ID: <a class="moz-txt-link-abbreviated" href="mailto:ABC///1-3766@10.0.6.136">ABC///1-3766@10.0.6.136</a>.</tt><tt><br>
      </tt><tt>CSeq: 1 INVITE.</tt><tt><br>
      </tt><tt>User-Agent:
        FreeSWITCH-mod_sofia/1.2.15+git~20131119T212207Z~a13c5005be~64bit.</tt><tt><br>
      </tt><tt>Content-Length: 0.</tt><tt><br>
      </tt><tt>.</tt><tt><br>
      </tt><tt><br>
      </tt><tt><br>
      </tt><tt>U 10.0.3.56:5060 -&gt; 10.0.6.136:5060</tt><tt><br>
      </tt><tt>SIP/2.0 480 Temporarily Unavailable.</tt><tt><br>
      </tt><tt>Via: SIP/2.0/UDP 10.0.6.136:5060;branch=z9hG4bK-3766-1-0.</tt><tt><br>
      </tt><tt>Max-Forwards: 10.</tt><tt><br>
      </tt><tt>From: <a class="moz-txt-link-rfc2396E" href="sip:+447000000155@example.domain.com">&lt;sip:+447000000155@example.domain.com&gt;</a>;tag=1.</tt><tt><br>
      </tt><tt>To:
        <a class="moz-txt-link-rfc2396E" href="sip:+4470000606@example.domain.com:5060">&lt;sip:+4470000606@example.domain.com:5060&gt;</a>;tag=2gK14HpU0cj9c.</tt><tt><br>
      </tt><tt>Call-ID: <a class="moz-txt-link-abbreviated" href="mailto:ABC///1-3766@10.0.6.136">ABC///1-3766@10.0.6.136</a>.</tt><tt><br>
      </tt><tt>CSeq: 1 INVITE.</tt><tt><br>
      </tt><tt>User-Agent:
        FreeSWITCH-mod_sofia/1.2.15+git~20131119T212207Z~a13c5005be~64bit.</tt><tt><br>
      </tt><tt>Accept: application/sdp.</tt><tt><br>
      </tt><tt>Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO,
        UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.</tt><tt><br>
      </tt><tt>Supported: timer, precondition, path, replaces.</tt><tt><br>
      </tt><tt>Allow-Events: talk, hold, conference, presence, dialog,
        line-seize, call-info, sla, include-session-description,
        presence.winfo, message-summary, refer.</tt><tt><br>
      </tt><tt>Reason: Q.850;cause=19;text="NO_ANSWER".</tt><tt><br>
      </tt><tt>Content-Length: 0.</tt><tt><br>
      </tt><tt>P-Asserted-Identity: "+4470000606"
        <a class="moz-txt-link-rfc2396E" href="sip:+4470000606@example.domain.com">&lt;sip:+4470000606@example.domain.com&gt;</a>.</tt><tt><br>
      </tt><tt>.</tt><tt><br>
      </tt><tt><br>
      </tt><tt><br>
      </tt><tt>U 10.0.6.136:5060 -&gt; 10.0.3.56:5060</tt><tt><br>
      </tt><tt>ACK <a class="moz-txt-link-freetext" href="sip:+4470000606@example.domain.com:5060">sip:+4470000606@example.domain.com:5060</a> SIP/2.0.</tt><tt><br>
      </tt><tt>Via: SIP/2.0/UDP 10.0.6.136:5060;branch=z9hG4bK-3766-1-0.</tt><tt><br>
      </tt><tt>From: <a class="moz-txt-link-rfc2396E" href="sip:+447000000155@example.domain.com">&lt;sip:+447000000155@example.domain.com&gt;</a>;tag=1.</tt><tt><br>
      </tt><tt>To:
        <a class="moz-txt-link-rfc2396E" href="sip:+4470000606@example.domain.com:5060">&lt;sip:+4470000606@example.domain.com:5060&gt;</a>;tag=2gK14HpU0cj9c.</tt><tt><br>
      </tt><tt>Call-ID: <a class="moz-txt-link-abbreviated" href="mailto:1-3766@10.0.6.136">1-3766@10.0.6.136</a>.</tt><tt><br>
      </tt><tt>CSeq: 1 ACK.</tt><tt><br>
      </tt><tt>Contact: <a class="moz-txt-link-rfc2396E" href="sip:sipp@10.0.6.136:5060;transport=UDP">&lt;sip:sipp@10.0.6.136:5060;transport=UDP&gt;</a>.</tt><tt><br>
      </tt><tt>Max-Forwards: 70.</tt><tt><br>
      </tt><tt>Subject: Performance Test.</tt><tt><br>
      </tt><tt>Content-Length: 0.</tt></small><br>
    .<br>
    <br>
    <br>
    I'm experiencing the same issue when trying to redirect with 302. <br>
    <br>
    Regards<br>
    Cezary<br>
    <br>
    <br>
  
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
        <tr>
                <td style='border:none;padding:0px 15px 0px 8px'>
                        <a href="http://www.avast.com/">
                                <img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" />
                        </a>
                </td>
                <td>
                        <p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
                                This email is free from viruses and malware because <a href="http://www.avast.com/">avast! Antivirus</a> protection is active.
                        </p>
                </td>
        </tr>
</table>
<br />
</body>
</html>