Hi Lucio,
Are you using stateful relay? I guess you are using rewritehost and forward for your case? If so, you'll simply need to apply the same routing logic to the ACK as INVITE.
Because the client have no idea about what you have done with the INVITE after it sent to you. It will still stick to the original r-uri.
If you are using stateful t_relay(), the tm module will match the request with recorded transaction and modify the r-uri accordingly for you. You need not to worry about the mismatched r-uri. You'll see packet from your openser to gateway with modified r-uri.
If not, think you need to store the contact uri in some form and modify the r-uri for ACK through some external script.
Hope this helps.
Please let me know if I comprehend wrongly. A piece of your routing block might be helpful in that case.
Rgds, BS
-----Original Message----- From: Lucio Maciel [mailto:lucio@tesatelecom.com] Sent: 2008年3月25日 1:41 To: Bai Shi Cc: users@lists.openser.org Subject: RE: [OpenSER-Users] Wrong R-uri in ACK
Ok, here are some snips of the call
Here is the initial invite that I receive from the client...
client -> openser <cut> INVITE sip:02188889999@tesatelecom.com SIP/2.0 From: username01 sip:username01@tesatelecom.com;tag=a8ced7257fddfcc To: sip:02188889999@tesatelecom.com Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bK0631b8ccb Call-ID: 76b50f94a009c40 CSeq: 2138284261 INVITE Max-Forwards: 70 Content-Length: 281 Route: sip:ip_of_tesatelecom.com:5060;lr Allow:INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO Content-Type: application/sdp Contact: sip:username01@192.168.0.61:5060 Supported: replaces User-Agent: HiPath 3000 V7.0 M5T SIP-UA SAFE/v3.6.6.10 sdp follows.... </cut>
I forward this to my pstn gateway, and that is the 200 OK that I forward back to the client.
gw -> openser -> client <cut> SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.0.61:5060;received=xxx.xxx.xxx.xxx;rport=5060;branch=z9hG4bKd97a7e313 Record-Route: sip:ip_of_tesatelecom;lr=on;ftag=a8ced7257fddfcc;nat=yes;did=fdf.0c5df845 From: username01 sip:username01@tesatelecom.com;tag=a8ced7257fddfcc To: sip:02188889999@tesatelecom.com;tag=5514406-tdb1077288600 Call-ID: 76b50f94a009c40 CSeq: 2138284262 INVITE Server: PSTN Gateway Contact: sip:552188889999@ip_of_gateway:5060;transport=udp Content-Type: application/sdp Content-Length: 179 sdp follows... </cut>
And now the ACK for the 200ok client-> openser <cut> ACK sip:02188889999@tesatelecom.com SIP/2.0 <- back uri From: username01 sip:username01@tesatelecom.com;tag=a8ced7257fddfcc To: sip:02188889999@tesatelecom.com;tag=5514406-tdb1077288600 Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bK9ea89fe86 Call-ID: 76b50f94a009c40 CSeq: 2138284262 ACK Max-Forwards: 70 Content-Length: 0 Route: sip:ip_of_tesatelecom;lr=on;ftag=a8ced7257fddfcc;nat=yes;did=fdf.0c5df845 User-Agent: HiPath 3000 V7.0 M5T SIP-UA SAFE/v3.6.6.10 </cut>
The r-uri in the ack is wrong, it should be the contact from the 200ok, and i can't route it to the rigth gateway.
So, there is some way that i can workaround this in openser?? Since is very unlikely that the client will fix this issue.
Thanks
On Tue, 2008-03-25 at 00:54 +0800, Bai Shi wrote:
Could you provide more information? Who is issuing ACK and which is not changed? After t_relay by Openser? Rgds, BS
-----Original Message----- From: users-bounces@lists.openser.org [mailto:users-bounces@lists.openser.org] On Behalf Of Lucio Maciel Sent: 2008年3月24日 23:13 To: users@lists.openser.org Subject: [OpenSER-Users] Wrong R-uri in ACK
Hi...
I'm getting some wrongs ruri's in the ACK for a final 200ok from an INVITE...
It is comming as the original INVITE r-uri (number@host) and not the contact from the 200ok.
There is something i can do to workaround this in openser?
Thanks.