<div dir="ltr"><div>Hi,</div><div>I'm having the following scenario</div><div>UA <---> Prox1 <----> Proxy2 <-----> B2BUA <------> UA</div><div><br></div><div>Proxy2 and B2BUA are connected on LAN and Proxy1 is adding his own Contact Alias and Proxy 2 is adding his own Contact Alias</div><div>I'm adding Alias via using the following function set_contact_alias("1") as it will remove other contact alias but is causing the problem in the case of BYE coming from B2BUA.</div><div><br></div><div>Is there is a way to find if the contact alias is already set?</div><div>How I can replace the local IP alias with domain name when request is coming from B2BUA and alias is added by Proxy2.</div><div><br></div><div><br></div><div><br></div><div>Here are logs to show problem</div><div><br></div><div>in 200 sent by B2BUA and proxy2 add alias 
10.44.44.2~6000~1 Now in ACK it is causing the problem <br></div><div><br></div><div>SIP/2.0 200 OK<br>Via: SIP/2.0/UDP sip.prox1.example.com:5060;rport=5060;received=3.18.1.21;branch=z9hG4bK2d66.a89039bedfe3d1113132f04c94b8a757.0<br>Via: SIP/2.0/UDP 192.168.1.168:50279;received=109.8.2.1;rport=45607;branch=z9hG4bKPj84875d08eafc48bfa6c29de5fe245cea<br>Record-Route: <sip:sip.proxy2.example;lr;did=e84.87e2;rtp=bridge><br>Record-Route: <sip:<a href="http://sip.prox1.example.com">sip.prox1.example.com</a>;lr;did=e84.7452;rtp=bridge><br>From: "8001" <<a href="mailto:sip%3A8001@sip.example.com">sip:8001@sip.example.com</a>>;tag=0b9915abae654e21845fd4d7f577ede9<br>To: <<a href="mailto:sip%3A2501@sip.example.com">sip:2501@sip.example.com</a>>;tag=as1f4f6b1c<br>Call-ID: a0095b9868924b0681225a8884a06c22<br>CSeq: 3687 INVITE<br>Server: Voip<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE<br>Supported: replaces, timer<br>Session-Expires: 1800;refresher=uas<br>Contact: <sip:2501@10.44.44.2:6000;alias=10.44.44.2~6000~1><br>Content-Type: application/sdp<br>Require: timer<br>Content-Length: 281</div><div><br></div><div>Ack for 200</div><div><br></div><div>ACK <a href="http://sip:2501@10.44.44.2:6000">sip:2501@10.44.44.2:6000</a> SIP/2.0<br>Via: SIP/2.0/UDP sip.proxy2.example.com:5060;branch=z9hG4bK2d66.3c10a3b45e5c8caacbc5853d5e6418b2.0<br>Via: SIP/2.0/UDP sip.proxy1.example.com:5060;rport=5060;received=
3.18.1.21

;branch=z9hG4bK2d66.788312006d5f7aedc058435cd203fed3.0<br>Via: SIP/2.0/UDP 192.168.1.168:50279;received=
109.8.2.1

;rport=45607;branch=z9hG4bKPjf003c3bfe4ba423e9a0dedd647511dd3<br>Max-Forwards: 68<br>From: "8001" <<a href="mailto:sip%3A8001@sip.example.com">sip:8001@sip.example.com</a>>;tag=0b9915abae654e21845fd4d7f577ede9<br>To: <<a href="mailto:sip%3A2501@sip.example.com">sip:2501@sip.example.com</a>>;tag=as1f4f6b1c<br>Call-ID: a0095b9868924b0681225a8884a06c22<br>CSeq: 3687 ACK<br>Content-Length:  0</div><div><br></div><div><br></div><div>Thanks in advance<br> </div></div>