Condition based on custom sip header
Hi, I'm trying to implement dialplan condition based on custom SIP header ("Header1: value1"). As far as I understood there's no way to read custom SIP header which isn't X- header with sip_h_. Is that correct? What are the other options, please? Is lua's getHeader() suitable for this? -- Best Regards, Alex Massover This mail was sent via Mail-SeCure System.
if its custom anyway and all you need to do is add X- then what's the problem? Using X- is *nearly* a requirement in email/http/sip That's the whole point of them having a prefix.... On Mon, Aug 29, 2011 at 10:36 AM, Alex Massover <alex@jajah.com> wrote:
Hi,
I’m trying to implement dialplan condition based on custom SIP header (“Header1: value1”). As far as I understood there’s no way to read custom SIP header which isn’t X- header with sip_h_. Is that correct?
What are the other options, please? Is lua’s getHeader() suitable for this?
--
Best Regards,
Alex Massover
This mail was sent via Mail-SeCure System.
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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Hi Anthony, I agree with you, but unfortunately the format of the header is out of my control, our partner sends the INVITE with custom headers. And I need to be able to make condition case in dialplan according to that header. So there's no way, not even with lua/perl? Maybe there's access to whole SIP message and I can parse it by myself? I can put for example OpenSIPS before FS and manipulate the header there, but it's kind of strange actually that in SIP softswitch there's no way access to arbitrary SIP header. Another idea is to make a dirty hack in mod_sofia and otherwrite some existing SIP channel variable, which I don't use :)
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale Sent: יום ב 29 אוגוסט 2011 23:49 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Condition based on custom sip header
if its custom anyway and all you need to do is add X- then what's the problem? Using X- is *nearly* a requirement in email/http/sip That's the whole point of them having a prefix....
On Mon, Aug 29, 2011 at 10:36 AM, Alex Massover <alex@jajah.com> wrote:
Hi,
I’m trying to implement dialplan condition based on custom SIP header (“Header1: value1”). As far as I understood there’s no way to read custom SIP header which isn’t X- header with sip_h_. Is that correct?
What are the other options, please? Is lua’s getHeader() suitable for this?
--
Best Regards,
Alex Massover
This mail was sent via Mail-SeCure System.
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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
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
This mail was received via Mail-SeCure System.
This mail was sent via Mail-SeCure System.
I can put for example OpenSIPS before FS and manipulate the header there, but it's kind of strange actually that in SIP softswitch there's no way access to arbitrary SIP header.
Another idea is to make a dirty hack in mod_sofia and otherwrite some existing SIP channel variable, which I don't use :)
There is a way... It's called using the well-known practice of using X-headers which is properly name-spaced and reserved for custom headers. When people make comments like this it actually annoys me... "Well your free software and open community are sort of cool but really, if it was worth a damn at all, it would certainly be able to make me toast....." You are the one with the non-standard requirement that you "can't change" so there is a saying here in open source land ... "Patches Welcome!" -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Hello Alex, I had to face the same situation weeks ago... Yes, It's shame that many hardware/software makers are ignoring the RFCs and doing things their own way but what can you do... Here is how I sorted it out. http://freeswitch-users.2379917.n2.nabble.com/Sip-Headers-advice-Not-parsing... good luck -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Condition-based-on-custom-sip-... Sent from the freeswitch-users mailing list archive at Nabble.com.
Hi, That's great! Exactly what I need. Thanks!
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Dissident Sent: יום ד 31 אוגוסט 2011 13:48 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Condition based on custom sip header
Hello Alex,
I had to face the same situation weeks ago... Yes, It's shame that many hardware/software makers are ignoring the RFCs and doing things their own way but what can you do... Here is how I sorted it out.
http://freeswitch-users.2379917.n2.nabble.com/Sip-Headers-advice-Not- parsing-properly-td6606461.html
good luck
-- View this message in context: http://freeswitch- users.2379917.n2.nabble.com/Condition-based-on-custom-sip-header- tp6738108p6745987.html Sent from the freeswitch-users mailing list archive at Nabble.com.
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
This mail was received via Mail-SeCure System.
This mail was sent via Mail-SeCure System.
and that's what I would have told you had you not made a comment about how we are "strange" because we do not comb over every sip message and turn every header into a into a variable in case somebody wants one even when we have only had 2 requests for it in 6 years. if a particular non-standard header becomes popular then you can submit a patch adding that specific header to the list.............. 2011/8/31 Alex Massover <alex@jajah.com>:
Hi,
That's great! Exactly what I need.
Thanks!
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Dissident Sent: יום ד 31 אוגוסט 2011 13:48 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Condition based on custom sip header
Hello Alex,
I had to face the same situation weeks ago... Yes, It's shame that many hardware/software makers are ignoring the RFCs and doing things their own way but what can you do... Here is how I sorted it out.
http://freeswitch-users.2379917.n2.nabble.com/Sip-Headers-advice-Not- parsing-properly-td6606461.html
good luck
-- View this message in context: http://freeswitch- users.2379917.n2.nabble.com/Condition-based-on-custom-sip-header- tp6738108p6745987.html Sent from the freeswitch-users mailing list archive at Nabble.com.
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
This mail was received via Mail-SeCure System.
This mail was sent via Mail-SeCure System.
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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
participants (3)
-
Alex Massover
-
Anthony Minessale
-
Dissident