Hi,
when using sip.js websocket client i got this sequence
REGISTER sip:mysip.com SIP/2.0
Via: SIP/2.0/WSS 1pds95dm7slp.invalid;branch=z9hG4bK1393343
Max-Forwards: 70
To: <sip:1096@mysip.com>
From: <sip:1096@mysip.com>;tag=99i9ka9951
Call-ID: 1agj9ujebn5k2006qvosg7
CSeq: 82 REGISTER
Authorization: Digest algorithm=MD5, username="1096", realm="mysip.com", nonce="VHiXFFR4legH+zdoSro9zybQQclvFtcR", uri="sip:mysip.com", response="2d9843d09d94f295d0ebfa323233783c"
Contact: <sip:n7o5lk6u@1pds95dm7slp.invalid;transport=ws>;reg-id=1;+sip.instance="<urn:uuid:d68a53c4-37e7-4f5c-87f2-68d7cca14b93>";expires=600
Allow: ACK,CANCEL,BYE,OPTIONS,INFO,NOTIFY,INVITE,MESSAGE
Supported: path,gruu,100rel,outbound
User-Agent: SIP.js/0.6.3
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/WSS sg6h3at19h29.invalid;branch=z9hG4bK4876180;rport=65377;received=X.X.X.X
To: <sip:1096@mysip.com>;tag=78e678a5264e254e660865f4df24edf3.e69b
From: <sip:1096@mysip.com>;tag=j39lvle827
Call-ID: c0ofajiui4u2vtem662rdh
CSeq: 86 REGISTER
Contact: <sip:8umlvk34@sg6h3at19h29.invalid;transport=ws>;expires=600;pub-gruu="sip:1096@mysip.com;gr=urn:uuid:876de649-281f-4f7f-9a3e-7b2a7e11f3cc";temp-gruu="sip:uloc-5478bf26-4504-1-7fd4326@mysip.com;gr";+sip.instance="<urn:uuid:876de649-281f-4f7f-9a3e-7b2a7e11f3cc>";reg-id=1
Content-Length: 0
INVITE sip:2134@mysip.com SIP/2.0
Via: SIP/2.0/WSS sg6h3at19h29.invalid;branch=z9hG4bK1752419
Max-Forwards: 70
To: <sip:2134@mysip.com>
From: <sip:1096@mysip.com>;tag=6vii55tc02
Call-ID: i3hndju3tgsge7ctnvo2
CSeq: 4782 INVITE
Contact: <sip:1096@mysip.com;gr=urn:uuid:876de649-281f-4f7f-9a3e-7b2a7e11f3cc>
Allow: ACK,CANCEL,BYE,OPTIONS,INFO,NOTIFY,INVITE,MESSAGE
Content-Type: application/sdp
Supported: gruu,100rel,outbound
User-Agent: SIP.js/0.6.3
Content-Length: 2585
i issued kamctl show to view the registered user
AOR:: 1096(a)mysip.com
Contact:: sip:8umlvk34@sg6h3at19h29.invalid;transport=ws Q=
Expires:: 177
Callid:: c0ofajiui4u2vtem662rdh
Cseq:: 86
User-agent:: SIP.js/0.6.3
Received:: sip:X.X.X.X:65377;transport=WS
State:: CS_SYNC
Flags:: 0
Cflag:: 6
Socket:: tls:Y.Y.Y.Y:8443
Methods:: 927
Ruid:: uloc-5478bf26-4504-1
Instance:: <urn:uuid:876de649-281f-4f7f-9a3e-7b2a7e11f3cc>
Reg-Id:: 1
Last-Keepalive:: 1417200609
Last-Modified:: 1417200609
what is the best way to check if the INVITE is from a registered user and how to get usrloc properties for the registered user ?
i tried this
reg_fetch_contacts("location", "$fu", "caller");
$var(i) = 0;
$var(found) = 0;
$var(contact) = $(ct{nameaddr.uri});
while($var(found) == 0 && $var(i) < $(ulc(caller=>count)))
{
xlog("L_INFO", "$ci|log| checking against $(ulc(caller=>addr)[$var(i)])");
if($var(contact) == $(ulc(caller=>addr)[$var(i)]))
{
$var(found) = 1;
$var(caller_idx) = $var(i);
$var(userlocid) = $(ulc(caller=>ruid)[$var(i)]);
}
else
$var(i) = $var(i) + 1;
}
the problem i see is that the INVITE Contact doesn't match the one registered.
is this a problem with sip.js or am i missing something in kamailio.cfg or should kamailio save the contact info as sip.js is sending?
Thank you
Hello,
it is the kernel scheduler that selects the process and the core to
execute it, not something that kamailio enforces. What operating system
and cpu type do you have?
Cheers,
Daniel
On 27/11/14 02:22, pengxuejin(a)gangbeng.com wrote:
> Dear Kamailio Developers:
> Hi.
> I have some questions about kamailio, and want to gain some
> suggestions from you.
> 1、The 4 UDP child processes are using system resources(CPU、
> memory), but they are using only one CPU core(I use 8 core CPU). Why?
> 2、The ablity of handling the Concurrency is alike, no matter how
> many UDP child processes I use. Why? And what's the effection of the
> other UDP child processes?
>
> ------------------------------------------------------------------------
>
> *彭学金 *
>
> *186-2708-0286 *
>
> *技术部 开发工程师*
>
> * *
>
> *武汉九午科技有限公司*
>
> *武汉市洪山区光谷大道国际企业中心锦丰楼A座405室*
>
> *Tel:(027)87108832*
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)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
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#478 - CRASH: segfault in parser/parse_via.c
User who did this - Nuno Miguel Reis (nmreis)
----------
Hi Daniel.
Sorry for the big delay, but I had to find time to rollback my production environment because between the bug report time and your answer I did an upgrade.
Please find the requested info attached.
Thanks.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=478#comment1719
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Nuno Miguel Reis (nmreis)
Attached to Project - sip-router
Summary - core dump not working properly in CentOS 7 (and most probably in Fedora > 15)
Task Type - Bug Report
Category - Core
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - I've just did a couple of tests and verifyied that kamailio only generates a core dump if
kernel.core_pattern is set with a full path:
eg:
kernel.core_pattern = /var/run/kamailio/core.%e.sig%s.%p
if kernel.core_pattern is only:
kernel.core_pattern = core.%e.sig%s.%p
kamailio simply doesn't generate a core.
I'm using systemd to launch kamailio with LimitCORE=infinity set which should be enough to get the cores.
This is my current kamailio.service
<code>[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
After=syslog.target network.target postgresql-9.3.service systemd-tmpfiles-setup.service
[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/kamailio
PIDFile=/var/run//kamailio/kamailio.pid
ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid $OPTIONS
WorkingDirectory=/var/run/kamailio
TimeoutSec=45s
Restart=always
LimitCORE=infinity
[Install]
WantedBy=multi-user.target</code>
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=500
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#499 - add support to auth_db to validate source IP address
User who did this - Daniel-Constantin Mierla (miconda)
----------
The functionality can be achieved by loading the ip_address value using load_credentials and then use functions from ipops module inside config file.
That as a note, otherwise I don't have anything against accepting the patch if people find it useful and simplifying the config. Perhaps we should discuss this on the sr-dev mailing list, because we may want to think of some extra additions with this occasion (e.g., a column for account status: active/inactive). Also, it could be the opportunity to decide the removal of unused columns rpid and email address.
Back to you patch, I think that would be useful to have support for sub-network address match as well -- a.b.c.d/nm -- this can be added if the patch if found useful to be accepted by the community.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=499#comment1718
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: a6d1a6ef65dc6e7a356ada2c71d95e04ff13f2b9
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a6d1a6e…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Wed Dec 3 22:07:15 2014 +0100
dialplan Update documentation
---
modules/dialplan/README | 44 +++++++++++++++++++------------
modules/dialplan/doc/dialplan_admin.xml | 37 +++++++++++++++++++-------
2 files changed, 54 insertions(+), 27 deletions(-)
diff --git a/modules/dialplan/README b/modules/dialplan/README
index d1025f5..08ee011 100644
--- a/modules/dialplan/README
+++ b/modules/dialplan/README
@@ -130,30 +130,39 @@ Chapter 1. Admin Guide
This module implements generic string translations based on matching
and replacement rules. It can be used to manipulate the request URI or
- a PV and to translate to a new format/value.
+ a PV and to translate it to a new format/value. Dialplan can also be
+ used to match a given URI and retrieve a set of attributes based on the
+ match. It is a very flexible module that can be used to handle call
+ routing, prefix rewrites and much more.
2. How it works
- At startup, the module will load a set of transformation rules from a
- database. Rules are grouped into dialplans. Every database row will be
- stored in memory as a translation rule. Each rule will describe how the
- matching will be made, how the input value will be modified and which
- attributes that will be set for the matching transformation.
+ At startup the module will load a set of matching and transformation
+ rules from a database. Rules are grouped into dialplans. Every database
+ row will be stored in memory as a dialplan rule. Each rule will
+ describe how the matching will be made, how the input value will be
+ modified and which attributes that will be set for the matching
+ transformation.
The module expects an input value which will be matched against a rule
by using regular expressions (see 'man pcresyntax' for syntax), string
or fnmatch (see 'man fnmatch') matching. Overlapping matching
- expressions can be controlled via priorities. Once a rule is matched,
- the defined transformation (if any) is applied and the result is
- returned as output value. Also, if any string attribute is associated
- to the rule, this will be returned to the script along with the output
- value. This can be used to identify the used rule.
+ expressions can be controlled via priorities. One priority can have
+ multiple dialplan entries. Priorities need not be numbered with
+ consecutive numbers. The next higher priority will be used after trying
+ to match all entries in one priority.
+
+ Once a rule is matched, the defined transformation (if any) is applied
+ and the result is returned as output value. Also, if any string
+ attribute is associated to the rule, this will be returned to the
+ script along with the output value. This can be used to identify the
+ used rule.
The first matching rule will be processed.
3. Dialplan use cases
- The module can be used to implement multiple dialplans - do to
+ The module can be used to implement multiple dialplans - to do
auto-completion of dialed numbers (like national to international), to
convert generic numbers to specific numbers (like for emergency
numbers).
@@ -489,7 +498,7 @@ xlog("translated to var $var(y) \n");
dpid: 1
pr: 1
match_op: 1
-match_exp: ^0([1-9][0-9]+)$
+match_exp: ^0[1-9][0-9]+$
match_len: 0
subst_exp: ^0([1-9][0-9]+)$
repl_exp: 0049\1
@@ -498,7 +507,7 @@ attrs: de
dpid: 1
pr: 2
match_op: 1
-match_exp: ^0([1-9][0-9]+)$
+match_exp: ^0[1-9][0-9]+$
match_len: 0
subst_exp: ^0(.+)$
repl_exp: $var(prefix)\1
@@ -512,9 +521,10 @@ attrs: xyz
private variables ($var(...)) and AVPs with static name are among those
that are safe to use in replacement expressions.
- The match_op field specify matching operator, valid values: 0 - string
- comparison; 1 - regular expression matching (pcre); 2 - fnmatch
- (shell-like pattern) matching.
+ The match_op field specify matching operator, valid values:
+ * 0 - string comparison;
+ * 1 - regular expression matching (pcre);
+ * 2 - fnmatch (shell-like pattern) matching.
Chapter 2. Developer's Guide
diff --git a/modules/dialplan/doc/dialplan_admin.xml b/modules/dialplan/doc/dialplan_admin.xml
index 21b31d2..6b07a2d 100644
--- a/modules/dialplan/doc/dialplan_admin.xml
+++ b/modules/dialplan/doc/dialplan_admin.xml
@@ -18,16 +18,19 @@
<para>
This module implements generic string translations based on matching and
replacement rules. It can be used to manipulate the request URI or a PV and to
- translate to a new format/value.
+ translate it to a new format/value. Dialplan can also be used to match
+ a given URI and retrieve a set of attributes based on the match. It is a very
+ flexible module that can be used to handle call routing, prefix rewrites
+ and much more.
</para>
</section>
<section id="dialplan.introduction">
<title>How it works</title>
<para>
- At startup, the module will load a set of transformation rules from a
+ At startup the module will load a set of matching and transformation rules from a
database. Rules are grouped into dialplans. Every database row will be
- stored in memory as a translation rule. Each rule will describe how the
+ stored in memory as a dialplan rule. Each rule will describe how the
matching will be made, how the input value will be modified and which
attributes that will be set for the matching transformation.
</para>
@@ -35,7 +38,12 @@
The module expects an input value which will be matched against a rule
by using regular expressions (see 'man pcresyntax' for syntax), string
or fnmatch (see 'man fnmatch') matching. Overlapping matching expressions
- can be controlled via priorities.
+ can be controlled via priorities. One priority can have multiple
+ dialplan entries. Priorities need not be numbered with consecutive
+ numbers. The next higher priority will be used after trying to match all
+ entries in one priority.
+ </para>
+ <para>
Once a rule is matched, the defined transformation (if any) is applied and
the result is returned as output value. Also, if any string attribute is
associated to the rule, this will be returned to the script along with
@@ -49,7 +57,7 @@
<section id="dialplan.usecases">
<title>Dialplan use cases</title>
<para>
- The module can be used to implement multiple dialplans - do to
+ The module can be used to implement multiple dialplans - to do
auto-completion of dialed numbers (like national to international),
to convert generic numbers to specific numbers (like for emergency numbers).
</para>
@@ -61,8 +69,8 @@
<para>
Non-SIP string translation can be implemented - like converting country
names from all possible formats to a canonical format:
- (UK, England, United Kingdom) -> GB.
- </para>
+ <emphasis>(UK, England, United Kingdom) -> GB.
+ </emphasis></para>
<para>
Any other string-base translation or detection for whatever other purposes.
</para>
@@ -610,7 +618,7 @@ xlog("translated to var $var(y) \n");
dpid: 1
pr: 1
match_op: 1
-match_exp: ^0([1-9][0-9]+)$
+match_exp: ^0[1-9][0-9]+$
match_len: 0
subst_exp: ^0([1-9][0-9]+)$
repl_exp: 0049\1
@@ -619,7 +627,7 @@ attrs: de
dpid: 1
pr: 2
match_op: 1
-match_exp: ^0([1-9][0-9]+)$
+match_exp: ^0[1-9][0-9]+$
match_len: 0
subst_exp: ^0(.+)$
repl_exp: $var(prefix)\1
@@ -637,8 +645,17 @@ attrs: xyz
</para>
<para>
The match_op field specify matching operator, valid values:
- 0 - string comparison; 1 - regular expression matching (pcre);
+ <itemizedlist>
+ <listitem>
+ 0 - string comparison;
+ </listitem>
+ <listitem>
+ 1 - regular expression matching (pcre);
+ </listitem>
+ <listitem>
2 - fnmatch (shell-like pattern) matching.
+ </listitem>
+ </itemizedlist>
</para>
</section>
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#499 - add support to auth_db to validate source IP address
User who did this - Emmanuel Schmidbauer (eschmidbauer)
----------
Attached updated patch for added crash protection to make sure ip_addr_t *ipa is not NULL
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=499#comment1717
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.