Re: [SR-Users] dlg_set_timeout bye to websockets client

2017-02-08 Thread Switch168
Correct I just have to make sure that set_contact_alias is used in the
initial dialog.
I was doing the the NAT fixes after the initial dialog.

On Tue, Feb 7, 2017 at 11:23 PM, Daniel-Constantin Mierla  wrote:

> Hello,
>
> ok, so it was the missing of set_contact_alias(), right?
>
> Cheers,
> Daniel
>
> On 29/01/2017 19:21, Switch168 wrote:
>
> Hi Daniel,
>
>
> For anyone else who might run into this issue I found
> https://github.com/kamailio/kamailio/issues/85 to be related to mine. And
> its a good a starting point.
>
> Cheers
> Andrew
>
>
>
>
> On Fri, Jan 27, 2017 at 10:47 AM Switch168  wrote:
>
>> HI Daniel,
>>
>> modparam("dialog", "dlg_flag", 4) modparam("dialog", "send_bye", 1)
>> modparam("dialog", "timeout_noreset", 1)
>> So regular bye's by useragent i can succesfully relay to this
>> 
>> style of uri by using this snippet below
>> # Handle requests within SIP dialogs
>> route[WITHINDLG] {
>>   if(is_method("BYE")) {
>> xlog("DEBUG: Received BYE");
>> route(NATDETECT);
>> loose_route();
>> dlg_manage();
>> t_check_trans();
>> handle_ruri_alias();
>> rtpengine_delete();
>> route(RELAY);
>> exit;
>>   }
>> ...
>> But the byes that are sent out by dlg_set_timeout("$var(timer)") gives
>> out error cannot resolve
>> the random.uri and I don't know how to fix the bye before it get sent out.
>> Thanks
>> Andrew
>>
>> On Fri, Jan 27, 2017 at 12:15 AM, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>> Hello,
>>
>> isn't the dialog module setting the right value there? What function are
>> you using to update the contact?
>>
>> Cheers,
>> Daniel
>>
>> On 27/01/2017 06:01, Andrew Tan wrote:
>>
>> Hello,
>>
>> Just wondering if it's possible to intercept the bye message that
>> dlg_set_timeout sends out to do some nat_helper function to fix it so the
>> bye can be sent to random.invalid uris.
>>
>> I know there is the edge proxy outbound module but wondering if I can do
>> it without.
>>
>> Regular bye between 2 clients i was able intercept and fix with nat
>> helper but I dont know how to fix the byes that is sent out from
>> dlg_set_timeout function.
>>
>> Thanks in advance!
>> Andrew
>>
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlawww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
>> www.asipto.com
>> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio with cassandra

2017-02-08 Thread Никитенко Виталий
Hi.
>> Can you provide more details for what you need it,maybe we can provide some 
>> hints?
I want to store the data of registered users (location) in the database 
cassandra (it would be great also dialog stored in cassandra). 
>>Can you provide access to a test system/vm where to try to fix it
Yes, I can it, will prepare today the VM for access to public network and send 
to email data access.

Thanks for the help.


> Hello,
>
> unfortunately the module was not maintained for a while. Can you provide
> access to a test system/vm where to try to fix it, because I don't use
> it and have no platform where to test?
>
> There is another module, ndb_cassandra, depending of what you want to
> do, it might help. Can you provide more details for what you need it,
> maybe we can provide some hints?
>
> Cheers,
> Daniel
>
> On 07/02/2017 10:55, Никитенко Виталий wrote:
>>  Hi!
>>  I want start kamailio with db_cassandra. do as it written in 
>> https://www.kamailio.org/docs/modules/4.2.x/modules/db_cassandra.html. Then 
>> trying kamctl start, failed with error "table version does not exist!".
>>  From CQLSH table is view
>>  cqlsh:kamailio> Describe tables;
>>  version location
>>
>>  cqlsh:kamailio> select * from version;
>>   table_name | table_version
>>  +---
>>  version | 1
>>
>>  Tell me please wherein may be trouble? Full log below
>>
>>  ERROR: db_cassandra [dbcassa_table.c:592]: dbcassa_read_table_schemas(): 
>> Full dir name= /usr/local/etc/kamailio/cassandra/location
>>  ERROR: db_cassandra [dbcassa_table.c:592]: dbcassa_read_table_schemas(): 
>> Full dir name= /usr/local/etc/kamailio/cassandra/version
>>  INFO: rr [../outbound/api.h:54]: ob_load_api(): Failed to import bind_ob
>>  INFO: rr [rr_mod.c:160]: mod_init(): outbound module not available
>>  INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 1024
>>  INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count 
>> (nc_enabled) support disabled
>>  INFO: permissions [parse_config.c:251]: parse_config_file(): file not 
>> found: /usr/local/etc/kamailio//permissions.allow
>>  INFO: permissions [permissions.c:608]: mod_init(): default allow file 
>> (/usr/local/etc/kamailio//permissions.allow) not found => empty rule set
>>  INFO: permissions [parse_config.c:251]: parse_config_file(): file not 
>> found: /usr/local/etc/kamailio//permissions.deny
>>  INFO: permissions [permissions.c:617]: mod_init(): default deny file 
>> (/usr/local/etc/kamailio//permissions.deny) not found => empty rule set
>>  INFO: misc_radius [misc_radius.c:164]: mod_init(): initializing...
>>  ERROR: db_cassandra [dbcassa_base.cpp:449]: cassa_translate_query(): table 
>> version does not exist!
>>  ERROR: db_cassandra [dbcassa_base.cpp:962]: db_cassa_query(): Failed to 
>> query Cassandra cluster
>>  ERROR:  [db.c:401]: db_table_version(): error in db_query
>>  ERROR:  [db.c:440]: db_check_table_version(): querying version for 
>> table location
>>  ERROR: usrloc [dlist.c:640]: register_udomain(): error during table version 
>> check.
>>  ERROR: registrar [reg_mod.c:554]: domain_fixup(): failed to register domain
>>  ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
>> cfg:/usr/local/etc/kamailio//kamailio.cfg:982
>>  ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
>> cfg:/usr/local/etc/kamailio//kamailio.cfg:987
>>  ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
>> cfg:/usr/local/etc/kamailio//kamailio.cfg:992
>>
>>  ___
>>  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>  sr-users@lists.sip-router.org
>>  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
> --

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] nathelper module fix_nated_register(); question

2017-02-08 Thread Alex Balashov
That is accurate. The external IP info ends up in the received
column/attribute.

On Wed, Feb 08, 2017 at 01:33:56PM -0600, JR Richardson wrote:

> Hi All,
> 
> Just confirming when using nathelper, the fix_nated_register function
> is only used to write corrected contact into to $avp then to database,
> this function does not actually change the contact in the SIP message
> when passing through the proxy, correct?
> 
> fix_nated_contact is used to actually change the SIP message contact
> when passing through the proxy. I'm using kamailio 4.2.
> 
> Thanks.
> 
> JR
> -- 
> JR Richardson
> Engineering for the Masses
> Chasing the Azeotrope
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 (direct) / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] nathelper module fix_nated_register(); question

2017-02-08 Thread JR Richardson
Hi All,

Just confirming when using nathelper, the fix_nated_register function
is only used to write corrected contact into to $avp then to database,
this function does not actually change the contact in the SIP message
when passing through the proxy, correct?

fix_nated_contact is used to actually change the SIP message contact
when passing through the proxy. I'm using kamailio 4.2.

Thanks.

JR
-- 
JR Richardson
Engineering for the Masses
Chasing the Azeotrope

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Change Priority of Dispatcher

2017-02-08 Thread Rodrigo Moreira
Hello,

Help me with a question. Is it possible to change the prohirity of a
Kamailio Dispatcher target at run time, without changing the destination
entry in the database?

If so, which module should I use?
Have you some link for support?

Thank you very much.
-- 
Rodrigo M.
(37) 9132-4539
(34) 9889-3069
rodrigo.moreira2007
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] LCR module HowTo (Spanish)

2017-02-08 Thread Campus VoToVoice

Hello,

My small contribution to Kamailio's documentation:

https://www.voztovoice.org/?q=node/1491

If you find any error, please write me.

Regards

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN

2017-02-08 Thread Daniel Tryba
On Wed, Feb 08, 2017 at 12:28:36PM +0200, Arsen wrote:
> I am not sure that nat_uac_test can determine type of NAT device.
> and why you need all these checks if you always use rtpproxy? (another q
> from 2013 :)

The answer is: you don't have to.
 
> The idea is to reduce using of rtpproxy for better scalability and voice
> quality. If we can beat all types of NAT with a near-end NAT traversal,
> except symmetric NAT why do we always use proxy option in case if NAT is
> detected.

Near End NAT traversal relies on support and configuration of clients,
something I have no control over. It simply fails to often, either due
to misconfiguration, simple lack of support, a buggy implementation or
something else not in my control.

Far End NAT just works (tm). Can't speak for rtpproxy, but rtpengine
scales just fine. Only positive I can think of is that you might keep
some audio outside of your network.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN

2017-02-08 Thread Arsen
Hi Daniel,

I am not sure that nat_uac_test can determine type of NAT device.
and why you need all these checks if you always use rtpproxy? (another q
from 2013 :)

The idea is to reduce using of rtpproxy for better scalability and voice
quality. If we can beat all types of NAT with a near-end NAT traversal,
except symmetric NAT why do we always use proxy option in case if NAT is
detected.

On Wed, Feb 8, 2017 at 12:01 PM, Daniel Tryba  wrote:

> On Wed, Feb 08, 2017 at 01:12:05AM -0700, Arsen Semionov wrote:
> > good question from 2013 :)
> > Maybe someone has experience and can confirm this?
>
> The answer to the 2013 question is: if you can depend on this (I have
> never seen it) you can script kamailio to make use of it.
>
> > My main question: is it possible to determine when it's required to use
> RTP
> > proxy ? In other words can we know that the client is behind symmetric
> NAT
> > device or we just use rtpproxy as a silver bullet?
>
> The "default" config has rtpproxy on detected NAT as an example. But
> personally I go for the always proxy option, it never failed so far
> (except for misconfigured client side firewalls that wouldn't have
> permitted p2p rtp anyway but now can easily fixed by permitting the
> traffic from the rtp range of udp ports from the rtpengine/proxy
> servers).
>
> NAT detect example below (so take a look at nat_uac_test to see what
> kind of tests there are):
>
> route[NATDETECT] {
> #!ifdef WITH_NAT
> force_rport();
> if (nat_uac_test("19")) {
> if (is_method("REGISTER")) {
> fix_nated_register();
> } else {
> if(is_first_hop())
> set_contact_alias();
> }
> setflag(FLT_NATS);
> }
> #!endif
> return;
> }
>
>
> route[NATMANAGE] {
> #!ifdef WITH_NAT
> if (is_request()) {
> if(has_totag()) {
> if(check_route_param("nat=yes")) {
> setbflag(FLB_NATB);
> }
> }
> }
> if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
> return;
>
> rtpproxy_manage("co");
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>



-- 
Regards,
Arsen.
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN

2017-02-08 Thread Daniel Tryba
On Wed, Feb 08, 2017 at 01:12:05AM -0700, Arsen Semionov wrote:
> good question from 2013 :)
> Maybe someone has experience and can confirm this?

The answer to the 2013 question is: if you can depend on this (I have
never seen it) you can script kamailio to make use of it.
 
> My main question: is it possible to determine when it's required to use RTP
> proxy ? In other words can we know that the client is behind symmetric NAT
> device or we just use rtpproxy as a silver bullet?

The "default" config has rtpproxy on detected NAT as an example. But
personally I go for the always proxy option, it never failed so far
(except for misconfigured client side firewalls that wouldn't have
permitted p2p rtp anyway but now can easily fixed by permitting the
traffic from the rtp range of udp ports from the rtpengine/proxy
servers).

NAT detect example below (so take a look at nat_uac_test to see what
kind of tests there are):

route[NATDETECT] {
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("19")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
if(is_first_hop())
set_contact_alias();
}
setflag(FLT_NATS);
}
#!endif
return;
}


route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;

rtpproxy_manage("co");


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] MSRP with Kamailio

2017-02-08 Thread Olli Attila

Hello,

The challenge with Blink (v3.0.0) is that it seems I can't define any 
additional credentials regarding the MSRP connection. I assumed Blink
would use the SIP credentials for MSRP connection but it seems I was 
wrong. This would explain the Kamailio behaviour on not authenticating 
the client.


Are there any other clients that support MSRP which I could use with 
Kamailio? Anyone?


Cheers,

--Olli


Daniel-Constantin Mierla kirjoitti 2017-02-08 8:49:

Hello,

in the logs it doesn't show any specific error, just that kamailio is
sending a 401 challenge for authentication, which should be ok from
standards point of view. But then I don't see the AUTH request with
credentials. Have you set username/password for auth in client side?

Cheers,
Daniel


On 07/02/2017 21:56, Olli Attila wrote:

Hello,

I configured the Kamailio debug level to "4" and then got the
following errors when trying to establish an msrp session:
https://p.dnaip.fi/YRcPRcYD

(Switched to plain tcp before the debug trace)

--Olli

On 7.2.2017 14:49, Daniel-Constantin Mierla wrote:

Hello,

can you run with debug=3 in kamailio.cfg and provide all syslog 
messages

for the issues you face?

Cheers,
Daniel


On 07/02/2017 12:16, Olli Attila wrote:

Hello,

I am running kamailio version 4.4.2. I just configured MSRP module 
to

kamailio with example config taken from
"http://www.kamailio.org/docs/modules/4.4.x/modules/msrp.html#msrp.usage;

(Example 1.16. Event Route (using htable for MSRP connection
tracking). After configuring msrp relay, the kamailio service has 
been

restarted succesfully and no errors occurred.

Blink is configured to use my server name with tls and port 5061 for
MSRP.

I get this error on Blink when i try to send files:
https://p.dnaip.fi/X4vwoy40

Any suggestion what is going wrong?

Cheers,

-- Olli


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

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




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] python_exec and parameters

2017-02-08 Thread gmele
Hello,

in our Kamailio, we are using python_exec to execute script used to send
push notifications to Google or Apple.

Currenty, the method we call only accepts the message as parameter. We then
extract from the message the Call Id, to URI and from URI. 

Here is the python method signature:

*def SendPushNotification(self, msg)*

To extract the toUri and fromUri (and remove the sip:), we use python regex
: 

*uriPattern=re.compile(".*sips?:(.+@[^>;]+)")*

This is working well 99% of the time, except sometimes (we don't know why)
where we get the error:

*logger_LM_ERR(): Exception occurred: Traceback (most recent call last):
File "mypythonExample.py", line XXX, in SendPushNotification
requestUri = self.ExtractURIFromHeader(msg.getHeader("to"))
File "mypythonExample.py", line XXX, in ExtractURIFromHeader
m= self.uriPattern.match(header);
TypeError: an integer is required*

We tried to analyze the cause of this error, but we didn't find any problem
with the message itself (the message is complete, with the *to *and *from
*correctly filled).

So, to avoid using the python regex, we have decided to pass parameters to
the python script (callId, from and to URI):

*def SendPushRequest(self, msg, fromUri, toUri, callid)*

But it seems python_exec doesn't support more than 2 parameters ($mb and
another one). Is this exact? If this is the case, how can we pass several
parameters from kamailio.cfg? 

Thx for your help.

Regards

Giovanni





--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/python-exec-and-parameters-tp155803.html
Sent from the Users mailing list archive at Nabble.com.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN

2017-02-08 Thread Arsen Semionov
Hi guys!

good question from 2013 :)
Maybe someone has experience and can confirm this?

My main question: is it possible to determine when it's required to use RTP
proxy ? In other words can we know that the client is behind symmetric NAT
device or we just use rtpproxy as a silver bullet?

Thanks!
Arsen.


Khoa Pham wrote
> Hi all,
> 
> When using STUN, I can detect my NAT type. The SDP contain x-NAT field (0:
> unknown, 1: full cone, ..., 6: symmetric) which tells Kamailio the NAT
> type
> of clients. Why doesn't Kamailio use that ?
> 
> -- 
> Khoa Pham
> HCMC University of Science
> Faculty of Information Technology





-
Arsen Semionov
Eurolan VoIP Solutions
Tel: +442035198881
--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/Cannot-hear-voice-with-symmetric-NAT-and-STUN-tp115922p155802.html
Sent from the Users mailing list archive at Nabble.com.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users