Hello
I would like to ask the list some questions about headers. I've been reading the list and textops module, but I haven't found how to do this.
Imagine a scenario with 2 SER proxies. The first proxy adds a header like: Path: <....>
1 )How can the second proxy add a parameter to this header (and not a new header)? The result that I'm looking for is something like:
Path: <....>,<....>
2 ) I know that SER can check whether a header is present(is_present_hf()), but is it possible to extract the information of a header and use it? I can't use search() function, because I don't know the information, just the header name. I need to read some parameters from a header of a SIP message to construct a new header.
Thank you very much for your time Regards,
Curro
On 08-03 11:51, Curro wrote:
Hello
I would like to ask the list some questions about headers. I've been reading the list and textops module, but I haven't found how to do this.
Imagine a scenario with 2 SER proxies. The first proxy adds a header like: Path: <....>
1 )How can the second proxy add a parameter to this header (and not a new header)? The result that I'm looking for is something like:
Path: <....>,<....>
2 ) I know that SER can check whether a header is present(is_present_hf()), but is it possible to extract the information of a header and use it? I can't use search() function, because I don't know the information, just the header name. I need to read some parameters from a header of a SIP message to construct a new header.
This is not easy from the script, all you can do from the script is to find a piece of information in the message using regular expressions and replace/erease it.
You would have to write a ser module for this.
Jan.
On Mar 08, 2004 at 11:51, Curro curro_dominguez@terra.es wrote:
Hello
I would like to ask the list some questions about headers. I've been reading the list and textops module, but I haven't found how to do this.
Imagine a scenario with 2 SER proxies. The first proxy adds a header like: Path: <....>
1 )How can the second proxy add a parameter to this header (and not a new header)? The result that I'm looking for is something like:
Path: <....>,<....>
2 ) I know that SER can check whether a header is present(is_present_hf()), but is it possible to extract the information of a header and use it? I can't use search() function, because I don't know the information, just the header name. I need to read some parameters from a header of a SIP message to construct a new header.
You could try subst() from textops (it might be documented only in the sgml in textops/doc). You have a special escape: \u which will expand to the message uri, but if you want something else than the uri, you are out of luck :-) E.g.: subst('/^(Path:.*)$/\1,uri=\u'); will add uri=<msg_uri> to your Path header.
Andrei
Thanks Andrei and Jan for your answers.
I see that it is not easy to do this with SER. I wanted to do this with headers to construct a header which indicates the user agent which Route it should follow. I'll try to explain it better. The idea is based on IMS standard. Proxies on the way add theirselves to a Path header. When the response to a request come back to the UA, it takes the Path header and creates a Route header dynamic(used at SIP Proxies which act as loose router).
What I really want is use Route header in my UA to test loose router function. Do you know any other way to do this?
Thanks. Regards, Curro
On Mon, 2004-03-08 at 13:23, Andrei Pelinescu-Onciul wrote:
On Mar 08, 2004 at 11:51, Curro curro_dominguez@terra.es wrote:
Hello
I would like to ask the list some questions about headers. I've been reading the list and textops module, but I haven't found how to do this.
Imagine a scenario with 2 SER proxies. The first proxy adds a header like: Path: <....>
1 )How can the second proxy add a parameter to this header (and not a new header)? The result that I'm looking for is something like:
Path: <....>,<....>
2 ) I know that SER can check whether a header is present(is_present_hf()), but is it possible to extract the information of a header and use it? I can't use search() function, because I don't know the information, just the header name. I need to read some parameters from a header of a SIP message to construct a new header.
You could try subst() from textops (it might be documented only in the sgml in textops/doc). You have a special escape: \u which will expand to the message uri, but if you want something else than the uri, you are out of luck :-) E.g.: subst('/^(Path:.*)$/\1,uri=\u'); will add uri=<msg_uri> to your Path header.
Andrei
I know how IMS Path header field works. If you want to do something like this then you will need to write a new module. A lot of code from rr module could be reused, the tricky part would be storing this information in usrloc (it is possible but requires more coding).
Jan.
On 08-03 18:25, Curro wrote:
Thanks Andrei and Jan for your answers.
I see that it is not easy to do this with SER. I wanted to do this with headers to construct a header which indicates the user agent which Route it should follow. I'll try to explain it better. The idea is based on IMS standard. Proxies on the way add theirselves to a Path header. When the response to a request come back to the UA, it takes the Path header and creates a Route header dynamic(used at SIP Proxies which act as loose router).
What I really want is use Route header in my UA to test loose router function. Do you know any other way to do this?
Thanks. Regards, Curro
On Mon, 2004-03-08 at 13:23, Andrei Pelinescu-Onciul wrote:
On Mar 08, 2004 at 11:51, Curro curro_dominguez@terra.es wrote:
Hello
I would like to ask the list some questions about headers. I've been reading the list and textops module, but I haven't found how to do this.
Imagine a scenario with 2 SER proxies. The first proxy adds a header like: Path: <....>
1 )How can the second proxy add a parameter to this header (and not a new header)? The result that I'm looking for is something like:
Path: <....>,<....>
2 ) I know that SER can check whether a header is present(is_present_hf()), but is it possible to extract the information of a header and use it? I can't use search() function, because I don't know the information, just the header name. I need to read some parameters from a header of a SIP message to construct a new header.
You could try subst() from textops (it might be documented only in the sgml in textops/doc). You have a special escape: \u which will expand to the message uri, but if you want something else than the uri, you are out of luck :-) E.g.: subst('/^(Path:.*)$/\1,uri=\u'); will add uri=<msg_uri> to your Path header.
Andrei
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hello and thands for your answer
As you can see, what I'm trying to do is studying IMS and use SER for it. So, I wanted to start by little problems like headers.
It could be helpful whether someone could give me his/her point of view about IMS and SER. It means, what big problems they see to adapt SER to act as IMS Proxy and, on the other hand, what things they think could be easily done, maybe with little changes on modules?.
It could help me to know how big could be this work, and whether it's worth or not. I imagine that it's not a priority to Iptel's guys (or it is?) write or adapt modules in order to adapt SER to IMS.
By the way, a question about writting new module. Based on your experience, how many time and people could take write a new module based on rr to add Path header and extract information from headers?
Really thank you for your answers, comments and help.
Curro
On Mon, 2004-03-08 at 18:55, Jan Janak wrote:
I know how IMS Path header field works. If you want to do something like this then you will need to write a new module. A lot of code from rr module could be reused, the tricky part would be storing this information in usrloc (it is possible but requires more coding).
Jan.
On 08-03 18:25, Curro wrote:
Thanks Andrei and Jan for your answers.
I see that it is not easy to do this with SER. I wanted to do this with headers to construct a header which indicates the user agent which Route it should follow. I'll try to explain it better. The idea is based on IMS standard. Proxies on the way add theirselves to a Path header. When the response to a request come back to the UA, it takes the Path header and creates a Route header dynamic(used at SIP Proxies which act as loose router).
What I really want is use Route header in my UA to test loose router function. Do you know any other way to do this?
Thanks. Regards, Curro
On Mon, 2004-03-08 at 13:23, Andrei Pelinescu-Onciul wrote:
On Mar 08, 2004 at 11:51, Curro curro_dominguez@terra.es wrote:
Hello
I would like to ask the list some questions about headers. I've been reading the list and textops module, but I haven't found how to do this.
Imagine a scenario with 2 SER proxies. The first proxy adds a header like: Path: <....>
1 )How can the second proxy add a parameter to this header (and not a new header)? The result that I'm looking for is something like:
Path: <....>,<....>
2 ) I know that SER can check whether a header is present(is_present_hf()), but is it possible to extract the information of a header and use it? I can't use search() function, because I don't know the information, just the header name. I need to read some parameters from a header of a SIP message to construct a new header.
You could try subst() from textops (it might be documented only in the sgml in textops/doc). You have a special escape: \u which will expand to the message uri, but if you want something else than the uri, you are out of luck :-) E.g.: subst('/^(Path:.*)$/\1,uri=\u'); will add uri=<msg_uri> to your Path header.
Andrei
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
On 10-03 11:01, Curro wrote:
As you can see, what I'm trying to do is studying IMS and use SER for it. So, I wanted to start by little problems like headers.
It could be helpful whether someone could give me his/her point of view about IMS and SER. It means, what big problems they see to adapt SER to act as IMS Proxy and, on the other hand, what things they think could be easily done, maybe with little changes on modules?.
It could help me to know how big could be this work, and whether it's worth or not. I imagine that it's not a priority to Iptel's guys (or it is?) write or adapt modules in order to adapt SER to IMS.
No, it is not our priority since we have no use for it.
By the way, a question about writting new module. Based on your experience, how many time and people could take write a new module based on rr to add Path header and extract information from headers?
This is hard to estimate, it depends a lot on your coding skills and experience, if you are familiar with ser internals and fluent in C then it should not take you more than a couple of days.
Jan.
Hi Curro!
In case you are planning to implement a new module for the Path header field, I am not sure whether you have noticed RFC 3327, http://www.ietf.org/rfc/rfc3327 which specifies the Path header field on a more general level, than the 3GPP IMS Specs such as 23.228, 24.228, 24.229, etc.
Outside the IMS scenarios, the Path header field could also be used to overcome blocking firewalls, where one SIP (and Media) Proxy e.g. in a DMZ (De-Militarized Zone) has to proxy all the traffic. In case your registrar is outside the blocking firewall, not even the signalling messages ever arrive at the UA (because those are blocked by the firewall), unless you are doing some ugly hacks at the (DMZ-) SIP Proxy. RFC 3327 provides a standardized solution for this problem, which is (as I heard) already implemented in some other SIP Proxies.
I guess also the 'usrloc' module needs to be enhanced to save and return the Path vector, and therefore a new column 'path' needs to be added to the table 'location' and stuff.
Good luck!
Greetings, Bernie
On Wed, 10 Mar 2004, Curro wrote:
Hello and thands for your answer
As you can see, what I'm trying to do is studying IMS and use SER for it. So, I wanted to start by little problems like headers.
It could be helpful whether someone could give me his/her point of view about IMS and SER. It means, what big problems they see to adapt SER to act as IMS Proxy and, on the other hand, what things they think could be easily done, maybe with little changes on modules?.
It could help me to know how big could be this work, and whether it's worth or not. I imagine that it's not a priority to Iptel's guys (or it is?) write or adapt modules in order to adapt SER to IMS.
By the way, a question about writting new module. Based on your experience, how many time and people could take write a new module based on rr to add Path header and extract information from headers?
Really thank you for your answers, comments and help.
Curro
On Mon, 2004-03-08 at 18:55, Jan Janak wrote:
I know how IMS Path header field works. If you want to do something like this then you will need to write a new module. A lot of code from rr module could be reused, the tricky part would be storing this information in usrloc (it is possible but requires more coding).
Jan.
On 08-03 18:25, Curro wrote:
Thanks Andrei and Jan for your answers.
I see that it is not easy to do this with SER. I wanted to do this with headers to construct a header which indicates the user agent which Route it should follow. I'll try to explain it better. The idea is based on IMS standard. Proxies on the way add theirselves to a Path header. When the response to a request come back to the UA, it takes the Path header and creates a Route header dynamic(used at SIP Proxies which act as loose router).
What I really want is use Route header in my UA to test loose router function. Do you know any other way to do this?
Thanks. Regards, Curro
On Mon, 2004-03-08 at 13:23, Andrei Pelinescu-Onciul wrote:
On Mar 08, 2004 at 11:51, Curro curro_dominguez@terra.es wrote:
Hello
I would like to ask the list some questions about headers. I've been reading the list and textops module, but I haven't found how to do this.
Imagine a scenario with 2 SER proxies. The first proxy adds a header like: Path: <....>
1 )How can the second proxy add a parameter to this header (and not a new header)? The result that I'm looking for is something like:
Path: <....>,<....>
2 ) I know that SER can check whether a header is present(is_present_hf()), but is it possible to extract the information of a header and use it? I can't use search() function, because I don't know the information, just the header name. I need to read some parameters from a header of a SIP message to construct a new header.
You could try subst() from textops (it might be documented only in the sgml in textops/doc). You have a special escape: \u which will expand to the message uri, but if you want something else than the uri, you are out of luck :-) E.g.: subst('/^(Path:.*)$/\1,uri=\u'); will add uri=<msg_uri> to your Path header.
Andrei
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers