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.