[SR-Users] q-value on unsupported clients

Daniel W. Graham dan at cmsinter.net
Thu Nov 5 09:20:55 CET 2015


I figured out a way to send q-value by using auth user, however ran into an issue-

                                # Check Authorization User for q-value and replace Contact header
                                if $(au{param.count}) > 0 {
                                                $var(qvalue)=$(au{param.value,q});
                                                if($var(qvalue) != $null) {
                                                                xlog("L_INFO", "REGISTER $fU: q-value specified by client q=$var(qvalue)\n");
                                                                $var(newct) = $ct + ';q=0.' + $var(qvalue);
                                                                xlog("L_INFO", "REGISTER $fU: new pending Contact hdr: $var(newct)\n");
                                                                remove_hf("Contact");
                                                                append_hf("Contact: $var(newct)\r\n");
                                                                xlog("L_INFO", "REGISTER $fU: new Contact hdr: $hdr(Contact)\n");
                                                }
                                }

Results in:

Nov  5 03:06:45 SIP01 /usr/local/sbin/kamailio[3319]: INFO: xlog: REGISTER someusername: q-value specified by client q=99
Nov  5 03:06:45 SIP01 /usr/local/sbin/kamailio[3319]: INFO: xlog: REGISTER someusername: new pending Contact hdr: <sip: someusername @x.x.x.x:5060>;expires=1800;q=0.99
Nov  5 03:06:45 SIP01 /usr/local/sbin/kamailio[3319]: INFO: xlog: REGISTER someusername: new Contact hdr: <sip: someusername @x.x.x.x:5060>;expires=1800

Based on the xlog output, the following doesn't appear to be working -
remove_hf("Contact");
append_hf("Contact: $var(newct)\r\n");

I've actually had a similar issue before replacing a hdr so I'm wondering if I'm doing something wrong?

Thanks,
-dan


From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel W. Graham
Sent: Wednesday, November 4, 2015 11:04 AM
To: miconda at gmail.com; Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org>
Subject: Re: [SR-Users] q-value on unsupported clients

Yes

[dan-signature]

From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: Wednesday, November 4, 2015 3:36 AM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>>
Subject: Re: [SR-Users] q-value on unsupported clients

Hello,

do you want to add q value to Contact header on incoming REGISTER requests?

Cheers,
Daniel
On 04/11/15 08:06, Daniel W. Graham wrote:
I have a need to use q-value for serial forking but my clients don't support it. I need to specify unique q-value on all ports on the client device.

I explored using the User-Agent header and appending q-value, but this wouldn't help on multi-port clients.

Some things I have been thinking about are 'abusing' the authorization user or from user to somehow append q-value but this opens the door to other issues, and a database trigger however there would be no way to match this up to a record in another table as the usernames would be the same.

Any thoughts/ideas or methods others have used in situations like this?

-Dan




_______________________________________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--

Daniel-Constantin Mierla

http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Book: SIP Routing With Kamailio - http://www.asipto.com

Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151105/e7cfc31b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 5296 bytes
Desc: image001.gif
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151105/e7cfc31b/attachment.gif>


More information about the sr-users mailing list