[OpenSIPS-Users] lookup() questions
Răzvan Crainea
razvan at opensips.org
Fri Oct 24 20:15:55 CEST 2014
Hi, Cedric!
The third version is the correct version you should use, if the R-URI is
different than the AOR you are looking for.
Are you sure that your tcpdump trace is tracking the UDP traffic? Are
you sure there are no errors generated by t_relay()? Do you see t_relay
DBG lines in the logs?
Best regards,
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
On 10/24/2014 02:31 AM, OCEANET - Cédric BASSAGET wrote:
> Hello,
>
> I'm actually trying to resolve NAT issues with opensips, and I have a
> problem using lookup() function.
>
> UAC register to my opensips server. When UAC is behind nat (detected
> with nat_uac_test()), I do a "fix_nated_register()" and save("location").
> My usrloc table looks correct, I have a line with (important fields):
> - a username = 2015 (sip trunk identifier)
> - a domain = the domain my UAC is registering to (= the domain my
> opensips is listening on)
> - a contact = sip:2015@<the IP of my UAC>
> - a received = sip:<the IP of my UAC>:<port> (in my tests, port=1024)
> - and many other fields (...)
>
> When trying to relay an incoming INVITE to this UAC, if I understood
> well, I have to do a "lookup()" before t_relay, to tell opensips to send
> the request to the "usrloc.received" <address:port>.
>
> I've tried couple things, like :
> - lookup("location") -> $ru is totally different from what we are
> looking for, so it does not work, that's normal
> - lookup("location","","2015@<domain>") -> got an error :
> ERROR:core:parse_uri: bad uri, state 0 parsed: <2015> (4) /
> <2015 at domain> (37)
> - lookup("location","","sip:2015@<domain>") -> $retcode=1, and debug
> shows me this :
>
> DBG:registrar:lookup: found a complete match
> DBG:registrar:lookup: setting as ruri <sip:2015@<the IP of my UAC>>
> but nothing goes out to ip address of my UAC... (tcpdump).
>
> Can somebody tell me if I've correctly understood how lookup() function
> works ? Or if I'm doing totally aberrant things ?
>
> Regards,
> Cédric
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list