[OpenSIPS-Users] Lookup contact from user part of RURI

Nauman Sulaiman nauman762-home at yahoo.co.uk
Wed Feb 2 15:30:46 CET 2011


Hi, using opensips 1.6.2. I am trying to use the user part of incoming RURI 
to look up a contact, reason being is full RURI is incorrect, this is due to bogus proxy upstream so need a workaround.

lookup("location") seems to be only if you use AOR.

For exmaple i need to reroute incoming ACK to real address of UA
So i would like to lookup 1234 user part of RURI below and rewrite the
RURI with the correct ip. 12.34.56.78 is Opensips IP rather than end UA ip.

1234 at domain.com is stored in db. How do i lookup contact just with user part and rewrite the RURI.

ie ACK sip:1234 at 12.34.56.78;rinstance=A89B5393

Need something for below
 if(method=="ACK")
 {
      xlog("ACK received  \n");
      if( $rd == "12.34.56.78")          // check if opensips ip
      {
           lookup(user);  // ???   // need to lookup with user or rinstance
           // rewrite RURI with correct address
     }
 }




Hope its clear, thanks


      



More information about the Users mailing list