Re: [OpenSIPS-Users] How to parse XML Body?
Hi Bogdan, I know, that script level is better and I use the script regex now it is working. Perl was used out of frustration of not being able to get the right regex with script. I’m neither good at perl, but the first regex example I found on the web worked right away with minor changes. Honestly I do not quite understand why the workable script regex should be the way it is. Especially compared with the regex I used in perl. But I’m not a regex expert either. Anyway I’m happy as long as it does what I need. The patch looks good. I will try it and let you know how it will work out. Thanks a lot for your support! From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 19. Januar 2017 11:54 To: xaled ; 'OpenSIPS users mailling list' Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, To be honest I'm not good on perl, but if you can do it directly at script level, it it cleaner and more efficient. Also, check this https://github.com/OpenSIPS/opensips/commit/d509aa63698bc26fde390a4b707dbf2be31f5de5 Thanks and Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/18/2017 04:09 PM, xaled wrote: Hi Bogdan, works like a charm, thanks! As an additional bonus now I know how to work with the perl module ;) $rb(mime)[idx] is even more flexible. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Dienstag, 17. Januar 2017 15:12 To: xaled <mailto:xa...@web.de> ; 'OpenSIPS users mailling list' <mailto:users@lists.opensips.org> Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, There was a small typo in my regexp. The correct one is: $var(reg) = "/(.*)gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); I tried it and it does the job. Regarding the usability of the $rb variable, yes you have a point. I was thinking of something like $rb(mime)[idx] to access also per mime. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/13/2017 12:04 PM, xaled wrote: Hi Bogdan, thank you for looking at this issue. This regex does not work. I tried different combinations of the idea but it just not getting there. 2017-01-13T11:02:42.287766+01:00 ivr01 /usr/local/sbin/opensips[24845]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-13T11:02:42.288116+01:00 ivr01 /usr/local/sbin/opensips[24845]: WARNING:core:parse_repl: \/ unknown escape in (.*)<\/gml:Coordinates(.*)/\2/s 2017-01-13T11:02:42.288464+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:subst_parser: unknown flag . in (.*)/gml:Coordinates>(.*)<\/gml:Coordin ates(.*)/\2/s 2017-01-13T11:02:42.288787+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:tr_eval_re: Can't compile regexp I managed to get it running with perl: use OpenSIPS qw ( log ); use OpenSIPS::Constants; use OpenSIPS::Message; sub parsePIDFLO { my $m = shift; my $body = $m->getBody(); ($coord) = $body =~ /Coordinates>(.*)mailto:bog...@opensips.org] Sent: Mittwoch, 11. Januar 2017 11:05 To: OpenSIPS users mailling list <mailto:users@lists.opensips.org> ; asd asd <mailto:xa...@web.de> Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, Please try $var(reg) = "(.*)/gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/06/2017 05:44 PM, xaled wrote: Hi Bogdan, can you give any hints on how to get the Coordinates values and not the whole xml body from the regex subst? Sorry for being not clever enough to figure it out myself. Thanks Hi Bogdan, $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); DBG:core:subst_run:matched shows the needed XML element with value, but not the value alone. The xlog output shows the whole XML body without gml:Coordinates. 2017-01-05T13:23:23.104982+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: Trying to apply reg exp [/gml:Coordinates>(.*)<\/gml:Coordinates/\1/] on : [#015#012mailto:pres:sip:+1234...@test.com> "pres:sip:+1234...@test.com">#015#012 #015#012 #015#012 #015#012#015#012 #015#012 #015#012 12.32 34.24#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#01 5#012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#0 12#015#012#015#012] 2017-01-05T13:23:23.107376+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-05T13:23:23.107903+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:
Re: [OpenSIPS-Users] How to parse XML Body?
Hi, To be honest I'm not good on perl, but if you can do it directly at script level, it it cleaner and more efficient. Also, check this https://github.com/OpenSIPS/opensips/commit/d509aa63698bc26fde390a4b707dbf2be31f5de5 Thanks and Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/18/2017 04:09 PM, xaled wrote: Hi Bogdan, works like a charm, thanks! As an additional bonus now I know how to work with the perl module ;) $rb(mime)[idx] is even more flexible. *From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] *Sent:* Dienstag, 17. Januar 2017 15:12 *To:* xaled ; 'OpenSIPS users mailling list' *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? Hi, There was a small typo in my regexp. The correct one is: $var(reg) = "/(.*)gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); I tried it and it does the job. Regarding the usability of the $rb variable, yes you have a point. I was thinking of something like $rb(mime)[idx] to access also per mime. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/13/2017 12:04 PM, xaled wrote: Hi Bogdan, thank you for looking at this issue. This regex does not work. I tried different combinations of the idea but it just not getting there. 2017-01-13T11:02:42.287766+01:00 ivr01 /usr/local/sbin/opensips[24845]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-13T11:02:42.288116+01:00 ivr01 /usr/local/sbin/opensips[24845]: WARNING:core:parse_repl: \/ unknown escape in (.*)<\/gml:Coordinates(.*)/\2/s 2017-01-13T11:02:42.288464+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:subst_parser: unknown flag . in (.*)/gml:Coordinates>(.*)<\/gml:Coordin ates(.*)/\2/s 2017-01-13T11:02:42.288787+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:tr_eval_re: Can't compile regexp I managed to get it running with perl: use OpenSIPS qw ( log ); use OpenSIPS::Constants; use OpenSIPS::Message; sub parsePIDFLO { my $m = shift; my $body = $m->getBody(); ($coord) = $body =~ /Coordinates>(.*)mailto:bog...@opensips.org] *Sent:* Mittwoch, 11. Januar 2017 11:05 *To:* OpenSIPS users mailling list <mailto:users@lists.opensips.org>; asd asd <mailto:xa...@web.de> *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? Hi, Please try $var(reg) = "(.*)/gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/06/2017 05:44 PM, xaled wrote: Hi Bogdan, can you give any hints on how to get the Coordinates values and not the whole xml body from the regex subst? Sorry for being not clever enough to figure it out myself. Thanks Hi Bogdan, $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); DBG:core:subst_run:matched shows the needed XML element with value, but not the value alone. The xlog output shows the whole XML body without gml:Coordinates. 2017-01-05T13:23:23.104982+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: Trying to apply reg exp [/gml:Coordinates>(.*)<\/gml:Coordinates/\1/] on : [#015#012mailto:pres:sip:+1234...@test.com>>#015#012 #015#012 #015#012 #015#012 #015#012 #015#012 #015#012 12.32 34.24#015#012 oint>#015#012 #015#012 #015#012 #015#012 smission-allowed>no#015#012 #015#012 #01 5#012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#0 12#015#012#015#012] 2017-01-05T13:23:23.107376+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-05T13:23:23.107903+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_parser: ok, se is 0x7f39a 5d0a1f0 2017-01-05T13:23:23.108241+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: running. r=0 2017-01-05T13:23:23.111918+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: matched (404, 45): [ gml:Coordinates>12.32 34.24#015#012mailto:pres:sip:+1234...@test.com>>#015#0 12 #015#012 #015#012 #015#012 #015#012 n>#015#012 #015#012 <12.32 34.24>#015#012 #015#012 #015#012 #015#012 #015#012 ission-allowed>no#0
Re: [OpenSIPS-Users] How to parse XML Body?
Hi Bogdan, works like a charm, thanks! As an additional bonus now I know how to work with the perl module ;) $rb(mime)[idx] is even more flexible. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Dienstag, 17. Januar 2017 15:12 To: xaled ; 'OpenSIPS users mailling list' Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, There was a small typo in my regexp. The correct one is: $var(reg) = "/(.*)gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); I tried it and it does the job. Regarding the usability of the $rb variable, yes you have a point. I was thinking of something like $rb(mime)[idx] to access also per mime. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/13/2017 12:04 PM, xaled wrote: Hi Bogdan, thank you for looking at this issue. This regex does not work. I tried different combinations of the idea but it just not getting there. 2017-01-13T11:02:42.287766+01:00 ivr01 /usr/local/sbin/opensips[24845]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-13T11:02:42.288116+01:00 ivr01 /usr/local/sbin/opensips[24845]: WARNING:core:parse_repl: \/ unknown escape in (.*)<\/gml:Coordinates(.*)/\2/s 2017-01-13T11:02:42.288464+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:subst_parser: unknown flag . in (.*)/gml:Coordinates>(.*)<\/gml:Coordin ates(.*)/\2/s 2017-01-13T11:02:42.288787+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:tr_eval_re: Can't compile regexp I managed to get it running with perl: use OpenSIPS qw ( log ); use OpenSIPS::Constants; use OpenSIPS::Message; sub parsePIDFLO { my $m = shift; my $body = $m->getBody(); ($coord) = $body =~ /Coordinates>(.*)mailto:bog...@opensips.org] Sent: Mittwoch, 11. Januar 2017 11:05 To: OpenSIPS users mailling list <mailto:users@lists.opensips.org> ; asd asd <mailto:xa...@web.de> Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, Please try $var(reg) = "(.*)/gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/06/2017 05:44 PM, xaled wrote: Hi Bogdan, can you give any hints on how to get the Coordinates values and not the whole xml body from the regex subst? Sorry for being not clever enough to figure it out myself. Thanks Hi Bogdan, $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); DBG:core:subst_run:matched shows the needed XML element with value, but not the value alone. The xlog output shows the whole XML body without gml:Coordinates. 2017-01-05T13:23:23.104982+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: Trying to apply reg exp [/gml:Coordinates>(.*)<\/gml:Coordinates/\1/] on : [#015#012mailto:pres:sip:+1234...@test.com> "pres:sip:+1234...@test.com">#015#012 #015#012 #015#012 #015#012#015#012 #015#012 #015#012 12.32 34.24#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#01 5#012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#0 12#015#012#015#012] 2017-01-05T13:23:23.107376+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-05T13:23:23.107903+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_parser: ok, se is 0x7f39a 5d0a1f0 2017-01-05T13:23:23.108241+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: running. r=0 2017-01-05T13:23:23.111918+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: matched (404, 45): [ gml:Coordinates>12.32 34.24#015#012mailto:pres:sip:+1234...@test.com> "pres:sip:+1234...@test.com">#015#0 12 #015#012 #015#012 #015#012 #015#012 #015#012 #015#012 <12.32 34.24>#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#015# 012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#012 Thanks From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 13:12 To: OpenSIPS users mailling list mailto:users@lists.opensips.org> >; xaled mailto:xa...@web.de> > Subject: Re: [OpenSIPS-Users] How to parse XML Body? Try $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi, There was a small typo in my regexp. The correct one is: $var(reg) = "/(.*)gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); I tried it and it does the job. Regarding the usability of the $rb variable, yes you have a point. I was thinking of something like $rb(mime)[idx] to access also per mime. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/13/2017 12:04 PM, xaled wrote: Hi Bogdan, thank you for looking at this issue. This regex does not work. I tried different combinations of the idea but it just not getting there. 2017-01-13T11:02:42.287766+01:00 ivr01 /usr/local/sbin/opensips[24845]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-13T11:02:42.288116+01:00 ivr01 /usr/local/sbin/opensips[24845]: WARNING:core:parse_repl: \/ unknown escape in (.*)<\/gml:Coordinates(.*)/\2/s 2017-01-13T11:02:42.288464+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:subst_parser: unknown flag . in (.*)/gml:Coordinates>(.*)<\/gml:Coordin ates(.*)/\2/s 2017-01-13T11:02:42.288787+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:tr_eval_re: Can't compile regexp I managed to get it running with perl: use OpenSIPS qw ( log ); use OpenSIPS::Constants; use OpenSIPS::Message; sub parsePIDFLO { my $m = shift; my $body = $m->getBody(); ($coord) = $body =~ /Coordinates>(.*)Btw it would be great to be able to address the xml body by something like this: rb[application/pidf+xml] or rb["application/pidf+xml"] otherwise if bodies come in different order rb[1] would not work. Thanks *From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] *Sent:* Mittwoch, 11. Januar 2017 11:05 *To:* OpenSIPS users mailling list ; asd asd *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? Hi, Please try $var(reg) = "(.*)/gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/06/2017 05:44 PM, xaled wrote: Hi Bogdan, can you give any hints on how to get the Coordinates values and not the whole xml body from the regex subst? Sorry for being not clever enough to figure it out myself. Thanks Hi Bogdan, $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); DBG:core:subst_run:matched shows the needed XML element with value, but not the value alone. The xlog output shows the whole XML body without gml:Coordinates. 2017-01-05T13:23:23.104982+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: Trying to apply reg exp [/gml:Coordinates>(.*)<\/gml:Coordinates/\1/] on : [#015#012mailto:pres:sip:+1234...@test.com>>#015#012 #015#012 #015#012 #015#012 #015#012 #015#012 #015#012 12.32 34.24#015#012 #015#012 #015#012 #015#012 #015#012 no#015#012 #015#012 #01 5#012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#0 12#015#012#015#012] 2017-01-05T13:23:23.107376+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-05T13:23:23.107903+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_parser: ok, se is 0x7f39a 5d0a1f0 2017-01-05T13:23:23.108241+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: running. r=0 2017-01-05T13:23:23.111918+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: matched (404, 45): [ gml:Coordinates>12.32 34.24#015#012mailto:pres:sip:+1234...@test.com>>#015#0 12 #015#012 #015#012 #015#012 #015#012 #015#012 srsName="epsg:4346">#015#012 <12.32 34.24>#015#012 nt>#015#012 #015#012 #015#012 #015#012 no#015#012 #015#012 #015# 012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#012 Thanks *From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] *Sent:* Donnerstag, 5. Januar 2017 13:12 *To:* OpenSIPS users mailling list mailto:users@lists.opensips.org>>; xaled mailto:xa...@web.de>> *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? Try $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi Bogdan, thank you for looking at this issue. This regex does not work. I tried different combinations of the idea but it just not getting there. 2017-01-13T11:02:42.287766+01:00 ivr01 /usr/local/sbin/opensips[24845]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-13T11:02:42.288116+01:00 ivr01 /usr/local/sbin/opensips[24845]: WARNING:core:parse_repl: \/ unknown escape in (.*)<\/gml:Coordinates(.*)/\2/s 2017-01-13T11:02:42.288464+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:subst_parser: unknown flag . in (.*)/gml:Coordinates>(.*)<\/gml:Coordin ates(.*)/\2/s 2017-01-13T11:02:42.288787+01:00 ivr01 /usr/local/sbin/opensips[24845]: ERROR:core:tr_eval_re: Can't compile regexp I managed to get it running with perl: use OpenSIPS qw ( log ); use OpenSIPS::Constants; use OpenSIPS::Message; sub parsePIDFLO { my $m = shift; my $body = $m->getBody(); ($coord) = $body =~ /Coordinates>(.*)mailto:bog...@opensips.org] Sent: Mittwoch, 11. Januar 2017 11:05 To: OpenSIPS users mailling list ; asd asd Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, Please try $var(reg) = "(.*)/gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/06/2017 05:44 PM, xaled wrote: Hi Bogdan, can you give any hints on how to get the Coordinates values and not the whole xml body from the regex subst? Sorry for being not clever enough to figure it out myself. Thanks Hi Bogdan, $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); DBG:core:subst_run:matched shows the needed XML element with value, but not the value alone. The xlog output shows the whole XML body without gml:Coordinates. 2017-01-05T13:23:23.104982+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: Trying to apply reg exp [/gml:Coordinates>(.*)<\/gml:Coordinates/\1/] on : [#015#012mailto:pres:sip:+1234...@test.com> "pres:sip:+1234...@test.com">#015#012 #015#012 #015#012 #015#012#015#012 #015#012 #015#012 12.32 34.24#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#01 5#012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#0 12#015#012#015#012] 2017-01-05T13:23:23.107376+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-05T13:23:23.107903+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_parser: ok, se is 0x7f39a 5d0a1f0 2017-01-05T13:23:23.108241+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: running. r=0 2017-01-05T13:23:23.111918+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: matched (404, 45): [ gml:Coordinates>12.32 34.24#015#012mailto:pres:sip:+1234...@test.com> "pres:sip:+1234...@test.com">#015#0 12 #015#012 #015#012 #015#012 #015#012 #015#012 #015#012 <12.32 34.24>#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#015# 012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#012 Thanks From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 13:12 To: OpenSIPS users mailling list mailto:users@lists.opensips.org> >; xaled mailto:xa...@web.de> > Subject: Re: [OpenSIPS-Users] How to parse XML Body? Try $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi, Please try $var(reg) = "(.*)/gml:Coordinates>(.*)<\/gml:Coordinates(.*)/\2/s"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 01/06/2017 05:44 PM, xaled wrote: Hi Bogdan, can you give any hints on how to get the Coordinates values and not the whole xml body from the regex subst? Sorry for being not clever enough to figure it out myself. Thanks Hi Bogdan, $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); DBG:core:subst_run:matched shows the needed XML element with value, but not the value alone. The xlog output shows the whole XML body without gml:Coordinates. 2017-01-05T13:23:23.104982+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: Trying to apply reg exp [/gml:Coordinates>(.*)<\/gml:Coordinates/\1/] on : [version="1.0" encoding="UTF-8"?>#015#012 ns="urn:ietf:params:xml:ns:pidf" xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xmlns:gml="urn:opengis:specificat ion:gml:schema-xsd:feature:v3.0" entity="pres:sip:+1234...@test.com">#015#012 #015#012 tatus>#015#012 #015#012 #015#012 #015#012 id="point1" srsName="epsg:4346">#015#012 12.32 34.24#015#012 oint>#015#012 #015#012 #015#012 #015#012 smission-allowed>no#015#012 #015#012 #01 5#012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#0 12#015#012#015#012] 2017-01-05T13:23:23.107376+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-05T13:23:23.107903+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_parser: ok, se is 0x7f39a 5d0a1f0 2017-01-05T13:23:23.108241+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: running. r=0 2017-01-05T13:23:23.111918+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: matched (404, 45): [ gml:Coordinates>12.32 34.242017-01-05T13:23:23.112380+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:buf_init: initializing... 2017-01-05T13:23:23.112730+01:00 ivr01 /usr/local/sbin/opensips[2227]: Position is ="UTF-8"?>#015#012xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xm lns:gml="urn:opengis:specification:gml:schema-xsd:feature:v3.0" entity="pres:sip:+1234...@test.com">#015#0 12 #015#012 #015#012 #015#012 #015#012 n>#015#012 srsName="epsg:4346">#015#012 <12.32 34.24>#015#012 nt>#015#012 #015#012 #015#012 #015#012 ission-allowed>no#015#012 #015#012 #015# 012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#012 Thanks *From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] *Sent:* Donnerstag, 5. Januar 2017 13:12 *To:* OpenSIPS users mailling list <mailto:users@lists.opensips.org>>; xaled <mailto:xa...@web.de>> *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? Try $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi Bogdan, can you give any hints on how to get the Coordinates values and not the whole xml body from the regex subst? Sorry for being not clever enough to figure it out myself. Thanks Hi Bogdan, $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); DBG:core:subst_run:matched shows the needed XML element with value, but not the value alone. The xlog output shows the whole XML body without gml:Coordinates. 2017-01-05T13:23:23.104982+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: Trying to apply reg exp [/gml:Coordinates>(.*)<\/gml:Coordinates/\1/] on : [#015#012#015#012 #015#012 #015#012 #015#012#015#012 #015#012 #015#012 12.32 34.24#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#01 5#012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#0 12#015#012#015#012] 2017-01-05T13:23:23.107376+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-05T13:23:23.107903+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_parser: ok, se is 0x7f39a 5d0a1f0 2017-01-05T13:23:23.108241+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: running. r=0 2017-01-05T13:23:23.111918+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: matched (404, 45): [ gml:Coordinates>12.32 34.24#015#012#015#0 12 #015#012 #015#012 #015#012 #015#012 #015#012 #015#012 <12.32 34.24>#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#015# 012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#012 Thanks From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 13:12 To: OpenSIPS users mailling list mailto:users@lists.opensips.org> >; xaled mailto:xa...@web.de> > Subject: Re: [OpenSIPS-Users] How to parse XML Body? Try $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi Bogdan, $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; xlog("Position is $(rb[1]{re.subst,$var(reg)})\n"); DBG:core:subst_run:matched shows the needed XML element, but not the value. The xlog output shows the whole XML body without gml:Coordinates. 2017-01-05T13:23:23.104982+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: Trying to apply reg exp [/gml:Coordinates>(.*)<\/gml:Coordinates/\1/] on : [#015#012#015#012 #015#012 #015#012 #015#012#015#012 #015#012 #015#012 12.32 34.24#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#01 5#012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#0 12#015#012#015#012] 2017-01-05T13:23:23.107376+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:tr_eval_re: we must compile the regexp 2017-01-05T13:23:23.107903+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_parser: ok, se is 0x7f39a 5d0a1f0 2017-01-05T13:23:23.108241+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: running. r=0 2017-01-05T13:23:23.111918+01:00 ivr01 /usr/local/sbin/opensips[2227]: DBG:core:subst_run: matched (404, 45): [ gml:Coordinates>12.32 34.24#015#012#015#0 12 #015#012 #015#012 #015#012 #015#012 #015#012 #015#012 <12.32 34.24>#015#012 #015#012 #015#012#015#012 #015#012 no#015#012 #015#012#015# 012 #015#012 #015#012 2016-8-02T04:13:23Z#015#012 #015#012 Thanks From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 13:12 To: OpenSIPS users mailling list ; xaled Subject: Re: [OpenSIPS-Users] How to parse XML Body? Try $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 05.01.2017 13:38, xaled wrote: Hi Bogdan, Well - almost enough ;) $var(reg) = "/gml:Coordinates>(.*)(.*)mailto:users-boun...@lists.opensips.org] On Behalf Of xaled Sent: Donnerstag, 5. Januar 2017 12:22 To: 'OpenSIPS users mailling list' <mailto:users@lists.opensips.org> Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi Bogdan, that is enough for me! Thanks. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 12:19 To: OpenSIPS users mailling list mailto:users@lists.opensips.org> >; xaled mailto:xa...@web.de> > Subject: Re: [OpenSIPS-Users] How to parse XML Body? You can use the $(rb[n]) to access a specific body part. see: http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc65 Once you get the XML body, you can use some regexp in order to extract the needed info from the the XML (unfortunately thers is no way to parse XML at script level). See the "re" transformation : http://www.opensips.org/Documentation/Script-Tran-2-2#toc82 $var(reg) = "/gml:pos>(.*)http://www.opensips-solutions.com On 05.01.2017 12:57, xaled wrote: Hi Bogdan; opensips-2.2.2 Thanks. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 11:39 To: OpenSIPS users mailling list <mailto:users@lists.opensips.org> ; xaled <mailto:xa...@web.de> Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, What version of OpenSIPS are you using ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.01.2017 21:19, xaled wrote: Hi, What is the best way to parse xml body in an INVITE request? I want to access geographic location information gml:Coordinates or gml:pos from xml body and do some routing. I’ve seen the emergency module, but it is too specific to be useful in my basic scenario. Content-Type: multipart/mixed;boundary=ssboundary-1_ Content-Type: application/pidf+xml … XYZ XYZ … ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Try $var(reg) = "/gml:Coordinates>(.*)<\/gml:Coordinates/\1/"; Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 05.01.2017 13:38, xaled wrote: Hi Bogdan, Well - almost enough ;) $var(reg) = "/gml:Coordinates>(.*)2017-01-05T12:28:34.923153+01:00 ivr01 /usr/local/sbin/opensips[32257]: ERROR:core:subst_parser: unknown flag m in /gml:Coordinates>(.*) 2017-01-05T12:28:34.923507+01:00 ivr01 /usr/local/sbin/opensips[32257]: ERROR:core:tr_eval_re: Can't compile regexp Thanks *From:*Users [mailto:users-boun...@lists.opensips.org] *On Behalf Of *xaled *Sent:* Donnerstag, 5. Januar 2017 12:22 *To:* 'OpenSIPS users mailling list' *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? Hi Bogdan, that is enough for me! Thanks. *From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] *Sent:* Donnerstag, 5. Januar 2017 12:19 *To:* OpenSIPS users mailling list <mailto:users@lists.opensips.org>>; xaled <mailto:xa...@web.de>> *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? You can use the $(rb[n]) to access a specific body part. see: http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc65 Once you get the XML body, you can use some regexp in order to extract the needed info from the the XML (unfortunately thers is no way to parse XML at script level). See the "re" transformation : http://www.opensips.org/Documentation/Script-Tran-2-2#toc82 $var(reg) = "/gml:pos>(.*)http://www.opensips-solutions.com On 05.01.2017 12:57, xaled wrote: Hi Bogdan; opensips-2.2.2 Thanks. *From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] *Sent:* Donnerstag, 5. Januar 2017 11:39 *To:* OpenSIPS users mailling list <mailto:users@lists.opensips.org>; xaled <mailto:xa...@web.de> *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? Hi, What version of OpenSIPS are you using ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.01.2017 21:19, xaled wrote: Hi, What is the best way to parse xml body in an INVITE request? I want to access geographic location information gml:Coordinates or gml:pos from xml body and do some routing. I’ve seen the emergency module, but it is too specific to be useful in my basic scenario. Content-Type: multipart/mixed;boundary=ssboundary-1_ Content-Type: application/pidf+xml … XYZ XYZ … ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi Bogdan, Well - almost enough ;) $var(reg) = "/gml:Coordinates>(.*)(.*)mailto:users-boun...@lists.opensips.org] On Behalf Of xaled Sent: Donnerstag, 5. Januar 2017 12:22 To: 'OpenSIPS users mailling list' Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi Bogdan, that is enough for me! Thanks. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 12:19 To: OpenSIPS users mailling list mailto:users@lists.opensips.org> >; xaled mailto:xa...@web.de> > Subject: Re: [OpenSIPS-Users] How to parse XML Body? You can use the $(rb[n]) to access a specific body part. see: http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc65 Once you get the XML body, you can use some regexp in order to extract the needed info from the the XML (unfortunately thers is no way to parse XML at script level). See the "re" transformation : http://www.opensips.org/Documentation/Script-Tran-2-2#toc82 $var(reg) = "/gml:pos>(.*)http://www.opensips-solutions.com On 05.01.2017 12:57, xaled wrote: Hi Bogdan; opensips-2.2.2 Thanks. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 11:39 To: OpenSIPS users mailling list <mailto:users@lists.opensips.org> ; xaled <mailto:xa...@web.de> Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, What version of OpenSIPS are you using ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.01.2017 21:19, xaled wrote: Hi, What is the best way to parse xml body in an INVITE request? I want to access geographic location information gml:Coordinates or gml:pos from xml body and do some routing. I’ve seen the emergency module, but it is too specific to be useful in my basic scenario. Content-Type: multipart/mixed;boundary=ssboundary-1_ Content-Type: application/pidf+xml … XYZ XYZ … ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi Bogdan, that is enough for me! Thanks. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 12:19 To: OpenSIPS users mailling list ; xaled Subject: Re: [OpenSIPS-Users] How to parse XML Body? You can use the $(rb[n]) to access a specific body part. see: http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc65 Once you get the XML body, you can use some regexp in order to extract the needed info from the the XML (unfortunately thers is no way to parse XML at script level). See the "re" transformation : http://www.opensips.org/Documentation/Script-Tran-2-2#toc82 $var(reg) = "/gml:pos>(.*)http://www.opensips-solutions.com On 05.01.2017 12:57, xaled wrote: Hi Bogdan; opensips-2.2.2 Thanks. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 11:39 To: OpenSIPS users mailling list <mailto:users@lists.opensips.org> ; xaled <mailto:xa...@web.de> Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, What version of OpenSIPS are you using ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.01.2017 21:19, xaled wrote: Hi, What is the best way to parse xml body in an INVITE request? I want to access geographic location information gml:Coordinates or gml:pos from xml body and do some routing. I’ve seen the emergency module, but it is too specific to be useful in my basic scenario. Content-Type: multipart/mixed;boundary=ssboundary-1_ Content-Type: application/pidf+xml … XYZ XYZ … ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
You can use the $(rb[n]) to access a specific body part. see: http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc65 Once you get the XML body, you can use some regexp in order to extract the needed info from the the XML (unfortunately thers is no way to parse XML at script level). See the "re" transformation : http://www.opensips.org/Documentation/Script-Tran-2-2#toc82 $var(reg) = "/gml:pos>(.*)http://www.opensips-solutions.com On 05.01.2017 12:57, xaled wrote: Hi Bogdan; opensips-2.2.2 Thanks. *From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] *Sent:* Donnerstag, 5. Januar 2017 11:39 *To:* OpenSIPS users mailling list ; xaled *Subject:* Re: [OpenSIPS-Users] How to parse XML Body? Hi, What version of OpenSIPS are you using ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.01.2017 21:19, xaled wrote: Hi, What is the best way to parse xml body in an INVITE request? I want to access geographic location information gml:Coordinates or gml:pos from xml body and do some routing. I’ve seen the emergency module, but it is too specific to be useful in my basic scenario. Content-Type: multipart/mixed;boundary=ssboundary-1_ Content-Type: application/pidf+xml … XYZ XYZ … ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi Bogdan; opensips-2.2.2 Thanks. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Donnerstag, 5. Januar 2017 11:39 To: OpenSIPS users mailling list ; xaled Subject: Re: [OpenSIPS-Users] How to parse XML Body? Hi, What version of OpenSIPS are you using ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.01.2017 21:19, xaled wrote: Hi, What is the best way to parse xml body in an INVITE request? I want to access geographic location information gml:Coordinates or gml:pos from xml body and do some routing. I’ve seen the emergency module, but it is too specific to be useful in my basic scenario. Content-Type: multipart/mixed;boundary=ssboundary-1_ Content-Type: application/pidf+xml … XYZ XYZ … ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to parse XML Body?
Hi, What version of OpenSIPS are you using ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.01.2017 21:19, xaled wrote: Hi, What is the best way to parse xml body in an INVITE request? I want to access geographic location information gml:Coordinates or gml:pos from xml body and do some routing. I’ve seen the emergency module, but it is too specific to be useful in my basic scenario. Content-Type: multipart/mixed;boundary=ssboundary-1_ Content-Type: application/pidf+xml … XYZ XYZ … ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users