Re: [Kamailio-Users] Users Digest, Vol 58, Issue 76
by Rothe, Marcus, D22-WHV
"users-request(a)lists.kamailio.org" <users-request(a)lists.kamailio.org>
schrieb:
Send Users mailing list submissions to
users(a)lists.kamailio.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-request(a)lists.kamailio.org
You can reach the person managing the list at
users-owner(a)lists.kamailio.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Users digest..."
Today's Topics:
1. Re: Odd Behaviour with Kamailio + TLS (Klaus Darilion)
2. Re: Registrar: Save modified contact / set the q value
(Daniel-Constantin Mierla)
3. Re: more type conversion wonders (Daniel-Constantin Mierla)
----------------------------------------------------------------------
Message: 1
Date: Wed, 31 Mar 2010 11:34:45 +0200
From: Klaus Darilion <klaus.mailinglists(a)pernau.at>
Subject: Re: [Kamailio-Users] Odd Behaviour with Kamailio + TLS
To: Hemanshu Patel <hemanshu.patel(a)saicare.com>
Cc: users(a)lists.kamailio.org
Message-ID: <4BB31735.6030500(a)pernau.at>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Am 31.03.2010 08:56, schrieb Hemanshu Patel:
>
> Hi all,
>
> I am not sure it is strange behavior or its the desirable one.
>
> i have got two phones registered via TLS to kamailio-1.5.X version.
>
> phone1: connected via ip1:port1 and having contact value ip1:port2
> phone2: connected via ip2:port3 and having contact value ip2:port4
>
> when i have just this two phones i can see 2 TCP connected to my
kamailio
> from both phones from ip1:port1 and ip2:port3.
>
> now when i call from phone1 to phone2, rather then using the already
> established and TLS authenticated connection kamailio creates two new
> connection from kamailio to ip1:port2 and ip2:port4.
> mean kamailio creates new connection to the contact value stored in
> location table of openser DB.
>
> Is this the desirable behavior? shouldn't kamailio use the alreay
> established connection?
This is the standard Kamailio behavior. Thus, you should apply NAT
traversal techniques to instruct Kamailio to reuse the established
connection.
In short: for each register call fix_nated_register(). For every other
request and response call fix_nated_contact().
Thus, if you use the default configuration and apply NAT traversal it
should work.
regards
klaus
------------------------------
Message: 2
Date: Wed, 31 Mar 2010 11:37:27 +0200
From: Daniel-Constantin Mierla <miconda(a)gmail.com>
Subject: Re: [Kamailio-Users] Registrar: Save modified contact / set
the q value
To: Ovidiu Sas <osas(a)voipembedded.com>
Cc: NeoTel Lists <MailingLists(a)neotel.at>, users(a)lists.kamailio.org
Message-ID: <4BB317D7.4030102(a)gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 3/30/10 8:29 PM, Ovidiu Sas wrote:
> If you need this in 1.5, try to fix the contact header and then
> forward the REGISTER back to yourself.
> The loopback REGISTER should have the fixed Contact header and now you
> can call save().
> You will need to tweak a a little bit the config to get everything
> right into the usrloc (the loopback REGISTER will come from the server
> IP) and it might work.
>
it works for no nat scenario, otherwise make sure you will get the
looped message on the same socket and you add before looping a header
with source ip and port (corresponding nat box pinhole) that you store
in received avp.
Cheers,
Daniel
> Regards,
> Ovidiu Sas
>
> On Tue, Mar 30, 2010 at 11:36 AM, NeoTel Lists<MailingLists(a)neotel.at>
wrote:
>
>> Hello Everybody!
>>
>> Is there any way to save(domain, 0x02) the contact after it has been
changed
>> somehow in Kamailio<= 1.5?
>> Do I have to upgrade to 3.0 and use msg_apply_changes() before save()?
>>
>> Or: Can I set the to be saved q value somehow?
>>
>> br
>> Walter
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users(a)lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users(a)lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
>
--
Daniel-Constantin Mierla * http://www.asipto.com/ *
http://twitter.com/miconda *
http://www.linkedin.com/in/danielconstantinmierla
------------------------------
Message: 3
Date: Wed, 31 Mar 2010 11:41:29 +0200
From: Daniel-Constantin Mierla <miconda(a)gmail.com>
Subject: Re: [Kamailio-Users] more type conversion wonders
To: Juha Heinanen <jh(a)tutpro.com>
Cc: users(a)lists.sip-router.org
Message-ID: <4BB318C9.1080302(a)gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 3/31/10 8:40 AM, Juha Heinanen wrote:
> i played a bit more with selects and found that statement
>
> if ($sht(auth=>foo::count)> @cfg_get.local.gw_timeout) {
> xlog("foo");
> }
>
I guess selects have types, while pseudo-variables are kind of type
agnostic. Any PV has a string representation of the value, comparison is
done as integer if both PVs are integers, otherwise is done as string.
The safe side is to use PV representation of selects when comparing with
another PV.
PV and selects is another point for the future coherence.
Cheers,
Daniel
> produces error
>
> 0(9213) :<core> [cfg.y:3379]: parse error in config file
/etc/sip-proxy/sip-proxy.cfg, line 507, column 28-55: bad expression: type
mismatch: str instead of int at (507,55)
>
> but the error goes away if i either make explicit conversion
>
> if ($sht(auth=>foo::count)> (int)(a)cfg_get.local.gw_timeout) {
> xlog("foo");
> }
>
> or use $sel
>
> if ($sht(auth=>foo::count)> $sel(cfg_get.local.gw_timeout)) {
> xlog("foo");
> }
>
> this is thus exactly opposite than in my t_set_fr ordeal where i got
> conversion error when i used $sel instead of @.
>
> in my opinion, no (int) conversion should be needed in the firs case,
> because the value of the cfg variable is int.
>
> in summary, writing statements that include selects is very difficult
> and error prone.
>
> -- juha
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users(a)lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
>
--
Daniel-Constantin Mierla * http://www.asipto.com/ *
http://twitter.com/miconda *
http://www.linkedin.com/in/danielconstantinmierla
------------------------------
_______________________________________________
Users mailing list
Users(a)lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
End of Users Digest, Vol 58, Issue 76
*************************************