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? On Tue, Mar 2, 2010 at 5:20 PM, Jonas Gauffin <jonas.gauffin@gmail.com>wrote:
Hello,
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). 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)?
javascript: session.setCallerData("caller_id_number", aNumber); session.setVariable("gate_caller_id_number", aNumber); session.setVariable("gate_site_id", SITE_ID); session.execute("transfer", this.dtmfBuffer + " XML internal");
send 1179 bytes to udp/[130.244.Y.YY]:5060 at 16:13:16.752200: ------------------------------------------------------------------------ INVITE sip:024390510@sip-corporate.provider.com<sip%3A024390510@sip-corporate.provider.com>SIP/2.0 Via: SIP/2.0/UDP 212.247.XX.XX;rport;branch=z9hG4bKaa59XjFt2N2rS Max-Forwards: 67 From: "0236661XXX" <sip:0243795362@212.247.XX.XX>;tag=BHvytKtv47r2a To: <sip:024390510@sip-corporate.provider.com<sip%3A024390510@sip-corporate.provider.com>
Call-ID: 5a022f8f-a0b9-122d-779a-dbdeced2caa5 CSeq: 127654862 INVITE Contact: <sip:gw+dalaconnecttele2@212.247.XX.XX :5060;transport=udp;gw=dalaconnecttele2> User-Agent: Gateon Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY Supported: timer, precondition, path, replaces Allow-Events: talk, refer Content-Type: application/sdp Content-Disposition: session Content-Length: 273 Diversion: 0 <sip:0@212.151.Y.Y ;user=phone>;reason=unconditional;counter=1;privacy=off X-FS-Support: update_display Remote-Party-ID: "0236661XXX" <sip:0243795362@212.247.XX.XX
;party=calling;screen=yes;privacy=off
v=0 o=FreeSWITCH 1267513684 1267513685 IN IP4 212.247.XX.XX s=FreeSWITCH c=IN IP4 212.247.XX.XX t=0 0 m=audio 32712 RTP/AVP 8 3 101 13 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=rtpmap:13 CN/8000 a=ptime:20