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
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
Sure I can buy that, but not with a URI that doesnt match the inbound call. "0 <sip:0@212.151.Y.Y;user=phone>" fails number validation and therefore all calls through that javascript will be rejected by my provider. On Tue, Mar 2, 2010 at 6:45 PM, Brian West <brian@freeswitch.org> wrote:
Because it should be there if you redirected the call.
/b
On Mar 2, 2010, at 11:35 AM, Jonas Gauffin wrote:
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?
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Was the header there on the inbound invite? /b On Mar 2, 2010, at 12:11 PM, Jonas Gauffin wrote:
Sure I can buy that, but not with a URI that doesnt match the inbound call.
"0 <sip:0@212.151.Y.Y;user=phone>" fails number validation and therefore all calls through that javascript will be rejected by my provider.
Thank you! =) The incoming INVITE had that header. I can't believe that I missed it in the first place. On Tue, Mar 2, 2010 at 7:16 PM, Brian West <brian@freeswitch.org> wrote:
Was the header there on the inbound invite?
/b
On Mar 2, 2010, at 12:11 PM, Jonas Gauffin wrote:
Sure I can buy that, but not with a URI that doesnt match the inbound call.
"0 <sip:0@212.151.Y.Y;user=phone>" fails number validation and therefore all calls through that javascript will be rejected by my provider.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
And are you using Proxy Media? /b On Mar 2, 2010, at 1:14 PM, Jonas Gauffin wrote:
Thank you! =) The incoming INVITE had that header. I can't believe that I missed it in the first place.
On Tue, Mar 2, 2010 at 7:16 PM, Brian West <brian@freeswitch.org> wrote: Was the header there on the inbound invite?
/b
No. I'm only using proxy_media on fax devices. On Tue, Mar 2, 2010 at 8:25 PM, Brian West <brian@freeswitch.org> wrote:
And are you using Proxy Media?
/b
On Mar 2, 2010, at 1:14 PM, Jonas Gauffin wrote:
Thank you! =) The incoming INVITE had that header. I can't believe that I missed it in the first place.
On Tue, Mar 2, 2010 at 7:16 PM, Brian West <brian@freeswitch.org> wrote:
Was the header there on the inbound invite?
/b
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello All, I have a call coming in with a Diversion header attached to it but after trying various DialPlan Variables i.e. rdnis, dialed_user and sip_redirect_contact_user_0, I can't seem to extract the rdnis information from the SIP header to then use to route or do any other operation on. Which variable holds this info? How do I get it/use it in the dialplan? Thanks RR
${rdnis} use the info app to dump it. /b On Jun 23, 2010, at 11:33 AM, RR wrote:
Hello All,
I have a call coming in with a Diversion header attached to it but after trying various DialPlan Variables i.e. rdnis, dialed_user and sip_redirect_contact_user_0, I can't seem to extract the rdnis information from the SIP header to then use to route or do any other operation on. Which variable holds this info? How do I get it/use it in the dialplan?
Thanks Brian, maybe it's the version of FS that we're using that has a problem but the rdnis variable doesn't even show in the info app dump. The only place I could get the diversion info was in the sip_h_Diversion variable but that has the entire Diversion header instead of just the rdnis. Will have to capture this using regex and then do anything with it. You think this is because of the version of FreeSWITCH we have or is this a bug somewhere. Sorry we can't test this out by upgrading the FS version as this is the only environment we have and its all production :( Thanks RR On Wed, Jun 23, 2010 at 12:44 PM, Brian West <brian@freeswitch.org> wrote:
${rdnis} use the info app to dump it.
/b
On Jun 23, 2010, at 11:33 AM, RR wrote:
Hello All,
I have a call coming in with a Diversion header attached to it but after trying various DialPlan Variables i.e. rdnis, dialed_user and sip_redirect_contact_user_0, I can't seem to extract the rdnis information from the SIP header to then use to route or do any other operation on. Which variable holds this info? How do I get it/use it in the dialplan?
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
No did you even try using ${rdnis} ? Its not going to show up in a dump as rdnis becuse its special read switch_caller.c /b On Jun 23, 2010, at 12:15 PM, RR wrote:
Thanks Brian,
maybe it's the version of FS that we're using that has a problem but the rdnis variable doesn't even show in the info app dump. The only place I could get the diversion info was in the sip_h_Diversion variable but that has the entire Diversion header instead of just the rdnis. Will have to capture this using regex and then do anything with it.
You think this is because of the version of FreeSWITCH we have or is this a bug somewhere. Sorry we can't test this out by upgrading the FS version as this is the only environment we have and its all production :(
Thanks RR
yeah that was the first variable I'd tried when I started looking into this but it came out empty. This is what I was seeing in the debug dump Regex (FAIL) [Test_Diversion] rdnis() =~ /^(917xxxxxxx)$/ break=on-false even if the condition failed, it usually shows what's in the variable to then compare with the regex Thanks \RR On Wed, Jun 23, 2010 at 1:25 PM, Brian West <brian@freeswitch.org> wrote:
No did you even try using ${rdnis} ? Its not going to show up in a dump as rdnis becuse its special read switch_caller.c
/b
On Jun 23, 2010, at 12:15 PM, RR wrote:
Thanks Brian,
maybe it's the version of FS that we're using that has a problem but the rdnis variable doesn't even show in the info app dump. The only place I could get the diversion info was in the sip_h_Diversion variable but that has the entire Diversion header instead of just the rdnis. Will have to capture this using regex and then do anything with it.
You think this is because of the version of FreeSWITCH we have or is this a bug somewhere. Sorry we can't test this out by upgrading the FS version as this is the only environment we have and its all production :(
Thanks RR
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
are you looking at sip_h_Diversion variable? /b On Jun 23, 2010, at 12:40 PM, RR wrote:
yeah that was the first variable I'd tried when I started looking into this but it came out empty. This is what I was seeing in the debug dump
Regex (FAIL) [Test_Diversion] rdnis() =~ /^(917xxxxxxx)$/ break=on-false
even if the condition failed, it usually shows what's in the variable to then compare with the regex
Thanks \RR
I am now considering the ${rdnis} variable is empty. So am doing something like <condition field="${sip_h_Diversion}" expression="^.*(917xxxxxxx).*$"/> \RR On Wed, Jun 23, 2010 at 1:57 PM, Brian West <brian@freeswitch.org> wrote:
are you looking at sip_h_Diversion variable?
/b
On Jun 23, 2010, at 12:40 PM, RR wrote:
yeah that was the first variable I'd tried when I started looking into this but it came out empty. This is what I was seeing in the debug dump
Regex (FAIL) [Test_Diversion] rdnis() =~ /^(917xxxxxxx)$/ break=on-false
even if the condition failed, it usually shows what's in the variable to then compare with the regex
Thanks \RR
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Brian West
-
Jonas Gauffin
-
RR