i'm trying to figure out what still needs to be done in order to complete outbound support.
i would like to start by supporting the very basic example in rfc5626, where there is only one co-located outbound proxy/registrar to which an outbound capable ua sends this register request:
REGISTER sip:example.com SIP/2.0 Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bK-bad0ce-11-1036 Max-Forwards: 70 From: Bob sip:bob@example.com;tag=d879h76 To: Bob sip:bob@example.com Call-ID: 8921348ju72je840.204 CSeq: 1 REGISTER Supported: path, outbound Contact: sip:line1@192.0.2.2;transport=tcp; reg-id=1; ;+sip.instance="urn:uuid:00000000-0000-1000-8000-000A95A0E128" Content-Length: 0
in the request, outbound support is indicated by "outbound" and "path" in supported header and by "+sip.instance" and "reg-id" params of contact header. note that there is no Path header in the request.
when the outbound proxy/registrar receives this request, it checks if +sip.instance and reg-id values are the same as in previous request for the same AoR. if they are not, registrar saves the +sip.instance and reg-id along with the rest of the contact header. if they are, registrar replaces the old contact uri and flow info with the new one.
since outbound capable ua handles nat keepalive itself, there is no need for the the outbound proxy/registrar to nat ping the ua, i.e., in case of kamailio, outbound capable UAs should not be pinged even when they are behind nat.
when someone sends request to sip:bob@example.com, the outbound proxy/registrar looks and finds the flow over which sip:bob@example.com was registered and forwards the request over that flow instead of resolving the contact uri.
how much of the above is currently supported?
- is registrar capable of overwriting the old contact uri and flow info with new one if +sip.instance and reg-id values of an AoR match old one?
- is nat pinging turned off for outbound capable UAs?
- is request to an outbound capable us send over its flow rather than based on contact uri?
-- juha
Juha Heinanen writes:
how much of the above is currently supported?
is registrar capable of overwriting the old contact uri and flow info with new one if +sip.instance and reg-id values of an AoR match old one?
is nat pinging turned off for outbound capable UAs?
is request to an outbound capable us send over its flow rather than based on contact uri?
i did some tests and looks like first feature is supported by k 4.0.
i was not able to test the second feature because i don't currently have an ua behind nat available, but i suspect that it is not currently supported and that nat pinging is based solely on usrloc nat_bflag. in theory is would, of course, be possible to test in config file if an ua supports outbound and, if yes, leave nat_bflag unset. however, such a test is not very easy write, because it involves checking existence of certain supported header and contact header params. any ideas on this one?
the third feature works for tcp and perhaps for udp too, but i was not able to test the udp case. that is, if contact uri host/port differs from received ip/udp port, will received column be set or not.
-- juha