I solved it by adding '<action application="set" data="sip_h_Diversion="/>' to my generated dial plan. But why was the header added in the first place?<br><br><div class="gmail_quote">On Tue, Mar 2, 2010 at 5:20 PM, Jonas Gauffin <span dir="ltr"><<a href="mailto:jonas.gauffin@gmail.com">jonas.gauffin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<div><br></div><div>I got a incoming call from my provider which goes to a javascript. The javascript transfers the call to an external destination (goes back through my provider).</div>
<div>A diversion headers is added by FreeSWITCH on the outbound call. How can I remove it (or if not possible, how do I change it)?</div>
<div><br></div><div>javascript:</div><div><div> session.setCallerData("caller_id_number", aNumber);</div><div><span style="white-space:pre">        </span>session.setVariable("gate_caller_id_number", aNumber);</div>
<div> session.setVariable("gate_site_id", SITE_ID);</div><div> session.execute("transfer", this.dtmfBuffer + " XML internal");</div></div><div><br></div><div><br></div><div><br>
</div><div><div><div>send 1179 bytes to udp/[130.244.Y.YY]:5060 at 16:13:16.752200:</div><div> ------------------------------------------------------------------------</div><div> INVITE <a href="mailto:sip%3A024390510@sip-corporate.provider.com" target="_blank">sip:024390510@sip-corporate.provider.com</a> SIP/2.0</div>
<div> Via: SIP/2.0/UDP 212.247.XX.XX;rport;branch=z9hG4bKaa59XjFt2N2rS</div><div> Max-Forwards: 67</div><div> From: "0236661XXX" <sip:0243795362@212.247.XX.XX>;tag=BHvytKtv47r2a</div><div> To: <<a href="mailto:sip%3A024390510@sip-corporate.provider.com" target="_blank">sip:024390510@sip-corporate.provider.com</a>></div>
<div> Call-ID: 5a022f8f-a0b9-122d-779a-dbdeced2caa5</div><div> CSeq: 127654862 INVITE</div><div> Contact: <sip:gw+dalaconnecttele2@212.247.XX.XX:5060;transport=udp;gw=dalaconnecttele2></div><div> User-Agent: Gateon</div>
<div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY</div><div> Supported: timer, precondition, path, replaces</div><div> Allow-Events: talk, refer</div><div> Content-Type: application/sdp</div>
<div> Content-Disposition: session</div><div> Content-Length: 273</div><div> Diversion: 0 <sip:0@212.151.Y.Y;user=phone>;reason=unconditional;counter=1;privacy=off</div><div> X-FS-Support: update_display</div>
<div> Remote-Party-ID: "0236661XXX" <sip:0243795362@212.247.XX.XX>;party=calling;screen=yes;privacy=off</div><div><br></div><div> v=0</div><div> o=FreeSWITCH 1267513684 1267513685 IN IP4 212.247.XX.XX</div>
<div> s=FreeSWITCH</div><div> c=IN IP4 212.247.XX.XX</div><div> t=0 0</div><div> m=audio 32712 RTP/AVP 8 3 101 13</div><div> a=rtpmap:8 PCMA/8000</div><div> a=rtpmap:3 GSM/8000</div><div> a=rtpmap:101 telephone-event/8000</div>
<div> a=fmtp:101 0-16</div><div> a=rtpmap:13 CN/8000</div><div> a=ptime:20</div></div></div>
</blockquote></div><br>