[SR-Users] sip response not handled by kamailio

2014-10-24 Thread Marko Seidenglanz
Hello,

We are trying to use Kamailio 4.2 with RTPEngine 3.3 behind NAT.

Somehow SIP responses (200 OK) are not handled by Kamailio.



The following INVITE is send to the receiving end (WebRTC Client):

INVITE sip:evqzk4l62mdf3g7u6e...@whtest3.24dial.com SIP/2.0
Record-Route: 
Via: SIP/2.0/UDP 104.155.11.255:5060
;branch=z9hG4bK865.9db0c023bec2f314e89ae0f18b78d2f0.0
Via: SIP/2.0/UDP 10.240.215.73:5060
;rport=5060;received=146.148.113.245;branch=z9hG4bK644600e2
Max-Forwards: 69
From: "Anonymous" ;tag=as68f0a26a
To: 
Contact: 
Call-ID: 368f6ec901a3552e3b37a70907634f4f@10.240.215.73:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 12.5.0
Date: Fri, 24 Oct 2014 08:38:09 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 738
P-hint: outbound
...


The client response looks like this:

SIP/2.0 200 OK
Via: SIP/2.0/UDP 104.155.11.255:5060
;branch=z9hG4bK865.9db0c023bec2f314e89ae0f18b78d2f0.0;rport=5060;received=104.155.11.255
 , SIP/2.0/UDP 10.240.215.73:5060
;rport=5060;received=146.148.113.245;branch=z9hG4bK644600e2
From: "Anonymous" ;tag=as68f0a26a
To:  ;tag=E2VMB39U5NYHCXLZREFGQV2DAXPCZXNQ6J6P
Contact:  ;tag=E2VMB39U5NYHCXLZREFGQV2DAXPCZXNQ6J6P
Call-ID: 368f6ec901a3552e3b37a70907634f4f@10.240.215.73:5060
CSeq: 102 INVITE
Record-Route: 
Content-Type: application/sdp
Content-Length: 938
...



I have a xlog call as the first statement in kamailio routing script. I can
see the request, which get's handled correctly but the response does not
appear in kamailio log, though it arrives at the machine.

I am totally helpless, what might be wrong. If we use kamailio on a public
accessable machine everything works as expected.


Maybe anyone might have had similiar problems using kamailio behind NAT.


Kind regards,
Marko
___
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] Problem initiating a call with dlg_bridge

2014-10-24 Thread Paul Smith
Thank you for the reply Daniel.  I have enabled debug=3 and put in a few more 
xlog lines.  I can see the REFER coming in on local interface 127.0.0.1.  I am 
now trying to narrow down the issue in the kamailio.cfg.

My conclusions so far are:
1) The REFER packet has a problem which causes it to fail sanity_check()
2) sanity_check returns 0=exit rather than -1 = error.


I have 2 snom phones registered to the kamailio server over NAT and can make 
calls between them.

The REFER is failing in the REQINIT route block. The script stops there.  


Kamailio.cfg : I started again with default 4.2 and kamailio.cfg as shipped 
enabled MYSQL, USRLOCDB, inserted dialog module, replaced rtpproxy with 
rtpengine.

#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_NAT

amended REQINIT as follows.  I see log lines for “going to sanity check” but 
neither “Malformed” or “returning” line are reached.
...
if (is_method("REFER")) {xlog("L_INFO","REFER going to sanity 
check\n");}

if(!sanity_check("1511", "7")) {
xlog("L_INFO","Malformed SIP message from $si:$sp\n");
exit;
}

if (is_method("REFER")) {xlog("L_INFO","REFER returning OK from sanity 
check");}

...


Then run from the command line:
 kamcmd dlg.bridge_dlg sip:105@MYPUBLICIP sip:106@MYPUBLICIP sip:MYPUBLICIP:5060

Kamailio Output:

2(32566) DEBUG:  [parser/msg_parser.c:623]: parse_msg(): SIP Request:
 2(32566) DEBUG:  [parser/msg_parser.c:625]: parse_msg():  method:  

 2(32566) DEBUG:  [parser/msg_parser.c:627]: parse_msg():  uri: 

 2(32566) DEBUG:  [parser/msg_parser.c:629]: parse_msg():  version: 

 2(32566) DEBUG:  [parser/parse_via.c:1284]: parse_via_param(): Found 
param type 232,  = ; 
state=16
 2(32566) DEBUG:  [parser/parse_via.c:2672]: parse_via(): end of header 
reached, state=5
 2(32566) DEBUG:  [parser/msg_parser.c:513]: parse_headers(): 
parse_headers: Via found, flags=2
 2(32566) DEBUG:  [parser/msg_parser.c:515]: parse_headers(): 
parse_headers: this is the first via
 2(32566) DEBUG:  [receive.c:154]: receive_msg(): After parse_msg...
 2(32566) DEBUG:  [receive.c:197]: receive_msg(): preparing to run 
routing scripts...
 2(32566) INFO: 

[SR-Users] Crash after async_sleep().

2014-10-24 Thread Vitaliy Aleksandrov

Hello list.

root@proxy:/# kamcmd core.version
kamailio 4.1.4 (i386/linux)

I'm getting a crash when I'm trying to simulate a ringing UAS from 
kamailio config.

To achieve this I've added the next config actions:


if (is_method("INVITE") && !has_totag() && $rU =~ "^999") {
sl_send_reply("100", "Fake Trying");
sl_send_reply("180", "Fake Ringing");

t_set_fr(12, 12);
t_set_retr(65000, 65000);
t_set_auto_inv_100(0);

async_sleep("60");
send_reply("480", "Fake Temporary Unavailable");

t_release(); #<---

exit();
};
I expect to receive 180 reply immediately and 480 after 60 seconds. The 
problem appears when a caller cancels a call after 60 seconds which is 
equal to async_sleep() wait time.
I suppose there is a race condition happens between UDP worker that 
processes CANCEL request and timer process which calls t_continue() 
(tm's function). Calling t_newtran() explicitly doesn't change the 
situation. The only way I found to avoid crash is to remove t_release() 
call. In this case kamailio complains that "script write didn't release 
transaction" but continues to process new calls.


With -DTIMER_DEBUG and -DDBG_QM_MALLOC I got next information:
/usr/sbin/kamailio[11307]: :  [mem/q_malloc.c:468]: qm_free(): 
BUG: qm_free: freeing already freed pointer (0xb1d8c520), called from 
tm: h_table.c: free_cell(178), first free tm: h_table.c: free_cell(157) 
- aborting


Crash mostly happens because of broken circular list of timers 
(timer_ln->next == NULL), but one time I saw got abort() during CANCEL 
request processing when tm tried to call free_cell() for an already 
freed pointer.



___
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] Problem initiating a call with dlg_bridge

2014-10-24 Thread Paul Smith
I added a log line to the top of kamailio.cfg request_route block to grab the 
message buffer of the REFER.  I also put a condition around the sanity_check to 
skip it for method=REFER … 

I got the following output for $mb at the start of request_route for the REFER 
packet (I have substituted MYPUBLICIP for my ip address)

2(341) INFO: 

Re: [SR-Users] RPC uac.reg_info hangs second time

2014-10-24 Thread Dan Christian Bogos

Hey Daniel,

Thanks for your fast reply!

I am using the 4.2.0 out of debian packages (not nightly). Will shift on 
nightly and retest.


Not a big deal regarding 150 seconds, maybe it should be a good reason 
for async reloads (reply with the delay number of seconds when reload 
will happen). Reloads can be always implemented outside of kamailio but 
since everybody would need it I assume a more centralized approach would 
be useful.


Anyway, thanks again!
DanB

On 24.10.2014 12:00, sr-users-requ...@lists.sip-router.org wrote:

Hello,

are you using branch 4.2 or some tgz/package from 4.2.0 release? There
was a fix related to such issue, so 4.2 branch must be used (or debian
nightly builds for 4.2).

I will have to check the code how flexible that is, but afaik, the limit
on reload interval was thought to avoid sending again registration
requests while retransmissions from previous one can occur.

Cheers,
Danel



___
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] sip response not handled by kamailio

2014-10-24 Thread Camille Oudot
Le Fri, 24 Oct 2014 10:51:57 +0200,
Marko Seidenglanz  a écrit :

> I have a xlog call as the first statement in kamailio routing script.
> I can see the request, which get's handled correctly but the response
> does not appear in kamailio log, though it arrives at the machine.

Hi Marko,

the SIP replies don't fall into the same routing block as the requests.
You have to declare an explicit onreply_route to be able to catch
replies and do something with them, like logging for example. See
http://www.kamailio.org/wiki/cookbooks/4.2.x/core#onreply_route for
details.

Cheers,

-- 
Camille

___
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 Infront of Asterisk with remote PBX

2014-10-24 Thread Daniel Tryba
On Thursday 23 October 2014 19:16:58 Kenny Watson wrote:
> What I need to figure out is how to on kamailo maybe using a dial prefix
> specify that the call is going to a remote extension on a "user" and
> rewrite the to header to be extension@useripaddress rather than
> user@useripaddress.

I think your "problem" can be summarized as:

initial trunk invite: INVITE sip:number@kamailio
in kamailio $rU is number, but after a successful location lookup 
(lookup("location")/alias_db_lookup) $rU is the username from subscribers or 
dbaliases. Without further processing the invite to asterisk would look like:
INVITE sip:username@asterisk

The solution I use is simple:
-before lookup I store the initial $rU in an avp(callednumber).
-lookup
-check in usr_preferences wether the endpoint wants DID or should be addressed 
with its username (true/false)
-if true: $rU=$avp(callednumber)
-t_relay()

-- 

POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/   - http://www.sipo.nl/
K.v.K. Eindhoven 17097024

___
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] Problem initiating a call with dlg_bridge

2014-10-24 Thread Daniel-Constantin Mierla
I don't recall any change to this part for 4.2 and I am using dlg_bridge
with 4.1 (no time to upgrade that box yet) -- but apparently there is a
bug building the REFER. There were few changes on how From/To are built
locally, but they are ok.

I am traveling at Astricon, but with first occasion I will check it.

Cheers,
Daniel

On 24/10/14 12:07, Paul Smith wrote:
> I added a log line to the top of kamailio.cfg request_route block to
> grab the message buffer of the REFER.  I also put a condition around
> the sanity_check to skip it for method=REFER … 
>
> I got the following output for $mb at the start of request_route for
> the REFER packet (I have substituted MYPUBLICIP for my ip address)
>
> 2(341) INFO: 

Re: [SR-Users] Crash after async_sleep().

2014-10-24 Thread Daniel-Constantin Mierla
Hello,

async_sleep() has some limitations internally (I think there are some
notes about in readme), as the next actions are executed in a different
process, thus the context is not the same as before the function. It
should not crash, so I look over it.

Can you try async_route() instead? Just move what is after async_sleep()
in a route block.

Cheers,
Daniel

On 24/10/14 11:54, Vitaliy Aleksandrov wrote:
> Hello list.
>
> root@proxy:/# kamcmd core.version
> kamailio 4.1.4 (i386/linux)
>
> I'm getting a crash when I'm trying to simulate a ringing UAS from
> kamailio config.
> To achieve this I've added the next config actions:
>
>> if (is_method("INVITE") && !has_totag() && $rU =~ "^999") {
>> sl_send_reply("100", "Fake Trying");
>> sl_send_reply("180", "Fake Ringing");
>>
>> t_set_fr(12, 12);
>> t_set_retr(65000, 65000);
>> t_set_auto_inv_100(0);
>>
>> async_sleep("60");
>> send_reply("480", "Fake Temporary Unavailable");
>>
>> t_release(); #<---
>>
>> exit();
>> };
> I expect to receive 180 reply immediately and 480 after 60 seconds.
> The problem appears when a caller cancels a call after 60 seconds
> which is equal to async_sleep() wait time.
> I suppose there is a race condition happens between UDP worker that
> processes CANCEL request and timer process which calls t_continue()
> (tm's function). Calling t_newtran() explicitly doesn't change the
> situation. The only way I found to avoid crash is to remove
> t_release() call. In this case kamailio complains that "script write
> didn't release transaction" but continues to process new calls.
>
> With -DTIMER_DEBUG and -DDBG_QM_MALLOC I got next information:
> /usr/sbin/kamailio[11307]: :  [mem/q_malloc.c:468]: qm_free():
> BUG: qm_free: freeing already freed pointer (0xb1d8c520), called from
> tm: h_table.c: free_cell(178), first free tm: h_table.c:
> free_cell(157) - aborting
>
> Crash mostly happens because of broken circular list of timers
> (timer_ln->next == NULL), but one time I saw got abort() during CANCEL
> request processing when tm tried to call free_cell() for an already
> freed pointer.
>
>
> ___
> 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
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


___
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] async workers causing unexplained high load average

2014-10-24 Thread Daniel-Constantin Mierla
Can you attach with gdb to one of the async processes and see with the
backtrace command what is the process doing at that time?

Cheers,
Daniel

On 24/10/14 05:30, Alex Balashov wrote:
> I just tested the same thing on a Rackspace VPS (Xen I think) and am
> seeing the same climbing load average with 2 async workers. It seems
> to top out at 1.05.
>
> On 10/23/2014 02:13 PM, Alex Balashov wrote:
>
>> Another thing I have found is that having a certain amount of async
>> workers running, even if they are not doing anything, appears to cause
>> unexplained CPU load, even if the Kamailio instance is completely idle
>> and not processing any calls.
>>
>> Here is the baseline load with no async workers:
>>
>> [root@centosity6 ~]# uptime
>>   14:06:28 up 2 min,  2 users,  load average: 0.01, 0.00, 0.00
>>
>> If I start Kamailio with 1 async worker...
>>
>> modparam("async", "workers", 1)
>> async_workers=1
>>
>>   14:07:59 up 3 min,  2 users,  load average: 0.00, 0.00, 0.00
>>
>> Still nothing.
>>
>> Now I try 2:
>>
>>   14:08:54 up 4 min,  2 users,  load average: 0.45, 0.11, 0.04
>>   14:08:59 up 4 min,  2 users,  load average: 0.49, 0.12, 0.04
>>   14:09:04 up 4 min,  2 users,  load average: 0.53, 0.14, 0.04
>>   14:09:09 up 4 min,  2 users,  load average: 0.57, 0.15, 0.05
>>   14:09:14 up 5 min,  2 users,  load average: 0.60, 0.17, 0.05
>>   14:09:19 up 5 min,  2 users,  load average: 0.63, 0.18, 0.06
>>   14:09:31 up 5 min,  2 users,  load average: 0.69, 0.21, 0.07
>>   14:09:37 up 5 min,  2 users,  load average: 0.71, 0.22, 0.07
>>   14:10:35 up 6 min,  2 users,  load average: 0.89, 0.36, 0.13
>>   14:11:07 up 6 min,  2 users,  load average: 0.93, 0.42, 0.16
>>   ...
>>
>> I don't have time right now to see if it will rise to infinity, but it
>> just keeps going up.
>>
>> There are no SIP messages being received at all, and there is absolutely
>> nothing going on.
>>
>> The ascent of the load average is much higher with >= 4 threads. I have
>> 8 "CPUs" available from /proc/cpuinfo (quad-core processor with
>> HyperThreading).
>>
>> When I attach strace to the PID of the Async Worker, there's nothing
>> going on except the normal recvfrom() blocking wait:
>>
>> [root@centosity6 kamailio]# kamctl ps | grep Async
>> which: no greadlink in
>> (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/)
>>
>> Process::  ID=11 PID=1559 Type=Async Task Worker
>> Process::  ID=12 PID=1560 Type=Async Task Worker
>>
>> [root@centosity6 kamailio]# strace -p 1559
>> Process 1559 attached - interrupt to quit
>> recvfrom(9,
>>
>> [root@centosity6 ~]# strace -p 1560
>> Process 1560 attached - interrupt to quit
>> recvfrom(9,
>>
>> Nor do the other Kamailio threads seem to be doing anything unusual. 'ps
>> aux' and 'top' show 0.0% CPU load on the Kamailio processes themselves,
>> and 'iowait' shows the system as 98-99% idle.
>>
>> I suppose it's possible that this is a peculiarity of the testing
>> environment: I am running this on CentOS 6.5 inside VirtualBox, which I
>> think is KVM-based. I have not had a chance to duplicate this experiment
>> in a different kind of execution environment yet. It's possible that the
>> load average is simply being improperly indicated because of the VM
>> environment.
>>
>>
>
>

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


___
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] async workers

2014-10-24 Thread Daniel-Constantin Mierla
Hello,

On 23/10/14 03:36, Alex Balashov wrote:
> Hi,
>
> What is the practical limit to the number of async worker processes?
>
> With SIP child processes, it seems to be about the number of available
> CPUs in /proc/cpuinfo. After that--at least, per my testing--one
> begins to hit the point of diminishing returns, presumably due to SHM
> IPC and synchronisation issues.
>
> Is the restriction similar in the async execution context?
no specific restriction. Also, I haven't seen any degradation when using
more sip worker processes that cpus, which I do have always (at least 2
per CPU), because a worker can do quite a lot of I/O.

Cheers,
Daniel

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


___
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] async workers

2014-10-24 Thread Alex Balashov

On 10/24/2014 09:07 AM, Daniel-Constantin Mierla wrote:

Hello,

On 23/10/14 03:36, Alex Balashov wrote:

Hi,

What is the practical limit to the number of async worker processes?

With SIP child processes, it seems to be about the number of available
CPUs in /proc/cpuinfo. After that--at least, per my testing--one
begins to hit the point of diminishing returns, presumably due to SHM
IPC and synchronisation issues.

Is the restriction similar in the async execution context?

no specific restriction. Also, I haven't seen any degradation when using
more sip worker processes that cpus, which I do have always (at least 2
per CPU), because a worker can do quite a lot of I/O.


I have seen such degradation, at least in my VM testing environment. I 
find that I get the highest CPS (e.g. with sipp) with the smallest 
number of workers.


Actually, I get as good throughput with 4 workers (in an 8 "CPU" 
scenario on a quad-core processor) as I do with 8! Increasing beyond 8 
leads to diminishing returns.


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
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] async workers

2014-10-24 Thread Daniel-Constantin Mierla

On 23/10/14 04:03, Alex Balashov wrote:
> Also, what is the point of core async_workers setting versus the
> 'workers' modparam to async? Are they supposed to equal each other?
> Does one override the other?

async_workers from core are common for all modules, being a decision not
to have each module that wants async operations to create its own pool
of processes. The workers defined by async module are only for that
module and used only by async_route() and async_sleep().

The implementation is also different, the async module workers are more
like timer processes (because both of async_route() and async_sleep()
need to sleep some interval of time). The module itself keeps the lists
of tasks in a structure optimized for timer execution. Each of this
async module workers check from time to time to see if there is a task
to be executed, executes what matches the time, then sleeps again for
100ms (iirc), then checks again...

The async_workers from core were designed to receive the job
immediately. Because of that, there is an interprocess communication
based on sockets in memory. The async workers are listening on them, so
once a sip worker sends the task to them, an async worker will receive it.

Hopefully I was able to explain it enough to understand what happens behind.

Cheers,
Daniel
>
> On 10/22/2014 09:36 PM, Alex Balashov wrote:
>
>> Hi,
>>
>> What is the practical limit to the number of async worker processes?
>>
>> With SIP child processes, it seems to be about the number of available
>> CPUs in /proc/cpuinfo. After that--at least, per my testing--one begins
>> to hit the point of diminishing returns, presumably due to SHM IPC and
>> synchronisation issues.
>>
>> Is the restriction similar in the async execution context?
>>
>
>

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


___
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] Converting JSON string to normal string

2014-10-24 Thread Daniel-Constantin Mierla
Hello,

no transformation to "unquote", at this time probably chaining s.strip
and s.striptail would be an option.

Adding transformations to "quote" and "unquote" can be useful indeed if
json operation returns the full value.

Cheers,
Daniel

On 23/10/14 21:02, Muhammad Shahzad wrote:
> Hi,
>
> Using method json_get_field i am able to extract json string. However,
> this string comes with quotes which cause a hurdle in assigning to
> various pseudo variables, for example,
>
> --
> json_get_field($redis(r=>value), "to_number",  
> "$var(wim_to)");
> json_get_field($redis(r=>value), "domain", 
> "$var(wim_domain)");
>
> $uac_req(ruri)="sip:" + $var(wim_to) + "@" + $var(wim_domain);
> --
>
> This results in $uac_req(ruri) being set as.
>
> sip:"49"@"sip.mydomain.com "
>
> Which is obviously wrong and fails the transaction processing.
>
> Is there any way to get rid of these quotes from json strings? One
> possible way i can think of is using string transformation "s.substr",
> but there are a lot of json strings i have in config and it is too
> hectic to transform all of them. Is there any easier way out of this?
>
> Thank you.
>
>
>
>
> ___
> 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
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
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] sip response not handled by kamailio

2014-10-24 Thread Marko Seidenglanz
Hello Camille,

thank you for your fast response.




I have defined a reply route:

onreply_route[REPLY_FROM_WEBRTC] {
xlog("L_DEBUG", "<<<
SIP WEBRTC_REPLY: $si:$sp --> $du ");
xlog("L_DEBUG", "WEBRTC 
KAMAILIO");

if(status=~"[12][0-9][0-9]") {
rtpengine_manage("force trust-address replace-origin
replace-session-connection ICE=remove RTP/AVP");
route(NATMANAGE);
}
}






And the request get's handled here:

route[TO_WEBRTC] {
xlog("L_DEBUG", "KAMAILIO 
WEBRTC");
rtpengine_manage("rtcp-mux-offer trust-address replace-origin
replace-session-connection ICE=force RTP/SAVPF");
t_on_reply("REPLY_FROM_WEBRTC");
}


I've also defined a naked reply handler:

onreply_route {
xlog("L_DEBUG",
"<<< SIP NAKED REPLY:
$si:$sp --> $du ");
  }



None of the handler get's called, when kamailio is behind NAT.
If I use it without NAT it works:

Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: exec: ***
cfgtrace:request_route=[TO_WEBRTC] c=[/usr/local/etc/kamailio/routing.cfg]
l=83 a=25 n=t_on_reply
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/routing.cfg] l=72
a=16 n=if
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/routing.cfg] l=71
a=25 n=t_is_set
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/routing.cfg] l=71
a=25 n=t_on_failure
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/routing.cfg] l=77
a=16 n=if
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/routing.cfg] l=74
a=24 n=t_relay
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: tm
[t_lookup.c:1373]: t_newtran(): DEBUG: t_newtran: msg id=1 , global msg
id=1 , T on entrance=(nil)
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: tm
[t_lookup.c:527]: t_lookup_request(): t_lookup_request: start searching:
hash=17975, isACK=0
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: tm
[t_lookup.c:485]: matching_3261(): DEBUG: RFC3261 transaction matching
failed
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: tm
[t_lookup.c:709]: t_lookup_request(): DEBUG: t_lookup_request: no
transaction found
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: tm
[t_hooks.c:374]: run_reqin_callbacks_internal(): DBG: trans=0x7f05125345d8,
callback type 1, id 0 entered
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[md5utils.c:67]: MD5StringArray(): DEBUG: MD5 calculated:
1192e2bc8b6a8390f99a4a7139cd344e
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: tm
[t_funcs.c:347]: t_relay_to(): SER: new INVITE
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[msg_translator.c:205]: check_via_address():
check_via_address(146.148.113.245, 10.240.215.73, 0)
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[mem/shm_mem.c:111]: _shm_resize(): WARNING:vqm_resize: resize(0) called
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: tm
[t_reply.c:728]: _reply_light(): DEBUG: reply sent out. buf=0x7f051a8ed250:
SIP/2.0 100 trying -..., shmem=0x7f0512536f90: SIP/2.0 100 trying -
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: tm
[t_reply.c:738]: _reply_light(): DEBUG: _reply_light: finished
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[dns_cache.c:566]: _dns_hash_find(): dns_hash_find(_sip._
udp.whtest3.24dial.com(28), 33), h=536
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[resolve.c:967]: get_record(): get_record: skipping 1 NS (p=0x9e5b1b,
end=0x9e5b4d)
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[resolve.c:983]: get_record(): get_record: parsing 0 ARs (p=0x9e5b4d,
end=0x9e5b4d)
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[dns_cache.c:1772]: dns_get_related(): dns_get_related(0x7f0512537778
(_sip._udp.whtest3.24dial.com, 5), 33, *0x7f051a8ec028) (0)
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[dns_cache.c:1939]: dns_cache_do_request(): dns_cache_do_request: cname
detected: ghs.l.google.com (16)
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[dns_cache.c:869]: dns_cache_add_unsafe(): dns_cache_add: adding _sip._
udp.whtest3.24dial.com(28) 5 (flags=0) at 536
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[dns_cache.c:869]: dns_cache_add_unsafe(): dns_cache_add: adding
ghs.google.com(14) 5 (flags=0) at 66
Oct 24 15:42:38 h2296799 /usr/local/sbin/kamailio[765]: DEBUG: 
[dns_cache.c:2003]: dns_cache_do_request(): dns_cache_do_request:
dns_get_

Re: [SR-Users] async workers

2014-10-24 Thread Frank Carmickle

On Oct 24, 2014, at 9:15 AM, Daniel-Constantin Mierla  wrote:

> 
> On 23/10/14 04:03, Alex Balashov wrote:
>> Also, what is the point of core async_workers setting versus the
>> 'workers' modparam to async? Are they supposed to equal each other?
>> Does one override the other?
> 
> async_workers from core are common for all modules, being a decision not
> to have each module that wants async operations to create its own pool
> of processes. The workers defined by async module are only for that
> module and used only by async_route() and async_sleep().
> 
> The implementation is also different, the async module workers are more
> like timer processes (because both of async_route() and async_sleep()
> need to sleep some interval of time). The module itself keeps the lists
> of tasks in a structure optimized for timer execution. Each of this
> async module workers check from time to time to see if there is a task
> to be executed, executes what matches the time, then sleeps again for
> 100ms (iirc), then checks again...
> 
> The async_workers from core were designed to receive the job
> immediately. Because of that, there is an interprocess communication
> based on sockets in memory. The async workers are listening on them, so
> once a sip worker sends the task to them, an async worker will receive it.

I don't understand this stuff at all.  I do know that when Freeswitch started 
using timerfd these sorts of issues got better by quite a bit.  Maybe this 
would help here?  Maybe you're already using this?

--FC


___
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] async workers

2014-10-24 Thread Alex Balashov
Thanks, Daniel. So, does this mean that the module "reserves" a "workers" 
number of common async_workers for its exclusive use? Or do those async_workers 
just receive whatever they are sent from any number of modules? In that case, 
what exactly is the role of the "workers" parameter? To limit the number of 
async_workers to which the module will send requests? 


On 24 October 2014 09:15:19 GMT-04:00, Daniel-Constantin Mierla 
 wrote:
>
>On 23/10/14 04:03, Alex Balashov wrote:
>> Also, what is the point of core async_workers setting versus the
>> 'workers' modparam to async? Are they supposed to equal each other?
>> Does one override the other?
>
>async_workers from core are common for all modules, being a decision
>not
>to have each module that wants async operations to create its own pool
>of processes. The workers defined by async module are only for that
>module and used only by async_route() and async_sleep().
>
>The implementation is also different, the async module workers are more
>like timer processes (because both of async_route() and async_sleep()
>need to sleep some interval of time). The module itself keeps the lists
>of tasks in a structure optimized for timer execution. Each of this
>async module workers check from time to time to see if there is a task
>to be executed, executes what matches the time, then sleeps again for
>100ms (iirc), then checks again...
>
>The async_workers from core were designed to receive the job
>immediately. Because of that, there is an interprocess communication
>based on sockets in memory. The async workers are listening on them, so
>once a sip worker sends the task to them, an async worker will receive
>it.
>
>Hopefully I was able to explain it enough to understand what happens
>behind.
>
>Cheers,
>Daniel
>>
>> On 10/22/2014 09:36 PM, Alex Balashov wrote:
>>
>>> Hi,
>>>
>>> What is the practical limit to the number of async worker processes?
>>>
>>> With SIP child processes, it seems to be about the number of
>available
>>> CPUs in /proc/cpuinfo. After that--at least, per my testing--one
>begins
>>> to hit the point of diminishing returns, presumably due to SHM IPC
>and
>>> synchronisation issues.
>>>
>>> Is the restriction similar in the async execution context?
>>>
>>
>>

--
Sent from my mobile, and thus lacking in the refinement one might expect from a 
fully fledged keyboard. 

Alex Balashov - Principal 
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0671
Web: http://www.evaristesys.com/, http://www.alexbalashov.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] async workers

2014-10-24 Thread Vitaliy Aleksandrov



Hi,

What is the practical limit to the number of async worker processes?

With SIP child processes, it seems to be about the number of available
CPUs in /proc/cpuinfo. After that--at least, per my testing--one
begins to hit the point of diminishing returns, presumably due to SHM
IPC and synchronisation issues.

Is the restriction similar in the async execution context?

no specific restriction. Also, I haven't seen any degradation when using
more sip worker processes that cpus, which I do have always (at least 2
per CPU), because a worker can do quite a lot of I/O.


I have seen such degradation, at least in my VM testing environment. I 
find that I get the highest CPS (e.g. with sipp) with the smallest 
number of workers.


Actually, I get as good throughput with 4 workers (in an 8 "CPU" 
scenario on a quad-core processor) as I do with 8! Increasing beyond 8 
leads to diminishing returns.


With real traffic some of workers can be busy on blocking operations 
such as database queries or host name resolution. So I prefer to add 
more workers to not get in situation when all my workers are blocked by 
something.


___
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] async workers

2014-10-24 Thread Alex Balashov
Vitaliy, 

The argument against more workers holds that the specific interprocess 
communication used by them causes one to reach the point of diminishing returns 
rather quickly, due to contention and locking. In many applications, one can 
create dozens of hundreds of workers in such a situation, and for precisely the 
reason you mention. In my experience, 2*num_cpus is the absolute maximum in 
Kamailio before one starts to lose more in contention than one gains from the 
throughout of an additional worker. 

Actual results vary and depend on the anatomy of the workload (i.e. how much 
data is operated upon in shared memory, amongst the processes, versus package 
memory). But in general, the number of workers Kamailio can have is quite low. 

For example, I have a quad-core CPU. I can get about 400-500 CPS with 8 
children. If I increase the number of children to 16, it plummets to 200 or 
less. When I increase further, throughout falls further. 


On 24 October 2014 10:30:49 GMT-04:00, Vitaliy Aleksandrov 
 wrote:
>
 Hi,

 What is the practical limit to the number of async worker
>processes?

 With SIP child processes, it seems to be about the number of
>available
 CPUs in /proc/cpuinfo. After that--at least, per my testing--one
 begins to hit the point of diminishing returns, presumably due to
>SHM
 IPC and synchronisation issues.

 Is the restriction similar in the async execution context?
>>> no specific restriction. Also, I haven't seen any degradation when
>using
>>> more sip worker processes that cpus, which I do have always (at
>least 2
>>> per CPU), because a worker can do quite a lot of I/O.
>>
>> I have seen such degradation, at least in my VM testing environment.
>I 
>> find that I get the highest CPS (e.g. with sipp) with the smallest 
>> number of workers.
>>
>> Actually, I get as good throughput with 4 workers (in an 8 "CPU" 
>> scenario on a quad-core processor) as I do with 8! Increasing beyond
>8 
>> leads to diminishing returns.
>>
>With real traffic some of workers can be busy on blocking operations 
>such as database queries or host name resolution. So I prefer to add 
>more workers to not get in situation when all my workers are blocked by
>
>something.
>
>___
>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

--
Sent from my mobile, and thus lacking in the refinement one might expect from a 
fully fledged keyboard. 

Alex Balashov - Principal 
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0671
Web: http://www.evaristesys.com/, http://www.alexbalashov.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 Infront of Asterisk with remote PBX

2014-10-24 Thread Kenny Watson
Hi Daniel,

thanks for this, it looks like exactly what I'm looking for.  I've been moved 
onto another project for the next week but will try this as soon as I can.


Thanks
Kenny Watson

-Original Message-
From: sr-users-boun...@lists.sip-router.org 
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Daniel Tryba
Sent: 24 October 2014 12:40
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Kamailio Infront of Asterisk with remote PBX

On Thursday 23 October 2014 19:16:58 Kenny Watson wrote:
> What I need to figure out is how to on kamailo maybe using a dial 
> prefix specify that the call is going to a remote extension on a 
> "user" and rewrite the to header to be extension@useripaddress rather 
> than user@useripaddress.

I think your "problem" can be summarized as:

initial trunk invite: INVITE sip:number@kamailio in kamailio $rU is number, but 
after a successful location lookup
(lookup("location")/alias_db_lookup) $rU is the username from subscribers or 
dbaliases. Without further processing the invite to asterisk would look like:
INVITE sip:username@asterisk

The solution I use is simple:
-before lookup I store the initial $rU in an avp(callednumber).
-lookup
-check in usr_preferences wether the endpoint wants DID or should be addressed 
with its username (true/false) -if true: $rU=$avp(callednumber)
-t_relay()

-- 

POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/   - http://www.sipo.nl/
K.v.K. Eindhoven 17097024

___
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


Re: [SR-Users] RPM Based installs...

2014-10-24 Thread Ovidiu Sas
Maybe it has to do with the old dependency on libconfuse.
The dependency is no longer required since 4.1 and all release bigger
then 4.1 should provide the rpm.

Right now, the rpm is available for Fedora:
http://download.opensuse.org/repositories/home:/kamailio:/v4.2.x-rpms/Fedora_20/x86_64/kamailio-carrierroute-4.2.0-14.1.x86_64.rpm

It should be also built for CentOS and RHEL.
Please open a bug report.

-ovidiu

On Thu, Oct 23, 2014 at 12:52 PM, Derrick Bradbury  wrote:
> Just a question for the RPM maintainers...
>
> Is there a reason for some of the modules (such as carrierroute) not being
> included in the RPMS?
>
> It's been bugging me for a while, when I do an installation, I have to go
> and compile all the sources  Not that it's an issue, just easier to do
> it from RPM if available.
>
> Thanks!
> Derrick
>
>
> ___
> 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
>



-- 
VoIP Embedded, Inc.
http://www.voipembedded.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] sip response not handled by kamailio

2014-10-24 Thread Marko Seidenglanz
Hello,

The problem of kamailio not receiving the packet's is that packet size of
200 response seems to be too large. I removed the SDP from response and it
arrives.

Anyone had a similar problem and knows how it might get solved (accept
switching to TCP)

Kind regards,
Marko

2014-10-24 10:51 GMT+02:00 Marko Seidenglanz :

> Hello,
>
> We are trying to use Kamailio 4.2 with RTPEngine 3.3 behind NAT.
>
> Somehow SIP responses (200 OK) are not handled by Kamailio.
>
>
>
> The following INVITE is send to the receiving end (WebRTC Client):
>
> INVITE sip:evqzk4l62mdf3g7u6e...@whtest3.24dial.com SIP/2.0
> Record-Route: 
> Via: SIP/2.0/UDP 104.155.11.255:5060
> ;branch=z9hG4bK865.9db0c023bec2f314e89ae0f18b78d2f0.0
> Via: SIP/2.0/UDP 10.240.215.73:5060
> ;rport=5060;received=146.148.113.245;branch=z9hG4bK644600e2
> Max-Forwards: 69
> From: "Anonymous" ;tag=as68f0a26a
> To: 
> Contact: 
> Call-ID: 368f6ec901a3552e3b37a70907634f4f@10.240.215.73:5060
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX 12.5.0
> Date: Fri, 24 Oct 2014 08:38:09 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
> PUBLISH, MESSAGE
> Supported: replaces, timer
> Content-Type: application/sdp
> Content-Length: 738
> P-hint: outbound
> ...
>
>
> The client response looks like this:
>
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 104.155.11.255:5060
> ;branch=z9hG4bK865.9db0c023bec2f314e89ae0f18b78d2f0.0;rport=5060;received=104.155.11.255
>  , SIP/2.0/UDP 10.240.215.73:5060
> ;rport=5060;received=146.148.113.245;branch=z9hG4bK644600e2
> From: "Anonymous" ;tag=as68f0a26a
> To:   >;tag=E2VMB39U5NYHCXLZREFGQV2DAXPCZXNQ6J6P
> Contact:   >;tag=E2VMB39U5NYHCXLZREFGQV2DAXPCZXNQ6J6P
> Call-ID: 368f6ec901a3552e3b37a70907634f4f@10.240.215.73:5060
> CSeq: 102 INVITE
> Record-Route: 
> Content-Type: application/sdp
> Content-Length: 938
> ...
>
>
>
> I have a xlog call as the first statement in kamailio routing script. I
> can see the request, which get's handled correctly but the response does
> not appear in kamailio log, though it arrives at the machine.
>
> I am totally helpless, what might be wrong. If we use kamailio on a public
> accessable machine everything works as expected.
>
>
> Maybe anyone might have had similiar problems using kamailio behind NAT.
>
>
> Kind regards,
> Marko
>
___
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] dispatcher behind NAT - lost ACK

2014-10-24 Thread Ovidiu Sas
The issue here is that your carrier is detecting you as a NATed client
and this breaks your ACK routing.

I overloaded the meaning of interfaces.  Two sockets (same IP,
different ports) works fine in a multihomed setting.
One socket for internal traffic and one socket (with external
advertised IP) for external traffic.

Regards,
Ovidiu Sas

On Thu, Oct 23, 2014 at 11:40 PM, Nicholas Gill  wrote:
> Hi Ovidiu,
>
> On 18/10/14 00:37, Ovidiu Sas wrote:
>>
>> Which is bad, it should be the IP of the FS server.
>
> I investigated and I'm not sure this is the issue.
>
> Unfortunately when I named the various addresses it obscured the fact that
> the ip address kamailio.int is the IP address of the freeswitch server -
> i.e. FS and Kamailio were hosted on the same machine for that test.
>
> Regarding multiple interfaces the configuration does listen on two ports,
> one for internal and one for external. What benefit would making this on two
> distinct interfaces bring?
>
> Cheers,
>
> -nick
>
>
> ___
> 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



-- 
VoIP Embedded, Inc.
http://www.voipembedded.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] Kamailio, authentication and MongoDB

2014-10-24 Thread Nolan Darilek
Hello. I'm attempting to set up Kamailio for the first time and have a
few questions.

1. The auth_db module specifically calls out MySQL, Postgres and flat
file databases, but makes no mention of the new MongoDB module. Is the
new MongoDB module supported as well and the docs just haven't been
updated to account for that?

2. In looking at the auth_db parameters, I see values for column names,
but nothing for a table/collection. How do I specify what table or
collection my user data is in?

3. How do I create HA1 strings? The docs state:

HA1 strings are MD5 hashes of username, password, and realm.

Is that:

md5(username+":"+password+":"+realm)

or something else?

Thanks.

___
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, authentication and MongoDB

2014-10-24 Thread Nolan Darilek
On 10/24/2014 10:43 AM, Nolan Darilek wrote:
> 2. In looking at the auth_db parameters, I see values for column names,
> but nothing for a table/collection. How do I specify what table or
> collection my user data is in?
>

Ah, found this one, it was in the authenticate functions. Sorry, I
expected to see it as a config parameter.

___
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] async workers causing unexplained high load average

2014-10-24 Thread Alex Balashov

Hi Daniel,

On 10/24/2014 09:03 AM, Daniel-Constantin Mierla wrote:


Can you attach with gdb to one of the async processes and see with the
backtrace command what is the process doing at that time?


Sometimes I can do this:

(gdb) where
#0  0x7f4c17007673 in __recvfrom_nocancel () from /lib64/libc.so.6
#1  0x0042c10c in async_task_run (idx=1) at async_task.c:201
#2  0x0042b449 in async_task_child_init (rank=0) at async_task.c:144
#3  0x00590af0 in init_child (rank=0) at sr_module.c:944
#4  0x004a603c in main_loop () at main.c:1705
#5  0x004aad16 in main (argc=11, argv=0x7fff73224228) at main.c:2560

But at other times:

Process::  ID=11 PID=1932 Type=Async Task Worker
Process::  ID=12 PID=1933 Type=Async Task Worker

root@centosity6 ~]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-64.el6_5.2)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
.
(gdb) attach 1932
Attaching to process 1932
[nothing happens, gdb hangs]

Moreover, no signals crash or kill the process:

[root@centosity6 kamailio]# kill -SEGV 1932
[root@centosity6 kamailio]# kill -TERM 1932
[root@centosity6 kamailio]# kill -INT 1932
[root@centosity6 kamailio]#

... not even kill, which shouldn't be trappable:

[root@centosity6 kamailio]# kill -9 1932
[root@centosity6 kamailio]# kill -9 1932
[root@centosity6 kamailio]# kill -9 1932
[root@centosity6 kamailio]# kill -9 1932
[root@centosity6 kamailio]# kill -9 1932

-- Alex

--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
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] Dealing with High PDD

2014-10-24 Thread Ryan Brindley
Hey Community,

I've tried to google and view the docs for Kamailio about fr_inv_timer (and
other timers), but I don't think they do what I'm wanting.

Basically, I want to cancel an INVITE request and progress to the next
contact if the current contact has not send a non-100 provisional code or
final response after a certain amount of time.

Am I missing some obvious setting that I overlooked in my searches or do I
have to approach this 'manually' (aka, not just a setting)?

Any help is greatly appreciated.

Ryan Brindley
___
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] Dealing with High PDD

2014-10-24 Thread Alex Balashov

On 10/24/2014 12:17 PM, Ryan Brindley wrote:


Am I missing some obvious setting that I overlooked in my searches or do
I have to approach this 'manually' (aka, not just a setting)?


Correct; there is no TM timer that deals with this scenario.

Your best bet is to set the fr_inv_timer to something very short, then 
reset it to something longer, using t_set_fr()/t_reset_fr(), in an 
onreply_route, when you receive a non-100 1xx response.


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
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] Dealing with High PDD

2014-10-24 Thread Ryan Brindley
Alex -- oh, awesome. thanks for the help. I had read you could reset the
timer via a setting, but for some reason didn't even think to look for a
function that does it manually.

Thanks again for the help!

Ryan Brindley
Software Development Officer
Stratics Networks, Inc.
1.866.635.6918 x108

On Fri, Oct 24, 2014 at 11:19 AM, Alex Balashov 
wrote:

> On 10/24/2014 12:17 PM, Ryan Brindley wrote:
>
>  Am I missing some obvious setting that I overlooked in my searches or do
>> I have to approach this 'manually' (aka, not just a setting)?
>>
>
> Correct; there is no TM timer that deals with this scenario.
>
> Your best bet is to set the fr_inv_timer to something very short, then
> reset it to something longer, using t_set_fr()/t_reset_fr(), in an
> onreply_route, when you receive a non-100 1xx response.
>
> --
> Alex Balashov - Principal
> Evariste Systems LLC
> Tel: +1-678-954-0670
> Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
>
> Please be kind to the English language:
>
> http://www.entrepreneur.com/article/232906
>
> ___
> 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] Kamailio + RTPEngine behind NAT (STUN Handling)

2014-10-24 Thread Marko Seidenglanz
Hello,

We want to use Kamailio (4.2) + RTPEngine (3.3) behind NAT. Unfortunately
the STUN Messages (Binding Requests) sent from remote peer (Google Chrome )
do not arrive at RTPEngine host.

I think they get blocked by the firewall. RTPEngine itself does not send
any STUN Messages until it get's the first message from the remote peer as
Google Chrome has the "active" role in DTLS Agreement.

Is there a way to tell RTPEngine to open the ports for remote peer, so that
the messages arrive?


When RTPEngine is not behind NAT, everything works as expected.


Kind regards,
Marko
___
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] async workers causing unexplained high load average

2014-10-24 Thread Alex Balashov

But most of the time, I do get this from both processes:

(gdb) where
#0  0x7fb699e07673 in __recvfrom_nocancel () from /lib64/libc.so.6
#1  0x0042c10c in async_task_run (idx=2) at async_task.c:201
#2  0x0042b449 in async_task_child_init (rank=0) at async_task.c:144
#3  0x00590af0 in init_child (rank=0) at sr_module.c:944
#4  0x004a603c in main_loop () at main.c:1705
#5  0x004aad16 in main (argc=11, argv=0x7fff6da24fd8) at main.c:2560

Interestingly enough, the load problem seems to come from both 
async_workers running at once. When I attach to one or the other:


 12:26:58 up 40 min,  2 users,  load average: 0.00, 0.08, 0.15

But as soon as I detach from them both, the load average comes back up.

I also get 0 load with only async_workers=1.

So, I think it's somehow related to the multiplicity of async_workers.


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
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] How do I configure this thing?

2014-10-24 Thread Nolan Darilek
OK, sorry for the basic question, but I'm overwhelmed.

My install gives me a kamailio-basic.cfg, kamailio.cfg and
kamailio-oob.cfg. Is there any explanation as to the difference between
these? I assume "basic" is a simpler config, but I don't know what it
lacks vs. kamailio.cfg, and I have no idea what "oob" means ("out-of-band?")

The configs reference a kamailio-local.cfg. My assumption was that I
could place config changes here, but I see later that kamailio.cfg
changes some parameters. In particular, I set various auth_db parameters
in kamailio-local.cfg which kamailio.cfg changes later. So I don't
understand when I might want to use kamailio-local.

The config files refer me to a cookbook, but unless I'm missing
something, the cookbook is a long list of config directives. When I read
"cookbook" I assume I'm being directed to something containing recipes
like "how to enable web sockets," with step-by-step guides about which
config files to edit and what to add. Am I just missing that?

Is there a task-oriented getting started page that I'm missing, that
would help me set up a web socket-based SIP server? Then, when I hit the
inevitable issues, I can resolve specific problems rather than trying to
figure this all out from scratch? I see the documentation attached to
the web sockets module, but many of these docs include stand-alone
config snippets with no indication as to how to integrate them into a
larger config. For instance, the ephemeral auth module tells me how to
set up an ephemeral auth route but doesn't give me enough context to
place the snippet correctly in the 900+-line kamailio.cfg, and actually
I suspect it wouldn't work anyway since I see nothing about HTTP in the
kamailio.cfg.

Sorry if I seem frustrated. I'm willing to learn, I've just been handed
a jet engine and a few suggested tweaks, but not enough context to know
how to make them. :) I'll be learning more about SIP and what role a SIP
router plays, but it'd be helpful to be able to bootstrap a server so I
can learn by doing as well. I'd just like to provide audio/video
communication for a single SIP domain, authenticating against MongoDB
and with ephemeral auth so Javascript clients can get temporary
credentials. I don't want voicemail, outbound routing, etc. This seems
like it should be simple to achieve, but I don't know how or where to
start in a way that would allow me to build up.

Thanks.

___
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] How do I configure this thing?

2014-10-24 Thread Alex Balashov

On 10/24/2014 12:53 PM, Nolan Darilek wrote:

OK, sorry for the basic question, but I'm overwhelmed.

My install gives me a kamailio-basic.cfg, kamailio.cfg and
kamailio-oob.cfg. Is there any explanation as to the difference between
these? I assume "basic" is a simpler config, but I don't know what it
lacks vs. kamailio.cfg, and I have no idea what "oob" means ("out-of-band?")

The configs reference a kamailio-local.cfg. My assumption was that I
could place config changes here, but I see later that kamailio.cfg
changes some parameters. In particular, I set various auth_db parameters
in kamailio-local.cfg which kamailio.cfg changes later. So I don't
understand when I might want to use kamailio-local.

The config files refer me to a cookbook, but unless I'm missing
something, the cookbook is a long list of config directives. When I read
"cookbook" I assume I'm being directed to something containing recipes
like "how to enable web sockets," with step-by-step guides about which
config files to edit and what to add. Am I just missing that?


You're not missing anything. You've just encountered the fundamental 
problem with Kamailio documentation. :-) Welcome to the party.


There's a lot of reference material, and not a lot of high-level 
methodological guidance as far as "putting it all together" or 
conceptual orientation as to why you might want or not want to do the 
things that are referred to by the documentation. That's what you're 
looking for, and by and large, it's not there.


At the moment, the only real answer, besides commercial training, is the 
upcoming Kamailio Admin book put out by ASIPTO. But, of course, strides 
are being made to improve the documentation and make it more accessible 
to a wider audience, especially of new users. Believe me, it's better 
than it used to be.


It's just that most of us have jobs and have to make a living, on top of 
doing development and debugging of the software itself, so inevitably 
this kind of stuff takes a back seat to the day-to-day. There are lots 
of ambitious documentation efforts that have been consigned to the realm 
of dreams deferred and ambitions unrealised.


Patience, and don't get frustrated or discouraged. Just tinker, and ask 
on the lists until it starts to make sense. :-)


Cheers,

-- Alex

--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
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] async workers causing unexplained high load average

2014-10-24 Thread Alex Balashov

I also find this in 'dmesg' about the async workers periodically:

INFO: task kamailio:4480 blocked for more than 120 seconds.
  Not tainted 2.6.32-431.29.2.el6.x86_64 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kamailio  D 0001 0  4480   4458 0x0080
 880037b1db28 0082 880037b1dbb8 8112f183
 8801dd80 0002 880037b1dac8 8109b39c
 8800a6069058 880037b1dfd8 fbc8 8800a6069058
Call Trace:
 [] ? __alloc_pages_nodemask+0x113/0x8d0
 [] ? remove_wait_queue+0x3c/0x50
 [] __mutex_lock_slowpath+0x13e/0x180
 [] mutex_lock+0x2b/0x50
 [] unix_dgram_recvmsg+0x7a/0x4d0
 [] sock_recvmsg+0x133/0x160
 [] ? autoremove_wake_function+0x0/0x40
 [] ? handle_mm_fault+0x22a/0x300
 [] ? __do_page_fault+0x1ec/0x480
 [] sys_recvfrom+0xee/0x180
 [] ? audit_syscall_entry+0x1d7/0x200
 [] system_call_fastpath+0x16/0x1b


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
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] How do I configure this thing?

2014-10-24 Thread Nolan Darilek

On 10/24/2014 11:59 AM, Alex Balashov wrote:
>
> At the moment, the only real answer, besides commercial training, is
> the upcoming Kamailio Admin book put out by ASIPTO. But, of course,
> strides are being made to improve the documentation and make it more
> accessible to a wider audience, especially of new users. Believe me,
> it's better than it used to be.
>
Cool, I don't object to paying for a book, especially if it's available
electronically. Is there a rough cut or some other preview out? At the
moment, unless I'm missing something, I need something like Kamailio to
launch a project I'm working on. Unfortunately I don't have the budget
for commercial training, but a book would certainly work.

> It's just that most of us have jobs and have to make a living, on top
> of doing development and debugging of the software itself, so
> inevitably this kind of stuff takes a back seat to the day-to-day.
> There are lots of ambitious documentation efforts that have been
> consigned to the realm of dreams deferred and ambitions unrealised.
>
> Patience, and don't get frustrated or discouraged. Just tinker, and
> ask on the lists until it starts to make sense. :-)
>
OK, can do. Thanks for being welcoming, and I'm glad to know that I'm
not missing any obvious documentation.


___
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] How do I configure this thing?

2014-10-24 Thread Alex Balashov

On 10/24/2014 01:21 PM, Nolan Darilek wrote:


Cool, I don't object to paying for a book, especially if it's available
electronically. Is there a rough cut or some other preview out?


I believe so, but I do believe it is quite a rough cut:

http://www.asipto.com/index.php/kamailio-admin-book/


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
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] How do I configure this thing?

2014-10-24 Thread Mahmoud Ramadan Ali
When the book will be available...? i'm waiting for it...

On Fri, Oct 24, 2014 at 10:23 AM, Alex Balashov 
wrote:

> On 10/24/2014 01:21 PM, Nolan Darilek wrote:
>
>  Cool, I don't object to paying for a book, especially if it's available
>> electronically. Is there a rough cut or some other preview out?
>>
>
> I believe so, but I do believe it is quite a rough cut:
>
> http://www.asipto.com/index.php/kamailio-admin-book/
>
>
> --
> Alex Balashov - Principal
> Evariste Systems LLC
> Tel: +1-678-954-0670
> Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
>
> Please be kind to the English language:
>
> http://www.entrepreneur.com/article/232906
>
> ___
> 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


Re: [SR-Users] How do I configure this thing?

2014-10-24 Thread Alex Balashov

On 10/24/2014 01:36 PM, Mahmoud Ramadan Ali wrote:


When the book will be available...? i'm waiting for it...


I'm afraid only Daniel would have the answer to that question. :-)

--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
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 + RTPEngine behind NAT (STUN Handling)

2014-10-24 Thread Richard Fuchs
On 10/24/14 12:34, Marko Seidenglanz wrote:
> Hello,
> 
> We want to use Kamailio (4.2) + RTPEngine (3.3) behind NAT.
> Unfortunately the STUN Messages (Binding Requests) sent from remote peer
> (Google Chrome ) do not arrive at RTPEngine host.
> 
> I think they get blocked by the firewall. RTPEngine itself does not send
> any STUN Messages until it get's the first message from the remote peer
> as Google Chrome has the "active" role in DTLS Agreement. 
> 
> Is there a way to tell RTPEngine to open the ports for remote peer, so
> that the messages arrive?
> 
> 
> When RTPEngine is not behind NAT, everything works as expected.

Rtpengine is designed to be run on a host with a public address, or at
least a host that has direct communication with the clients that it's
supposed to serve. So no, there is no such function.

cheers

___
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] How do I configure this thing?

2014-10-24 Thread Mahmoud Ramadan Ali
and i'm afraid Daniel him self does not know when to publish his book :D

On Fri, Oct 24, 2014 at 10:37 AM, Alex Balashov 
wrote:

> On 10/24/2014 01:36 PM, Mahmoud Ramadan Ali wrote:
>
>  When the book will be available...? i'm waiting for it...
>>
>
> I'm afraid only Daniel would have the answer to that question. :-)
>
>
> --
> Alex Balashov - Principal
> Evariste Systems LLC
> Tel: +1-678-954-0670
> Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
>
> Please be kind to the English language:
>
> http://www.entrepreneur.com/article/232906
>
> ___
> 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] Setting up web sockets and ephemeral auth

2014-10-24 Thread Nolan Darilek
Having a hard time piecing together lots of pieces out of context.
Here's what I want:

1. User logs in to my web app via its own authentication mechanisms.
2. Via an authenticated REST endpoint, my web app connects to the
ephemeral auth service and returns a temporary username/password to the
client.
3. The client connects to a web socket SIP interface, authenticating
with the username/password it was given.
4. I'd also like to support authentication via standard SIP client using
the user's default username/password, but that's a bit down the road still.

Here is my kamailio-local.cfg. I'm using the web socket example copied
from the docs, with a little cleanup and a few optional checks removed
for now.

loadmodule "db_mongodb.so"

#!define DBURL "mongodb://mongo/perceptron"

#!define WITH_AUTH

#!define WITH_NAT

loadmodule "xhttp.so"

#modparam("xhttp", "url_match", "^/sip/")

tcp_accept_no_cl=yes

loadmodule "msrp.so"  # Only required if using MSRP over WebSockets
loadmodule "websocket.so"

loadmodule "auth_ephemeral.so"

modparam("auth_ephemeral", "secret", "Kamailio rulez!!11")

event_route[xhttp:request] {
  set_reply_close();
  set_reply_no_connect();

  # xlog("L_DBG", "HTTP Request Received\n");

  if ($hdr(Upgrade) =~ "websocket" && $hdr(Connection) =~ "Upgrade" &&
$rm=~ "GET" ) {
# Validate Host - make sure the client is using the correct
# alias for WebSockets
if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) {
  # xlog("L_WARN", "Bad host $hdr(Host)\n");
  xhttp_reply("403", "Forbidden", "", "");
  exit;
}

if (ws_handle_handshake()) {
  exit;
}
  }

  xhttp_reply("404", "Not found", "", "");

}


When I attempt to validate this, I get:

 0(1) ERROR:  [pvapi.c:790]: pv_parse_spec2(): error searching
pvar "hdr"
 0(1) ERROR:  [pvapi.c:994]: pv_parse_spec2(): wrong char [U/85]
in [$hdr(
Upgrade)] at [5 (5)]
 0(1) :  [cfg.y:3436]: yyerror_at(): parse error in config file
/usr/local
/etc/kamailio/kamailio-local.cfg, line 28, column 7-19: Can't get from
cache: $h
dr(Upgrade)
ERROR: bad config file (1 errors)

I don't know what that means. I've copied the config directly from the
website.

I tried quoting "Upgrade" and such in the $hdr lines, but that gives me:

 0(1) ERROR:  [pvapi.c:790]: pv_parse_spec2(): error searching
pvar "hdr"
 0(1) ERROR:  [pvapi.c:994]: pv_parse_spec2(): wrong char ["/34]
in [$hdr(
"Upgrade")] at [5 (5)]
 0(1) :  [cfg.y:3436]: yyerror_at(): parse error in config file
/usr/local
/etc/kamailio/kamailio-local.cfg, line 28, column 7-21: Can't get from
cache: $h
dr("Upgrade")
ERROR: bad config file (1 errors)


What am I missing here?

I also had to comment out the xlog lines because those gave me errors.
Do I need another module loaded to use xlog?

Finally, does anyone have a working, complete example of SIP over web
sockets with ephemeral auth integrated? I'm not sure if I should be
checking the ephemeral auth credentials in the web sockets code, the SIP
routes or somewhere else. I'm also not sure how I should set up
authentication such that users can log in with both their standard
credentials or those retrieved via the ephemeral auth module.

Thanks.

___
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] Failed to install Kamailio database

2014-10-24 Thread Mahmoud Ramadan Ali
Hiii everyone,

I can not create kamailio database and get this error message...

any ideas ?

Thanks in advance...
___
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] Failed to install Kamailio database

2014-10-24 Thread Fred Posner

Do you have mysql installed?

Fred Posner
The Palner Group, Inc.
http://www.palner.com (web)
+1-503-914-0999 (direct)
+1-954-472-2896 (fax)

On 10/24/2014 08:52 PM, Mahmoud Ramadan Ali wrote:

Hiii everyone,

I can not create kamailio database and get this error message...

any ideas ?

Thanks in advance...



___
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


Re: [SR-Users] Failed to install Kamailio database

2014-10-24 Thread Mahmoud Ramadan Ali
No ! i do not have mysql installed...does the script will install it
for me or i should install it previously ?

On 10/24/14, Fred Posner  wrote:
> Do you have mysql installed?
>
> Fred Posner
> The Palner Group, Inc.
> http://www.palner.com (web)
> +1-503-914-0999 (direct)
> +1-954-472-2896 (fax)
>
> On 10/24/2014 08:52 PM, Mahmoud Ramadan Ali wrote:
>> Hiii everyone,
>>
>> I can not create kamailio database and get this error message...
>>
>> any ideas ?
>>
>> Thanks in advance...
>>
>>
>>
>> ___
>> 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
>

___
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] Failed to install Kamailio database

2014-10-24 Thread Fred Posner
You will need to install mysql if you would like to use a mysql 
database. It is not required that you use mysql. Other databases are 
supported as well as a database not being a requirement for the software.


Fred Posner

On 10/24/2014 08:57 PM, Mahmoud Ramadan Ali wrote:

No ! i do not have mysql installed...does the script will install it
for me or i should install it previously ?

On 10/24/14, Fred Posner  wrote:

Do you have mysql installed?

Fred Posner
The Palner Group, Inc.
http://www.palner.com (web)
+1-503-914-0999 (direct)
+1-954-472-2896 (fax)

On 10/24/2014 08:52 PM, Mahmoud Ramadan Ali wrote:

Hiii everyone,

I can not create kamailio database and get this error message...

any ideas ?

Thanks in advance...


___
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] Failed to install Kamailio database

2014-10-24 Thread Mahmoud Ramadan Ali
I'm following the installation instructions in this link
http://www.kamailio.org/wiki/install/4.2.x/git and thank u...i will install
mysql and i will try again and if i have issues i will contact u...
best regards

On Fri, Oct 24, 2014 at 6:09 PM, Fred Posner  wrote:

> You will need to install mysql if you would like to use a mysql database.
> It is not required that you use mysql. Other databases are supported as
> well as a database not being a requirement for the software.
>
> Fred Posner
>
>
> On 10/24/2014 08:57 PM, Mahmoud Ramadan Ali wrote:
>
>> No ! i do not have mysql installed...does the script will install it
>> for me or i should install it previously ?
>>
>> On 10/24/14, Fred Posner  wrote:
>>
>>> Do you have mysql installed?
>>>
>>> Fred Posner
>>> The Palner Group, Inc.
>>> http://www.palner.com (web)
>>> +1-503-914-0999 (direct)
>>> +1-954-472-2896 (fax)
>>>
>>> On 10/24/2014 08:52 PM, Mahmoud Ramadan Ali wrote:
>>>
 Hiii everyone,

 I can not create kamailio database and get this error message...

 any ideas ?

 Thanks in advance...

>>>
> ___
> 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


Re: [SR-Users] Failed to install Kamailio database

2014-10-24 Thread Mahmoud Ramadan Ali
Solved ! thank u :D

On Fri, Oct 24, 2014 at 6:09 PM, Fred Posner  wrote:

> You will need to install mysql if you would like to use a mysql database.
> It is not required that you use mysql. Other databases are supported as
> well as a database not being a requirement for the software.
>
> Fred Posner
>
>
> On 10/24/2014 08:57 PM, Mahmoud Ramadan Ali wrote:
>
>> No ! i do not have mysql installed...does the script will install it
>> for me or i should install it previously ?
>>
>> On 10/24/14, Fred Posner  wrote:
>>
>>> Do you have mysql installed?
>>>
>>> Fred Posner
>>> The Palner Group, Inc.
>>> http://www.palner.com (web)
>>> +1-503-914-0999 (direct)
>>> +1-954-472-2896 (fax)
>>>
>>> On 10/24/2014 08:52 PM, Mahmoud Ramadan Ali wrote:
>>>
 Hiii everyone,

 I can not create kamailio database and get this error message...

 any ideas ?

 Thanks in advance...

>>>
> ___
> 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


Re: [SR-Users] Failed to install Kamailio database

2014-10-24 Thread Mahmoud Ramadan Ali
I have another question please...i want to use Kamailio to do load
balancing between multiple asterisk servers - say two servers - .
I suppose that the configuration of the SIP users should be identical on
the two servers but i do not know what is the best way to achieve this
whether it will be by configuring Mysql replication between the two servers
or by configuring one of the server's database as a shared database ?!
Please can u explain that point ?
Best Regards

On Fri, Oct 24, 2014 at 6:09 PM, Fred Posner  wrote:

> You will need to install mysql if you would like to use a mysql database.
> It is not required that you use mysql. Other databases are supported as
> well as a database not being a requirement for the software.
>
> Fred Posner
>
>
> On 10/24/2014 08:57 PM, Mahmoud Ramadan Ali wrote:
>
>> No ! i do not have mysql installed...does the script will install it
>> for me or i should install it previously ?
>>
>> On 10/24/14, Fred Posner  wrote:
>>
>>> Do you have mysql installed?
>>>
>>> Fred Posner
>>> The Palner Group, Inc.
>>> http://www.palner.com (web)
>>> +1-503-914-0999 (direct)
>>> +1-954-472-2896 (fax)
>>>
>>> On 10/24/2014 08:52 PM, Mahmoud Ramadan Ali wrote:
>>>
 Hiii everyone,

 I can not create kamailio database and get this error message...

 any ideas ?

 Thanks in advance...

>>>
> ___
> 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


Re: [SR-Users] Converting JSON string to normal string

2014-10-24 Thread Muhammad Shahzad
Thanks, i managed to use s.rm to remove quotes in single shot.

Thank you.

On Fri, Oct 24, 2014 at 3:20 PM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
> no transformation to "unquote", at this time probably chaining s.strip and
> s.striptail would be an option.
>
> Adding transformations to "quote" and "unquote" can be useful indeed if
> json operation returns the full value.
>
> Cheers,
> Daniel
>
>
> On 23/10/14 21:02, Muhammad Shahzad wrote:
>
>Hi,
>
>  Using method json_get_field i am able to extract json string. However,
> this string comes with quotes which cause a hurdle in assigning to various
> pseudo variables, for example,
>
> --
> json_get_field($redis(r=>value), "to_number",
> "$var(wim_to)");
> json_get_field($redis(r=>value), "domain",
> "$var(wim_domain)");
>
> $uac_req(ruri)="sip:" + $var(wim_to) + "@" + $var(wim_domain);
> --
>
> This results in $uac_req(ruri) being set as.
>
> sip:"49"@"sip.mydomain.com"
>
>  Which is obviously wrong and fails the transaction processing.
>
>  Is there any way to get rid of these quotes from json strings? One
> possible way i can think of is using string transformation "s.substr", but
> there are a lot of json strings i have in config and it is too hectic to
> transform all of them. Is there any easier way out of this?
>
>  Thank you.
>
>
>
>
> ___
> 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 Mierlahttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
>
>
> ___
> 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