6 dec 2012 kl. 14:01 skrev Juha Heinanen <[email protected]>: > Daniel-Constantin Mierla writes: > >> I haven't studied exactly the algorithm, but from what I understood, the >> contacts have to be sorted also by reg-id. What is not clear yet for me >> is if Q values still plays a role. > > i was wondering that too. what is the relationship between q and reg-id?
This is how I parse it - which may or may not be wrong :-) One registered device has TWO registrations that I belive should have the same Q. So first sort contacts so that you have them grouped by contact and for the pairs with one or multiple reg-ids and the same instance, treat them as one contact when handling serial forking with Q values. One contact may have an inactive state, since the flow is down. In that case, select the next contact with the same instance id but a different reg-id. We should always only use one contact in the set of contacts for one instance with different regid's. > >> First, it will require to propagate sip-instance and reg-id fields to >> destination set (via branch_t structure) from usrloc/registrar -- just >> adding some fields and copy the values as we do for example for path >> and q. > > what if sip-instance is missing, but reg-id is present like in this > register request from barasip? > > REGISTER sip:test.fi SIP/2.0. > Via: SIP/2.0/TCP 192.98.102.10:5050;branch=z9hG4bKe8fc3b4174d10554;rport. > Contact: > <sip:[email protected]:5050;transport=tcp>;expires=600;q=0.8;reg-id=1. > Max-Forwards: 70. > Route: <sip:192.98.102.10;transport=tcp;lr>. > To: <sip:[email protected]>. > From: <sip:[email protected]>;tag=a41662ae8ebfb044. > Call-ID: 72e7f927a4be41a2. > CSeq: 33968 REGISTER. > User-Agent: baresip v0.4.2 (i586/linux). > Supported: outbound, path. > Content-Length: 0. > > or is it a bug in baresip? Yes, that's clearly a bug. Outbound relies on the instance ID that identifies the device. /O > > -- juha > > _______________________________________________ > sr-dev mailing list > [email protected] > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
