Only for requests that are not sent within a dialog, that rules out ACK, BYE, NOTIFY.
The rest of the messages -- INVITE, REFER, SUBSCRIBER either establish a dialog or are sent out of dialogs.
If any of them contains pre-loaded route set (one or more Route header fields) which will instruct your server to forward them elsewhere then you will not call lookup("location") because loose_route would return true and that is typically followed by t_relay. In such a case the route of the request is determined by the sender and there is no need for you to do user location lookup.
If they contain no Route header fields than it is up to you to decide how to route them if the domain part of the Request-URI contains one of domains or IP addresses your proxy is reponsible for. In this case the proxy would probably use lookup("location") to find out the registered contact.
If the domain part of the Request-URI does not contain one of your domains or IP address, then it probably makes no sense to perform lookup("location") because you would not have the contact of the callee in the user location database anyway. In this case one could either relay or reject the request, depending on the local policy.
Jan.
On 23-02 12:12, Java Rockx wrote:
Hi All,
Can anyone tell me for which message types I should call lookup("location") before t_relay()?
ACK BYE CANCEL INVITE NOTIFY REFER SUBSCRIBE
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers