[OpenSIPS-Users] default_q (integer) doesn't seem to work

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Dec 14 17:40:34 CET 2009


That is the size of the db field (10 digits with 2 after comma) from 
storage point of view, but it has nothing to do the values that makes 
sense for the q (as per SIP)

Regards,
Bogdan

osiris123d wrote:
> I was in fact setting my Q value to something like 2000 or 5000 in my param
> so that the Q value in the location database would be 2 or 5.  I didn't
> realize that the Q value was from 0.0 to 1.0.  Looking at the OpenSIPS
> database table schema page confused me a little
>
> http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#AEN6246
>
> It says the following for the Q value
> q  float  10,2  1.0 no     Value used for preferential routing.
>  
> With it saying 10,2 for the SIZE I am not sure what that means.  I will try
> using the param again and setting it to something that will be between 0.0
> and 1.0.  I am sure it will work.  sorry for the confusion. 
>
>
>
> Bogdan-Andrei Iancu wrote:
>   
>> Hi,
>>
>> Note that the Q values has valid values just between 0 (for 0.0) and 
>> 1000 (for 1.0).
>>
>> In your first email you were using 2000 ! which is automatically shrink 
>> to 1000 -> q = 1.0.
>>
>> So, what value are you using (as param) and what do you get in DB ?
>>
>> Regards,
>> Bogdan
>>
>> osiris123d wrote:
>>     
>>> If the client doesn't send a Q value the registrar module doesn't appear
>>> to
>>> make the q value in the location database the value that is described in
>>> default_q.  So it looks like it doesn't work.
>>>
>>>
>>>
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>   
>>>       
>>>> Hi,
>>>>
>>>> So, if the client does not send a Q value, the opensips registrar module 
>>>> will use what you define as default_q - is this working for you? or you 
>>>> get this in DB ?
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>> osiris123d wrote:
>>>>     
>>>>         
>>>>> Doesn't look like my Bria Client is sending a Q Value in the Register
>>>>> Request.  Here is the SIP capture
>>>>>
>>>>> REGISTER sip:irock.com SIP/2.0
>>>>> Via: SIP/2.0/UDP
>>>>> 192.168.100.82:29076;branch=z9hG4bK-d8754z-b9d074879717f837-1---d8754z-;rport
>>>>> Max-Forwards: 70
>>>>> Contact:
>>>>> <sip:9XX2XXXXXX at 192.168.100.82:29076;rinstance=9aca27cf8a637fe4;transport=udp>
>>>>> To: "UserA"<sip:9XX2XXXXXX at irock.com>
>>>>> From: "UserA"<sip:9XX2XXXXXX at irock.com>;tag=eaa0a34f
>>>>> Call-ID: ZWZjMGJkOWY0YTQ4OTUxYWU1NTlkZjQzNzUyMGY5M2U.
>>>>> CSeq: 1 REGISTER
>>>>> Expires: 3600
>>>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>>>>> SUBSCRIBE,
>>>>> INFO
>>>>> User-Agent: Bria release 2.5.4 stamp 53956
>>>>> Content-Length: 0
>>>>>
>>>>>
>>>>>
>>>>> SIP/2.0 401 Unauthorized
>>>>> Via: SIP/2.0/UDP
>>>>> 192.168.100.82:29076;branch=z9hG4bK-d8754z-b9d074879717f837-1---d8754z-;rport=5275;received=192.251.125.224
>>>>> To:
>>>>> "UserA"<sip:9XX2XXXXXX at irock.com>;tag=eb4f595d3de5f0bd1aa7f6687dc18bd8.9540
>>>>> From: "UserA"<sip:9XX2XXXXXX at irock.com>;tag=eaa0a34f
>>>>> Call-ID: ZWZjMGJkOWY0YTQ4OTUxYWU1NTlkZjQzNzUyMGY5M2U.
>>>>> CSeq: 1 REGISTER
>>>>> WWW-Authenticate: Digest realm="irock.com",
>>>>> nonce="4b229df600000015ee23f37abe8c3886f0ebf2c98b1dac84", qop="auth"
>>>>> Server: A Proxy
>>>>> Content-Length: 0
>>>>>
>>>>>
>>>>>
>>>>> REGISTER sip:irock.com SIP/2.0
>>>>> Via: SIP/2.0/UDP
>>>>> 192.168.100.82:29076;branch=z9hG4bK-d8754z-93fa309c0ac0fd45-1---d8754z-;rport
>>>>> Max-Forwards: 70
>>>>> Contact:
>>>>> <sip:9XX2XXXXXX at 192.168.100.82:29076;rinstance=9aca27cf8a637fe4;transport=udp>
>>>>> To: "UserA"<sip:9XX2XXXXXX at irock.com>
>>>>> From: "UserA"<sip:9XX2XXXXXX at irock.com>;tag=eaa0a34f
>>>>> Call-ID: ZWZjMGJkOWY0YTQ4OTUxYWU1NTlkZjQzNzUyMGY5M2U.
>>>>> CSeq: 2 REGISTER
>>>>> Expires: 3600
>>>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>>>>> SUBSCRIBE,
>>>>> INFO
>>>>> User-Agent: Bria release 2.5.4 stamp 53956
>>>>> Authorization: Digest
>>>>> username="9XX2XXXXXX",realm="irock.com",nonce="4b229df600000015ee23f37abe8c3886f0ebf2c98b1dac84",uri="sip:irock.com",response="01f57984c1f86cee653bb9b4510f3755",cnonce="c8c805b6f0574779880005d7d4988ade",nc=00000001,qop=auth,algorithm=MD5
>>>>> Content-Length: 0
>>>>>
>>>>>
>>>>>
>>>>> SIP/2.0 200 OK
>>>>> Via: SIP/2.0/UDP
>>>>> 192.168.100.82:29076;branch=z9hG4bK-d8754z-93fa309c0ac0fd45-1---d8754z-;rport=5275;received=192.251.125.224
>>>>> To:
>>>>> "UserA"<sip:9XX2XXXXXX at irock.com>;tag=eb4f595d3de5f0bd1aa7f6687dc18bd8.4d5f
>>>>> From: "UserA"<sip:9XX2XXXXXX at irock.com>;tag=eaa0a34f
>>>>> Call-ID: ZWZjMGJkOWY0YTQ4OTUxYWU1NTlkZjQzNzUyMGY5M2U.
>>>>> CSeq: 2 REGISTER
>>>>> Contact:
>>>>> <sip:9XX2XXXXXX at 192.168.100.82:29076;rinstance=9aca27cf8a637fe4;transport=udp>;q=1;expires=3600;received="sip:192.251.125.224:5275",
>>>>> <sip:9018313182 at pt1.vitelity.net:5060>;q=0;expires=330159703
>>>>> Server: A Proxy
>>>>> Content-Length: 0
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Bogdan-Andrei Iancu wrote:
>>>>>   
>>>>>       
>>>>>           
>>>>>> Hi,
>>>>>>
>>>>>> The default Q is used only if the client is not sending any Q in the 
>>>>>> REGISTER request. Can you check this?
>>>>>>
>>>>>> Regards,
>>>>>> Bogdan
>>>>>>
>>>>>> osiris123d wrote:
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>>> I am running OpenSIPS 1.6 and I configure the following in my
>>>>>>> opensips.cfg
>>>>>>>
>>>>>>> modparam("registrar", "default_q", 2000)
>>>>>>>
>>>>>>> So I believe that anytime a softphone registers with opensips it will
>>>>>>> get
>>>>>>> put in the location database with a Q value of 2 correct?  But the
>>>>>>> new
>>>>>>> contacts are not.  They are still getting a Q value of 1 which is the
>>>>>>> default for the location database.
>>>>>>>
>>>>>>> Am I missing something here?
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>>               
>>>>>> -- 
>>>>>> Bogdan-Andrei Iancu
>>>>>> www.voice-system.ro
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at lists.opensips.org
>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>>
>>>>>>
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>   
>>>>>       
>>>>>           
>>>> -- 
>>>> Bogdan-Andrei Iancu
>>>> www.voice-system.ro
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> -- 
>> Bogdan-Andrei Iancu
>> www.voice-system.ro
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>     
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list