Hi folks,
I have a topology like this:
UA -> kamailio -> PSTN GW.
When I'm placing calls to a PSTN I have to append prefixes so the PSTN GW knows how to route the call. So the request-uri is <prefix><number>@<gateway_ip> e.g. 999123456@192.168.1.1. When the UA calls to the GW a "200 OK" message contains a contact header with 999123456@192.168.1.1. This is a problem because I don't want my customers to see gateway prefixes.
The Topoh module only hides IP addresses or the domain part. Is there any way to remove prefixes. This document (http://www.kamailio.org/events/2011-Cluecon/DCM-kamailio-security.pdf) stated "encoding IP and prefixes can be set via parameters". Can I remove prefixes from the contact in any other way than some contact header substitutions?
Thanks
Efelin
Efelin,
There is probably some confusion here. The 200 OK message is from your gateway (in your call flow), and it can put whatever it wants in the Contact URI; you have no control over that on the Kamailio side. You might be able to influence it with configuration settings on the GW side, but most likely not.
However, much more importantly: the contact URI in the replies from the gateway only serves to target your UA's sequential requests. It has nothing to do with the other side of your GW. If it's a SIP -> TDM or analog GW, then SIP details are totally irrelevant. If it's a SIP-to-SIP media gateway, it's a back-to-back user agent, meaning it generates a whole new logical call leg on the other side and bridges it to the incoming one from the UA. The parameters in that new leg are completely independent of any attributes of the old one.
Regardless, the contact URI is something sent back to the UA to tell it how to communicate with the GW. In the overall scheme of your call flow, no matter the media, it is a "purely internal" attribute.
-- This message was painstakingly thumbed out on my mobile, so apologies for brevity and errors.
Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
On Feb 17, 2012, at 9:20 AM, Efelin Novak efelin.novak@gmail.com wrote:
Hi folks,
I have a topology like this:
UA -> kamailio -> PSTN GW.
When I'm placing calls to a PSTN I have to append prefixes so the PSTN GW knows how to route the call. So the request-uri is <prefix><number>@<gateway_ip> e.g. 999123456@192.168.1.1. When the UA calls to the GW a "200 OK" message contains a contact header with 999123456@192.168.1.1. This is a problem because I don't want my customers to see gateway prefixes.
The Topoh module only hides IP addresses or the domain part. Is there any way to remove prefixes. This document (http://www.kamailio.org/events/2011-Cluecon/DCM-kamailio-security.pdf) stated "encoding IP and prefixes can be set via parameters". Can I remove prefixes from the contact in any other way than some contact header substitutions?
Thanks
Efelin
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Alex,
thanks for the answer.
My customer is on the SIP side. So my customer sees a prefix of my PSTN gateway in the contact header. Sequential requests are being sent to <prefix><number>@<gateway_ip>. However I think when I remove the prefix from the contact, the gateway would have no problem in responding to this seq. request (Isn't the call defined by to_tag, from_tag, call_id?).
So I want to hide the contact prefix from the UA.
Efelin
2012/2/17 Alex Balashov abalashov@evaristesys.com:
Efelin,
There is probably some confusion here. The 200 OK message is from your gateway (in your call flow), and it can put whatever it wants in the Contact URI; you have no control over that on the Kamailio side. You might be able to influence it with configuration settings on the GW side, but most likely not.
However, much more importantly: the contact URI in the replies from the gateway only serves to target your UA's sequential requests. It has nothing to do with the other side of your GW. If it's a SIP -> TDM or analog GW, then SIP details are totally irrelevant. If it's a SIP-to-SIP media gateway, it's a back-to-back user agent, meaning it generates a whole new logical call leg on the other side and bridges it to the incoming one from the UA. The parameters in that new leg are completely independent of any attributes of the old one.
Regardless, the contact URI is something sent back to the UA to tell it how to communicate with the GW. In the overall scheme of your call flow, no matter the media, it is a "purely internal" attribute.
-- This message was painstakingly thumbed out on my mobile, so apologies for brevity and errors.
Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
On Feb 17, 2012, at 9:20 AM, Efelin Novak efelin.novak@gmail.com wrote:
Hi folks,
I have a topology like this:
UA -> kamailio -> PSTN GW.
When I'm placing calls to a PSTN I have to append prefixes so the PSTN GW knows how to route the call. So the request-uri is <prefix><number>@<gateway_ip> e.g. 999123456@192.168.1.1. When the UA calls to the GW a "200 OK" message contains a contact header with 999123456@192.168.1.1. This is a problem because I don't want my customers to see gateway prefixes.
The Topoh module only hides IP addresses or the domain part. Is there any way to remove prefixes. This document (http://www.kamailio.org/events/2011-Cluecon/DCM-kamailio-security.pdf) stated "encoding IP and prefixes can be set via parameters". Can I remove prefixes from the contact in any other way than some contact header substitutions?
Thanks
Efelin
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I have to apologize.
The Topoh module hides the whole contact not just a domain part. So The problem is fixed.
However don't you have any experinece with clients that have problems with seq. requests being sent to some "random" string expect of the propagated contact?
UA ---invite ---> kamailio(topoh) ---invite ---> UA UA <---200ok--- kamailio(topoh) <---200ok--- UA (sent contact= 100@192.168.1.101) UA ---ACK---> kamailio(topoh) ---ACK---> UA (received ru= sip:<topoh_ip>;line=sr--random_string SIP/2.0 )
Also fix_nated_contact() destroys the contact so I suppose there should be no problem whit this.
Thank anyway
Efelin 2012/2/17 Efelin Novak efelin.novak@gmail.com:
Hi Alex,
thanks for the answer.
My customer is on the SIP side. So my customer sees a prefix of my PSTN gateway in the contact header. Sequential requests are being sent to <prefix><number>@<gateway_ip>. However I think when I remove the prefix from the contact, the gateway would have no problem in responding to this seq. request (Isn't the call defined by to_tag, from_tag, call_id?).
So I want to hide the contact prefix from the UA.
Efelin
2012/2/17 Alex Balashov abalashov@evaristesys.com:
Efelin,
There is probably some confusion here. The 200 OK message is from your gateway (in your call flow), and it can put whatever it wants in the Contact URI; you have no control over that on the Kamailio side. You might be able to influence it with configuration settings on the GW side, but most likely not.
However, much more importantly: the contact URI in the replies from the gateway only serves to target your UA's sequential requests. It has nothing to do with the other side of your GW. If it's a SIP -> TDM or analog GW, then SIP details are totally irrelevant. If it's a SIP-to-SIP media gateway, it's a back-to-back user agent, meaning it generates a whole new logical call leg on the other side and bridges it to the incoming one from the UA. The parameters in that new leg are completely independent of any attributes of the old one.
Regardless, the contact URI is something sent back to the UA to tell it how to communicate with the GW. In the overall scheme of your call flow, no matter the media, it is a "purely internal" attribute.
-- This message was painstakingly thumbed out on my mobile, so apologies for brevity and errors.
Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
On Feb 17, 2012, at 9:20 AM, Efelin Novak efelin.novak@gmail.com wrote:
Hi folks,
I have a topology like this:
UA -> kamailio -> PSTN GW.
When I'm placing calls to a PSTN I have to append prefixes so the PSTN GW knows how to route the call. So the request-uri is <prefix><number>@<gateway_ip> e.g. 999123456@192.168.1.1. When the UA calls to the GW a "200 OK" message contains a contact header with 999123456@192.168.1.1. This is a problem because I don't want my customers to see gateway prefixes.
The Topoh module only hides IP addresses or the domain part. Is there any way to remove prefixes. This document (http://www.kamailio.org/events/2011-Cluecon/DCM-kamailio-security.pdf) stated "encoding IP and prefixes can be set via parameters". Can I remove prefixes from the contact in any other way than some contact header substitutions?
Thanks
Efelin
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 02/17/2012 10:33 AM, Efelin Novak wrote:
However don't you have any experinece with clients that have problems with seq. requests being sent to some "random" string expect of the propagated contact?
Not sure I follow. The initiating UA is obligated to use whatever contact is provided by the UAS for sequential requests.
But the contact from the UAS is hidden to the UAC. So the UAS have to put a "hidden" contact to the R-URI. Should the TOPOH module also "fallback" the request uri? I dont think so. So the client has to receive ACK with a different r-uri that the contact he sent in 200OK.
Efelin
2012/2/17 Alex Balashov abalashov@evaristesys.com:
On 02/17/2012 10:33 AM, Efelin Novak wrote:
However don't you have any experinece with clients that have problems with seq. requests being sent to some "random" string expect of the propagated contact?
Not sure I follow. The initiating UA is obligated to use whatever contact is provided by the UAS for sequential requests.
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 02/17/2012 11:30 AM, Efelin Novak wrote:
But the contact from the UAS is hidden to the UAC. So the UAS have to put a "hidden" contact to the R-URI. Should the TOPOH module also "fallback" the request uri? I dont think so. So the client has to receive ACK with a different r-uri that the contact he sent in 200OK.
I am unable to understand this statement.
However, the client does not receive ACKs.
I just want to know whether installing of the TOPOH modul would somehow affect users of my proxy?
When the UAC creates (at least blink does so and few hardware phones I have) the seq. request, it places a received contact from 200OK (INVITE transaction) into a Request URI of the seq.request.
So when the UAC replies back with the ACK its Request URI is "hidden contact URI from 200OK". As the TOPOH module do not translates this ACK Request URI back, it is being sent to UAS unchanged (hidden contact of UAS).
It works actually in the testing topology. Are there any clients that should have a problem with this? Is this behavior described in some RFC?
Thanks
Efelin
2012/2/17 Alex Balashov abalashov@evaristesys.com:
On 02/17/2012 11:30 AM, Efelin Novak wrote:
But the contact from the UAS is hidden to the UAC. So the UAS have to put a "hidden" contact to the R-URI. Should the TOPOH module also "fallback" the request uri? I dont think so. So the client has to receive ACK with a different r-uri that the contact he sent in 200OK.
I am unable to understand this statement.
However, the client does not receive ACKs.
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
topoh updates the R-URI of the requests withing dialog, encoding/decoding as needed. So everything should work just fine, with no notice of the UA that the proxy encoded its contact.
If you have troubles, post incoming and outgoing sip message taken with ngrep on the sip server.
Cheers, Daniel
On 2/21/12 12:28 PM, Efelin Novak wrote:
I just want to know whether installing of the TOPOH modul would somehow affect users of my proxy?
When the UAC creates (at least blink does so and few hardware phones I have) the seq. request, it places a received contact from 200OK (INVITE transaction) into a Request URI of the seq.request.
So when the UAC replies back with the ACK its Request URI is "hidden contact URI from 200OK". As the TOPOH module do not translates this ACK Request URI back, it is being sent to UAS unchanged (hidden contact of UAS).
It works actually in the testing topology. Are there any clients that should have a problem with this? Is this behavior described in some RFC?
Thanks
Efelin
2012/2/17 Alex Balashovabalashov@evaristesys.com:
On 02/17/2012 11:30 AM, Efelin Novak wrote:
But the contact from the UAS is hidden to the UAC. So the UAS have to put a "hidden" contact to the R-URI. Should the TOPOH module also "fallback" the request uri? I dont think so. So the client has to receive ACK with a different r-uri that the contact he sent in 200OK.
I am unable to understand this statement.
However, the client does not receive ACKs.
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 02/17/2012 10:06 AM, Efelin Novak wrote:
Hi Alex,
thanks for the answer.
My customer is on the SIP side. So my customer sees a prefix of my PSTN gateway in the contact header.
Oh, I see. So, the UA is your customer, and the prefix is added by the proxy?
Sequential requests are being sent to<prefix><number>@<gateway_ip>. However I think when I remove the prefix from the contact, the gateway would have no problem in responding to this seq. request (Isn't the call defined by to_tag, from_tag, call_id?).
Well, no, that's not going to work. The call - depending on whether you're referring to the dialog or the session - may indeed be defined by those things, but the gateway is not going to accept a sequential request to a target URI different than the one it asked for.
Having the proxy translate them back and forth statefully will cause far more problems than it solves, and for that reason is not practical.
You're pretty much going to have to find a way to get the gateway to not send the prefix in the contact. What kind of gateway is it? Most gateways' translation features can be implemented at different stages of call processing, e.g. pre-processing, post-processing. If you can get it to strip the prefix off but store it for use as a routing guide in an earlier stage (something more like pre-processing), it shouldn't appear in the Contact.