Re: [SR-Users] [Kamailio-Business] Kamailio v5.6.0 Released - new major version is out

2022-05-23 Thread Samuel F .
Great work and many thanks to all the stellar devs!

// Samuel

From: sr-users  on behalf of Olle E. 
Johansson 
Sent: Monday, May 23, 2022 15:42
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] [Kamailio-Business] Kamailio v5.6.0 Released - new 
major version is out



> On 23 May 2022, at 15:00, Daniel-Constantin Mierla  wrote:
>
> Kamailio v5.6.0 is out – it comes with 7 new modules and a considerable
> set of improvements touching again more than 90 existing modules.

A big thank you to all developers! Great work!

/O
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-usersdata=05%7C01%7C%7Ca337d24b81594d9d432108da3cc2535c%7C84df9e7fe9f640afb435%7C1%7C0%7C637889102571311094%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=xtrKuEBnJVD6VVtF9b4sMJSw77XcmO0AUdI%2FqizKpqg%3Dreserved=0
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio books

2019-03-19 Thread Samuel F .
This book is excellent as well: 
http://www.asipto.com/index.php/kamailio-admin-book/
Kamailio Admin Book | 
ASIPTO
Book Title: SIP Routing with Kamailio Authors: Daniel-Constantin Mierla and 
Elena-Ramona Modroiu Status: writing the book was finished in January 2015, 
being now in the process to review the content for language errors. Purchasing: 
the PDF file with the draft of the book can be now bought via Paypal at a price 
of 51Euro. If you buy the draft, you will receive the PDF with the final 
version of ...
www.asipto.com



From: sr-users  on behalf of Paul Smith 

Sent: Tuesday, March 19, 2019 13:20
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio books

Hi Kevin,
I have found the training courses 
https://www.asipto.com/sw/kamailio-advanced-training/
 and annual conference 
https://www.kamailioworld.com/k07/
 to be great places to learn and explore kamailio.  There are some very helpful 
and knowledgable experts at those events.

The wiki and forums also have masses of information and lots of helpful people 
with insight to solve particular challenges.  But getting help to build your 
solution require a certain amount of getting the right search.

Your question reminded me of the fun we had introducing a multi-tenant farm of 
asterisk servers with working BLF’s.  Call parking and directed pickup were 
particularly fun… making sure to hit the same PBX with the retrieving call leg.

Good luck

Paul Smith
Voxbit.net


This email and any attachment, is confidential. If you have received this in 
error, please delete it from your system, do not use or disclose the 
information in any way, and notify me immediately. The contents of this message 
may contain personal views which are not the views of Clarity Telecom, unless 
specifically stated.




On 19 Mar 2019, at 10:17, Kevin Olbrich mailto:k...@sv01.de>> 
wrote:

Hi!

Are there any Kamailio books?
I am still struggling with Kamailio on scenarios that need more then
REGISTER-offloading (like Kamailio cluster with BLF, custom NOTIFY,
DMQ, etc.).

Online docs are very limited or use Kamailio as a single tenant PBX.
What I need is a high available and high performance proxy in front of
asterisk, capable of handling thousands of tenants (each with BLF
working).
I am perfectly fine with building a solution for several months but I
am still unable to understand everything from the docs.

Where do the PROs and service companies get their knowledge from?

Kind regards
Kevin

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RFC: rating - ranking system for community

2019-03-14 Thread Samuel F .
Agreed Alex, I think a cookbook with recommendations would be very useful to 
help get people started.

In the documentation, perhaps if there are a lot of stale/unused modules they 
could be moved to a different section as well or flagged with an icon so people 
know they are not a preferred choice for new/modern setups.

I suppose there are a number of different areas where a lot of people make 
decisions where one could just offer simple guidance such as:

Database: MySQL

Failover: Heartbeat

Kemi: app_python3

RTP: RTPEngine

I understand that not everyone would agree but would save new users a lot of 
work in comparing and trying to figure out what to choose for new projects. 
These recommendations would of course change with time as things evolve.

Regarding the rating system, not sure how to capture meaningful data that 
conveys the reality from the community. I think some of the veterans in the 
project who know what people use would provide more meaningful insight rather 
than a click drive vote or similar.

// Samuel





From: sr-users  on behalf of Alex Balashov 

Sent: Thursday, March 14, 2019 14:19
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] RFC: rating - ranking system for community

By way of further thought:

Perhaps a component-orientated view is not the correct one here. It
almost sounds like what is being sought is a kind of "cookbook of
Kamailio patterns"[1], if you like. This answers a lot of questions
that also capture preferences about third-party FOSS componentry, such
as:

"Should I do HA failover with VRRP or Heartbeat?"

"Is Kamailio + PostgreSQL a stable combination for a high-volume
registrar?"

"Are there pitfalls to DMQ dialog replication?"

"What is the best way to build a load balancer with failover and gateway
monitoring?"

etc.

-- Alex

[1] We use the term "cookbook" differently in this project, but this
usage is closer to the commonplace conventional one.

On Thu, Mar 14, 2019 at 08:35:15AM -0400, Alex Balashov wrote:

> Hi,
>
> A few off-the-cuff thoughts, in no particular order:
>
> 1. Kamailio does have hundreds of modules of all kinds, and some sort of
> guide for which ones to use when, or some other schema which would serve
> to provide some conceptual organisation for the modules, is probably a
> desirable documentation objective.
>
> 2. I am nevertheless wary of any system which purports to "rank" or
> "rate" components.
>
> One obvious reason is that popularity isn't a very good metric for
> whether something is appropriate for or applicable to a particular
> purpose. There is a reason the expression "degenerated into a popularity
> contest" exists in our industry. This is all the more true given
> (arguably) Kamailio's somewhat unique status as a "toolkit" or a
> "framework" for building certain kinds of systems and services; it means
> some of the most useful components in many scenarios might be either
> obscure, or so broadly general that a highly fact-dependent /
> situation-specific logic of its relationship to a given scenario is hard
> to tease out. Would you "recommend" the TM module? Is it widely used?
> :-)
>
> This goes to another, more general problem with ranking components, and
> that is that the module ecosystem is a wildly eclectic bag of things of
> very different scope. Without a more rigid preconceived taxonomy to
> create the right mental categories, meaningful comparisons between
> modules are difficult to draw, as would be theoretically required for
> some kind of ranking or any system which purports to raise the profile
> of some components over others.
>
> Kamailio modules fall into at least a few identifiable categories--this
> is just a half-hearted improvisational stab at it, and probably not very
> nuanced:
>
> a. "Essential" / "core" - while these are technically modules, their
> feature set is so universal and critical to most non-trivial Kamailio
> implementations that they are substantially equivalent to "core"
> functionality. Modules like 'rr', 'tm' and 'pv' clearly fall into this
> category. One cannot really do anything worthy of remark with Kamailio
> without them, excluding some exotic cases.
>
> b. Broad and holistic systems - complete categories of broad SIP server
> functionality implemented in more or less one module (usrloc +
> registrar, presence/pua, auth*, dispatcher, etc.);
>
> c. Dependencies of other higher-level modules - the relationship of
> 'usrloc' to 'registrar' is suitably described by this; if you're using
> 'usrloc', you're almost certainly using 'registrar', and there are
> really no meaningful standalone uses of 'usrloc', nor does it expose any
> route script functions. At the same time, the list of things one may
> wish to interrogate via RPC/management interfaces are split between
> 'usrloc' and 'registrar' in ways that make sense to a programmer but
> which users might find arbitrary. In any case, do you give 'usrloc' a
> "thumbs up"? What does 

Re: [SR-Users] Performance tests of native vs. kemi scripting for SIP routing

2018-12-11 Thread Samuel F .
Thanks Daniel, very interesting!

We are running four production instances with Kemi Python v2 and will launch 
two more instances starting next month on Python v3.

So far Python v2 has worked flawlessly!

As a side note, would be great to have a official recommended language for KEMI 
so other devs can share modules/codes/tutorials etc.. having too many 
languages, in my opinion, reduces the benefit a community can provide.

All the best,

Samuel

From: sr-users  on behalf of 
Daniel-Constantin Mierla 
Sent: Tuesday, December 11, 2018 09:30
To: Kamailio (SER) - Users Mailing List; Kamailio (SER) - Devel Mailing List; 
busin...@lists.kamailio.org
Subject: [SR-Users] Performance tests of native vs. kemi scripting for SIP 
routing

Hello,

during the preparations of Kamailio v5.2.0 and the days after, I got the
time to run some tests in order to see the differences of running
similar SIP routing logic when using native configuration file scripting
versus KEMI languages. So far I did it for Lua and Python (v2),
hopefully I will find time to run also for the rest of supported
scripting languages: Python (v3), JavaScript, Ruby, Squrrel and Lua with
LuaJIT.

The pleasant surprise was to see that this time, the results of using
Python were similar to native scripting and Lua. When I did some basic
tests during development of KEMI, using Python seemed slower.

More details about how tests were performed, the config files/scripts,
used tools and results were published in a wiki page:

  - 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fwiki%2Fkemi%2Fperformance-tests%2F5.2.xdata=02%7C01%7C%7Ca073cd176b784611f1a908d65f434965%7C84df9e7fe9f640afb435%7C1%7C0%7C636801139925397334sdata=GdUdX%2BjUgpJydYvBxP%2BChGbzD4qCJK%2BWJ7fFPNEYeOs%3Dreserved=0

A news article with further details is on kamailio website:

  -
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fw%2F2018%2F12%2Fperformance-tests-for-kemi-scripting-languages%2Fdata=02%7C01%7C%7Ca073cd176b784611f1a908d65f434965%7C84df9e7fe9f640afb435%7C1%7C0%7C636801139925397334sdata=tYxvflkw9hFnVE%2BLe1wqrvvWQ7Nif0E%2F4NeT4hAdTSM%3Dreserved=0

Should anyhow of you have some time to run the tests in own environment
and share the results (on sr-users mailing list), it would be
appreciated and would help to validate the tests and discover if I
forgot something in any of the configs. Note that the goal of the tests
is not measuring the capacity of Kamailio in your environment, but see
the differences between using different scripting languages in the same
environment (so you can do the tests on raspberry pi, if you like).

I would also be interested in knowing if you are using Kamailio with
KEMI or you are planning to, if yes, which scripting language. If
already doing it, is already in production? These are useful to plan
where to allocate developer resources in the future...

And to start, I am running Kamailio with Lua (4 instances) and Python
(1) scripting in production deployments, with very good results so far.

Cheers,
Daniel

--
Daniel-Constantin Mierla -- 
https://nam04.safelinks.protection.outlook.com/?url=www.asipto.comdata=02%7C01%7C%7Ca073cd176b784611f1a908d65f434965%7C84df9e7fe9f640afb435%7C1%7C0%7C636801139925397334sdata=vn1TxHaSsjR3gbvq5Gpw53%2BvJigcdrefxvEy163La8g%3Dreserved=0
https://nam04.safelinks.protection.outlook.com/?url=www.twitter.com%2Fmicondadata=02%7C01%7C%7Ca073cd176b784611f1a908d65f434965%7C84df9e7fe9f640afb435%7C1%7C0%7C636801139925397334sdata=30E7Ww%2BigG3Rzbwi4j%2BIqjF4TpUqfnYYMspLhPQAvP0%3Dreserved=0
 -- 
https://nam04.safelinks.protection.outlook.com/?url=www.linkedin.com%2Fin%2Fmicondadata=02%7C01%7C%7Ca073cd176b784611f1a908d65f434965%7C84df9e7fe9f640afb435%7C1%7C0%7C636801139925397334sdata=XEjKBjIq9eANmHr8KeEQXlB1HLR8Tn%2BVwoNtkMz2G%2Fg%3Dreserved=0
Kamailio World Conference - May 6-8, 2019 -- 
https://nam04.safelinks.protection.outlook.com/?url=www.kamailioworld.comdata=02%7C01%7C%7Ca073cd176b784611f1a908d65f434965%7C84df9e7fe9f640afb435%7C1%7C0%7C636801139925397334sdata=k5%2BSGddS3uWGMX7%2Fnyt13EBNrFcqqRYU%2FggS0EapwEw%3Dreserved=0
Kamailio Advanced Training -- 
https://nam04.safelinks.protection.outlook.com/?url=www.asipto.comdata=02%7C01%7C%7Ca073cd176b784611f1a908d65f434965%7C84df9e7fe9f640afb435%7C1%7C0%7C636801139925397334sdata=vn1TxHaSsjR3gbvq5Gpw53%2BvJigcdrefxvEy163La8g%3Dreserved=0


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-usersdata=02%7C01%7C%7Ca073cd176b784611f1a908d65f434965%7C84df9e7fe9f640afb435%7C1%7C0%7C636801139925397334sdata=VuoEwq7PaEC3BYsGPgaRuXiLvJ%2B%2FTGi790ht1E9wvdY%3Dreserved=0
___

Re: [SR-Users] Automating installation

2018-11-30 Thread Samuel F .
We run Ansible with great success. We use Ansible to provision the server and 
keep all Kamailio related code in a git-repo. Ansible has two tasks, (1) to 
provision the server according to business security standards and all sub-deps, 
and (2) to update the server when new code is commited to the repo.

On new code, it would then setup all dirs, restart Kamailio etc as needed.

We use the same logic and setup for Asterisk and have been doing that in 
production for a few years without any issues whatsoever.

Cheers,
Samuel

From: sr-users  on behalf of 
Daniel-Constantin Mierla 
Sent: Friday, November 30, 2018 08:26
To: Kamailio (SER) - Users Mailing List; Alex Balashov
Subject: Re: [SR-Users] Automating installation


On 29.11.18 22:53, Alex Balashov wrote:
> On Thu, Nov 29, 2018 at 01:50:55PM -0800, Joel Serrano wrote:
>
>> If it was me, I would handle everything with ansible, but that is just
>> my tool of preference.
> I'll add a vote for SaltStack, my preferred tool of choice.

Did you start with it and stayed with, or you compared and found some
benefits vs. others like ansible, puppet, ...?

I started with ansible and happy with it, when I looked around the
reasons were that python was installed anyhow by default in debian, then
the target system didn't need to have any server/agent app deployed before.

Cheers,
Daniel

--
Daniel-Constantin Mierla -- 
https://nam03.safelinks.protection.outlook.com/?url=www.asipto.comdata=02%7C01%7C%7Cbddcc5fbd0df470749ef08d656954101%7C84df9e7fe9f640afb435%7C1%7C0%7C636791596364449003sdata=i%2BrWG9MKhzZ1FQgaVaj7dbyEdTeGd3xWy3Lkb2%2FcYzE%3Dreserved=0
https://nam03.safelinks.protection.outlook.com/?url=www.twitter.com%2Fmicondadata=02%7C01%7C%7Cbddcc5fbd0df470749ef08d656954101%7C84df9e7fe9f640afb435%7C1%7C0%7C636791596364449003sdata=fODOG0JM6gwXIneoxel2QVy5PGAmbTYFgGk68ctOPdU%3Dreserved=0
 -- 
https://nam03.safelinks.protection.outlook.com/?url=www.linkedin.com%2Fin%2Fmicondadata=02%7C01%7C%7Cbddcc5fbd0df470749ef08d656954101%7C84df9e7fe9f640afb435%7C1%7C0%7C636791596364449003sdata=CHA9TnvLV5CKkWJNDwntmo7w6bn%2BsB%2F6RbjpxT1%2BN4w%3Dreserved=0
Kamailio World Conference -- 
https://nam03.safelinks.protection.outlook.com/?url=www.kamailioworld.comdata=02%7C01%7C%7Cbddcc5fbd0df470749ef08d656954101%7C84df9e7fe9f640afb435%7C1%7C0%7C636791596364449003sdata=ac0qNl3hlv2MMSMd7t82UCLLDpPzvRD2iFmxMoxdC5M%3Dreserved=0
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- 
https://nam03.safelinks.protection.outlook.com/?url=www.asipto.comdata=02%7C01%7C%7Cbddcc5fbd0df470749ef08d656954101%7C84df9e7fe9f640afb435%7C1%7C0%7C636791596364449003sdata=i%2BrWG9MKhzZ1FQgaVaj7dbyEdTeGd3xWy3Lkb2%2FcYzE%3Dreserved=0


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-usersdata=02%7C01%7C%7Cbddcc5fbd0df470749ef08d656954101%7C84df9e7fe9f640afb435%7C1%7C0%7C636791596364449003sdata=hcYbPWDj2JTtRPI6pBXUQkdlOBgDGadM1sUVkErqLds%3Dreserved=0
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio v5.2.0 Released - new major version is out

2018-11-30 Thread Samuel F .
Great work everyone on this release and thank you Daniel for pushing the 
project forward and handling the releases!

All the best, Samuel

From: sr-users  on behalf of 
Daniel-Constantin Mierla 
Sent: Wednesday, November 28, 2018 14:18
To: Kamailio (SER) - Users Mailing List; Kamailio (SER) - Devel Mailing List; 
busin...@lists.kamailio.org
Subject: [SR-Users] Kamailio v5.2.0 Released - new major version is out

Kamailio v5.2.0 is out – it comes with 6 new modules and a consistent
group of improvements touching more than 100 existing modules.

You can read detailed release notes at:

   * 
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fw%2Fkamailio-v5-2-0-release-notes%2Fdata=02%7C01%7C%7Ca980a6a51598440aaa5c08d655343ea8%7C84df9e7fe9f640afb435%7C1%7C0%7C636790080202727349sdata=TVmiMhMntowU5VVPJhS7ptvMVBdbPTGq8uj8kgWtaCo%3Dreserved=0

Many thanks to all developers and community members that made possible
this release.

v5.2.0 brings more flexibility and optimizations for KEMI interpreters
(including two new interpreters for Python3 and Ruby), major
enhancements to load balancer and tls implementations, new variables and
lots of other new features.

Enjoy Kamailio v5.2.0!

Thank you for flying Kamailio!
Daniel

--
Daniel-Constantin Mierla
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.comdata=02%7C01%7C%7Ca980a6a51598440aaa5c08d655343ea8%7C84df9e7fe9f640afb435%7C1%7C0%7C636790080202727349sdata=izRJJlPFUa97GK8efXo19re1Lnu1Y6E%2B4Ahy5SxhYHc%3Dreserved=0
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftwitter.com%2F%23!%2Fmicondadata=02%7C01%7C%7Ca980a6a51598440aaa5c08d655343ea8%7C84df9e7fe9f640afb435%7C1%7C0%7C636790080202727349sdata=W94Ju4kgKCzf0F1dGFvVzp8nL2NNcAMvQFR%2FSdGz1Gg%3Dreserved=0
 - 
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fmicondadata=02%7C01%7C%7Ca980a6a51598440aaa5c08d655343ea8%7C84df9e7fe9f640afb435%7C1%7C0%7C636790080202727349sdata=EY7%2BVhBxd8%2FRHSuJqcK4FuANUsRfzYGblslJjqMsvvo%3Dreserved=0
Kamailio World Conference 2019 - 
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kamailioworld.comdata=02%7C01%7C%7Ca980a6a51598440aaa5c08d655343ea8%7C84df9e7fe9f640afb435%7C1%7C0%7C636790080202727349sdata=yzTjg1n2j9V8z5BenareBz98rXWAH0nnjq68x%2BI6CtM%3Dreserved=0


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-usersdata=02%7C01%7C%7Ca980a6a51598440aaa5c08d655343ea8%7C84df9e7fe9f640afb435%7C1%7C0%7C636790080202727349sdata=fUI9oVt%2Bkb10XrgzWq2EtJjPIA1YqDxSrON1M6ozyVM%3Dreserved=0
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamcli v1.1.0 released

2018-10-16 Thread Samuel F .
Alright, I was more thinking about it from a newcomer perspective. When one is 
evaluating Kamailio, it will be difficult to understand what to use. 
Documentations and tutorials everywhere will be messy since all of them will 
use different tools.

Also, from a development perspective, is it not a lot to maintain 3 CLI tools?

If one could replace the other two, from my limited understanding, I think it 
would be great to consider deprecating the older ones when/if kamcli has full 
feature parity with the others.

Cheers, Samuel

From: Daniel-Constantin Mierla 
Sent: Tuesday, October 16, 2018 19:43
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] kamcli v1.1.0 released


None of them is deprecated at this moment.


Both kamctl and kamcli can execute rpc commands, but over jsonrpc (relying on 
jsonrpcs module), not over binrpc (which relies on ctl module) like kamcmd. The 
features in kamcmd not existing in the other are tab completion for rpc command 
names and session like connection (can keep the history of rpc commands in the 
same session).

Not sure, not being a Python developer, but for kamcli it might be easy to add 
tab completion for rpc command names, they can be retrieved via rpc command 
system.listMethods. Even more, kamcli relies on Python's Click framework and I 
read that it should be easy to add support for bash/shell completion of its 
arguments.

For the moment, I would say that kamctl/kamdbctl are enough if you work with a 
pretty standard kamailio deployment. Kamcli would be more useful if you need to 
extend the control tool with some customized functionality.

Cheers,
Daniel

On 16.10.18 19:17, Samuel F. wrote:
Thank you for the clarifications. It would be great to add that to the wiki.

It would also be nice to have a recommendation to users what tool should be 
used by newcomers, ie. what is currently the tool under development / not being 
deprecated.

From: Daniel-Constantin Mierla <mailto:mico...@gmail.com>
Sent: Tuesday, October 16, 2018 16:10
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] kamcli v1.1.0 released


Probably we should put this information somewhere in the wiki, for now here is 
sort of short presentation for each:


1) kamctl and kamdbctl are related, both being shell scripts (developed over 
the time from the old serctl/openserctl), the first is for interacting with a 
kamailio instances, the second is only for creating (and managing) the database 
structure needed by kamailio


2) kamcmd is practically only a binary rpc client that interacts with ctl 
module from kamailio -- this was developed by SER project during 2005-2008 
(when we were separately)


3) kamcli is written in Python and aims to become a (better) alternative to 
kamctl (and kamdbctl), with a plugin like architecture to extend it with new 
subcommands, more flexibility (e.g., modules/libs from python that can be used) 
and better error handling


For example, adding a new subcommand for kamcli means adding a python script 
inside commands folder. This comes handy if you have a kamailio installation 
using a custom database table that you access via sqlops -- with few lines of 
python script you can add a subcommand to manage its records 
(add/remove/update), doing validation of the values with python expressions to 
avoid inserting invalid records...


Another nice feature of kamcli vs kamctl is the ability to choose the format 
for output -- e.g., jsonrpc response can be presented in a compact form as yaml 
instead of json.


Overall, kamctl and kamdbctl are part of kamailio source tree and packaged 
inside kamailio debs/rpms, likely to stay so, no plans to replace/remove them, 
at least in the near future.


kamcli is a separate repository 
(https://github.com/kamailio/kamcli<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamcli=02%7C01%7C%7C1d439c61fd8c47e77b4608d6338ef3ee%7C84df9e7fe9f640afb435%7C1%7C0%7C636753086398692126=2w0mnossrFPeNe3NeeL4r3GXLFPQ1zEJH5OC7ODRuxM%3D=0>)
 and it is going to have its own deb/rpm file (actually Victor already built 
the deb package, available via deb.kamailio.org repositories).


Cheers,
Daniel

On 16.10.18 15:41, Samuel F. wrote:
Great and thank you!

Is there a writeup on how these tools differ and what one should use?

kamcmd
kamcli
kamctl
kamdbctl


From: sr-users 
<mailto:sr-users-boun...@lists.kamailio.org>
 on behalf of Daniel-Constantin Mierla 
<mailto:mico...@gmail.com>
Sent: Tuesday, October 16, 2018 10:03
To: Kamailio (SER) - Devel Mailing List; Kamailio (SER) - Users Mailing List; 
busin...@lists.kamailio.org<mailto:busin...@lists.kamailio.org>
Subject: [SR-Users] kamcli v1.1.0 released

Hello,

kamcli tool just got its first official release, a step forward in the
process of packaging it.

It is a command line

Re: [SR-Users] kamcli v1.1.0 released

2018-10-16 Thread Samuel F .
Thank you for the clarifications. It would be great to add that to the wiki.

It would also be nice to have a recommendation to users what tool should be 
used by newcomers, ie. what is currently the tool under development / not being 
deprecated.

From: Daniel-Constantin Mierla 
Sent: Tuesday, October 16, 2018 16:10
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] kamcli v1.1.0 released


Probably we should put this information somewhere in the wiki, for now here is 
sort of short presentation for each:


1) kamctl and kamdbctl are related, both being shell scripts (developed over 
the time from the old serctl/openserctl), the first is for interacting with a 
kamailio instances, the second is only for creating (and managing) the database 
structure needed by kamailio


2) kamcmd is practically only a binary rpc client that interacts with ctl 
module from kamailio -- this was developed by SER project during 2005-2008 
(when we were separately)


3) kamcli is written in Python and aims to become a (better) alternative to 
kamctl (and kamdbctl), with a plugin like architecture to extend it with new 
subcommands, more flexibility (e.g., modules/libs from python that can be used) 
and better error handling


For example, adding a new subcommand for kamcli means adding a python script 
inside commands folder. This comes handy if you have a kamailio installation 
using a custom database table that you access via sqlops -- with few lines of 
python script you can add a subcommand to manage its records 
(add/remove/update), doing validation of the values with python expressions to 
avoid inserting invalid records...


Another nice feature of kamcli vs kamctl is the ability to choose the format 
for output -- e.g., jsonrpc response can be presented in a compact form as yaml 
instead of json.


Overall, kamctl and kamdbctl are part of kamailio source tree and packaged 
inside kamailio debs/rpms, likely to stay so, no plans to replace/remove them, 
at least in the near future.


kamcli is a separate repository 
(https://github.com/kamailio/kamcli<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamcli=02%7C01%7C%7Ccdb543c36cb546860e0a08d633713150%7C84df9e7fe9f640afb435%7C1%7C0%7C636752958575255567=RjDndOalDltahHsQzW%2F33MI%2FwVvIByDd%2BeABYPtTXHQ%3D=0>)
 and it is going to have its own deb/rpm file (actually Victor already built 
the deb package, available via deb.kamailio.org repositories).


Cheers,
Daniel

On 16.10.18 15:41, Samuel F. wrote:
Great and thank you!

Is there a writeup on how these tools differ and what one should use?

kamcmd
kamcli
kamctl
kamdbctl


From: sr-users 
<mailto:sr-users-boun...@lists.kamailio.org>
 on behalf of Daniel-Constantin Mierla 
<mailto:mico...@gmail.com>
Sent: Tuesday, October 16, 2018 10:03
To: Kamailio (SER) - Devel Mailing List; Kamailio (SER) - Users Mailing List; 
busin...@lists.kamailio.org<mailto:busin...@lists.kamailio.org>
Subject: [SR-Users] kamcli v1.1.0 released

Hello,

kamcli tool just got its first official release, a step forward in the
process of packaging it.

It is a command line tool that aims to be a modern alternative to the
venerable kamctl, being written in Python and having already a large set
of implemented sub-commands, such as:

  * subscriber – manage SIP subscribers
  * ul – manage user location records
  * address – manage permissions address records
  * aliasdb – manage database aliases
  * db – manage kamailio database content
  * dialog – manage active calls (dialog)
  * dialplan – manage dialplan records
  * dispatcher – manage load balancer (dispatcher)
  * group – manage group membership records (acl)
  * moni – continuous refresh of the values for a list of statistics
  * mtree – manage memory trees (mtree)
  * ps – print the details for kamailio running processes
  * rpc – interact with kamailio via jsonrpc control commands (alias of
jsonrpc)
  * rpcmethods – return the list of available RPC methods (commands)
  * speeddial – manage speed dial records
  * srv – server management commands (sockets, aliases, …)
  * stats – get kamailio internal statistics
  * tls – management commands for TLS profiles and connections
  * uptime – print the uptime for kamailio instance

The news article for this release is available at:

  * 
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fw%2F2018%2F10%2Fkamcli-v1-1-0-released%2Fdata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=e%2B3CSXIFa1ka08nYWWm%2FhI9Jwu4QBOmZbyu3KQ5m64s%3Dreserved=0<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur04.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fwww.kamailio.org%252Fw%252F2018%252F10%252Fkamcli-v1-1-0-released%252F%26amp%3Bdata%3D02%257C01%257C%257Cfed7a

Re: [SR-Users] kamcli v1.1.0 released

2018-10-16 Thread Samuel F .
Great and thank you!

Is there a writeup on how these tools differ and what one should use?

kamcmd
kamcli
kamctl
kamdbctl


From: sr-users  on behalf of 
Daniel-Constantin Mierla 
Sent: Tuesday, October 16, 2018 10:03
To: Kamailio (SER) - Devel Mailing List; Kamailio (SER) - Users Mailing List; 
busin...@lists.kamailio.org
Subject: [SR-Users] kamcli v1.1.0 released

Hello,

kamcli tool just got its first official release, a step forward in the
process of packaging it.

It is a command line tool that aims to be a modern alternative to the
venerable kamctl, being written in Python and having already a large set
of implemented sub-commands, such as:

  * subscriber – manage SIP subscribers
  * ul – manage user location records
  * address – manage permissions address records
  * aliasdb – manage database aliases
  * db – manage kamailio database content
  * dialog – manage active calls (dialog)
  * dialplan – manage dialplan records
  * dispatcher – manage load balancer (dispatcher)
  * group – manage group membership records (acl)
  * moni – continuous refresh of the values for a list of statistics
  * mtree – manage memory trees (mtree)
  * ps – print the details for kamailio running processes
  * rpc – interact with kamailio via jsonrpc control commands (alias of
jsonrpc)
  * rpcmethods – return the list of available RPC methods (commands)
  * speeddial – manage speed dial records
  * srv – server management commands (sockets, aliases, …)
  * stats – get kamailio internal statistics
  * tls – management commands for TLS profiles and connections
  * uptime – print the uptime for kamailio instance

The news article for this release is available at:

  * 
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fw%2F2018%2F10%2Fkamcli-v1-1-0-released%2Fdata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=e%2B3CSXIFa1ka08nYWWm%2FhI9Jwu4QBOmZbyu3KQ5m64s%3Dreserved=0

The corresponding tag in the github repository being:

  * 
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamcli%2Freleases%2Ftag%2Fv1.1.0data=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=pJsL8bSsrFoOiOXhBH1RVtySl03Oa958ErORwhfGXbU%3Dreserved=0

How to install kamcli and examples of usage can be found at:

  * 
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamcli%2Fblob%2Fv1.1%2FREADME.mddata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=C5O%2FD7ahjlVmoNexzZ0yziOhSwR%2BNzP7UHeoSMZUtF0%3Dreserved=0

Cheers,
Daniel

--
Daniel-Constantin Mierla -- 
https://eur04.safelinks.protection.outlook.com/?url=www.asipto.comdata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=EV9GFvqdMpagr6xmbVexTWRP2PtLBA3FIwsoIBbNV9M%3Dreserved=0
https://eur04.safelinks.protection.outlook.com/?url=www.twitter.com%2Fmicondadata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=3nDVe8jZ9QYeNqVjj07CuIA2qkyzfoQtP8GPc8VwATY%3Dreserved=0
 -- 
https://eur04.safelinks.protection.outlook.com/?url=www.linkedin.com%2Fin%2Fmicondadata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=E%2F7Hxus5XiJJySRmORIGM0ZUyexzK7FNwgnzUkCbLRo%3Dreserved=0
Kamailio World Conference -- 
https://eur04.safelinks.protection.outlook.com/?url=www.kamailioworld.comdata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=nSzkZakzIo%2FoFXCPvV%2FqUCdXn90WAGlFmB%2B3lsh9Tlo%3Dreserved=0
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- 
https://eur04.safelinks.protection.outlook.com/?url=www.asipto.comdata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=EV9GFvqdMpagr6xmbVexTWRP2PtLBA3FIwsoIBbNV9M%3Dreserved=0


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-usersdata=02%7C01%7C%7Cfed7a25d71b24b0796fe08d6333e2a8d%7C84df9e7fe9f640afb435%7C1%7C0%7C636752739421479581sdata=ZIVuOB2ncShUziDuIh%2BoalsUNMLOl86ZyC6w%2F4Ip%2FSQ%3Dreserved=0
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] KEMI

2018-02-15 Thread Samuel F .
Yes, that is correct, they are manually documented.

// Samuel

From: sr-users  on behalf of Grant 
Bagdasarian 
Sent: Thursday, February 15, 2018 11:51
To: mico...@gmail.com; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] KEMI


Hi Daniel,



Thanks! Really nice script!

So, the other (md) files for core and pv functions are made manually?



Regards,

Grant



From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: donderdag 15 februari 2018 10:09
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] KEMI



To add a bit more ...

The list of the methods exported to KSR module in python (or any other KEMI 
scripting language) are listed at:

  - 
http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/

There is a python script contributed that scans the C code in kamailio and 
extracts the KEMI exports, maybe you can adjust it to generate code completion 
rules:

  - 
https://github.com/kamailio/kamailio-docs/blob/master/kamailio-kemi-framework/tools/generate_module_docs.py

Cheers,
Daniel

On 15.02.18 01:16, Anthony Alba wrote:

They are created in C code and not visible as .py files.



On Feb 15, 2018 12:03 AM, "Grant Bagdasarian" > 
wrote:

Hi,

Where would one get the files which are imported when creating a Kamailio file 
using python?
import Router.Logger as Logger
import KSR as KSR

Would be awesome if we could reference these and get code completion when using 
for instance Visual Studio code.
So, basically, I'm looking for the KSR.py and Router.py files, but I cannot 
find them.

Regards,
Grant

-Original Message-
From: sr-users 
[mailto:sr-users-boun...@lists.kamailio.org]
 On Behalf Of Daniel-Constantin Mierla
Sent: woensdag 7 februari 2018 16:02
To: Aleksandar Sosic >
Cc: Kamailio (SER) - Users Mailing List 
>
Subject: Re: [SR-Users] KEMI

I am more into Lua when it comes on doing something the native kamailio.cfg 
cannot do, that's because Lua has a decent range of extensions (external Lua 
libraries).

JavaScript was added for those that do not need a lot of external extensions, 
but want to have script reload.

Same for Squirrel, but that language is not so popular as JavaScript, however, 
there could be people liking it, being very minimal, thus expecting to need 
very low resources.

Anyhow, once implemented, a kemi interpreter module should not need much 
maintenance. New kemi functions will be exported directly from the other 
modules.

Cheers,
Daniel


On 07.02.18 14:12, Aleksandar Sosic wrote:
> Thanks Dan for the extensive answer!
>
> My last question then is what kemi language do you use personally? :D
>
> Kind regards,
> --
> Aleksandar Sosic
> mail: alex.so...@timenet.it
> skype: alex.sosic
> cell: +385 91 2505 146
>
>
> On Tue, Feb 6, 2018 at 8:44 PM, Daniel-Constantin Mierla
> > wrote:
>> The C code is the same for 99% of the KSR functions available either
>> in python or javascript (or the other kemi languages). Only KSR.pv
>> and KSR.x functions are implemented in the app_python or app_jsdt modules.
>> So if such a KSR function is broken, it is the same everywhere
>>
>> Probably KSR.pv can be moved in a common place, but KSR.x are
>> specific extensions for each interpreter, so it will stay in app_*.
>>
>> Then of course, it is a matter of the script interpreter, python vs
>> js ducktape, which are external project, we just bind to them. Also,
>> it is about the maintenance of app_python and app_jsdt. I am not the
>> developer of app_python and I cannot assert its state, I just added
>> the kemi enhancement. app_jsdt was developed by me, but I haven't
>> used it extensively so far.
>>
>> Probably you can do some basic configs and test yourself and see what
>> fits your needs better, you can start from the examples at:
>>
>>   -
>> 

Re: [SR-Users] Contact and Record-Route are using Private IP Address- is this correct?

2018-02-06 Thread Samuel F .
I think that if you want someone to review this you would have to provide a:
- Topology
- Configuration
- PCAP from the Kamailio

// Samuel

From: sr-users <sr-users-boun...@lists.kamailio.org> on behalf of Wilkins, 
Steve <swwilk...@mitre.org>
Sent: Tuesday, February 6, 2018 13:41
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Contact and Record-Route are using Private IP Address- 
is this correct?


Hello Samuel,



I do listen on -

listen=udp:localIP:port advertise externalIP:port

listen=tcp:localIP:port advertise externalIP:port

However, it is the localIP that is being used in contact and record-route.  I 
do have Asterisk in the mix, could that be what is causing the IP to be local?

Also, what is strange is that some providers are able to use the local IP.



Thank you,

-Steve







From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Samuel 
F.
Sent: Monday, February 5, 2018 6:57 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] Contact and Record-Route are using Private IP Address- 
is this correct?



I'm assuming you are interfacing with an external party, and then, yes, the 
external IP should be used for the RR header assuming that party should be able 
to route to that route.



Furthermore I assume you have multiple interfaces on your machine, in such case 
you need to set the listen/advertise param:



https://www.kamailio.org/wiki/cookbooks/5.1.x/core#listen<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fwiki%2Fcookbooks%2F5.1.x%2Fcore%23listen=02%7C01%7C%7Cbd2c79e3f7e34393b21c08d56d5f13d9%7C84df9e7fe9f640afb435%7C1%7C0%7C636535177473458761=wCH9%2FcGYlML86nnYF%2FgoSUImdoo5eB3afhQIFcqGwSw%3D=0>

cookbooks:5.1.x:core [Kamailio SIP Server 
Wiki]<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.kamailio.org%2Fwiki%2Fcookbooks%2F5.1.x%2Fcore%23listen=02%7C01%7C%7Cbd2c79e3f7e34393b21c08d56d5f13d9%7C84df9e7fe9f640afb435%7C1%7C0%7C636535177473458761=wCH9%2FcGYlML86nnYF%2FgoSUImdoo5eB3afhQIFcqGwSw%3D=0>

This is the second section of the configuration file, containing the directives 
to load modules and set their parameters. It contains the directives loadmodule 
and ...

www.kamailio.org<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kamailio.org=02%7C01%7C%7Cbd2c79e3f7e34393b21c08d56d5f13d9%7C84df9e7fe9f640afb435%7C1%7C0%7C636535177473458761=uWmfTZOc2niEuxnLMOb5hzeigKfqd54zHzmNrONls1g%3D=0>




Cheers,

Samuel



From: sr-users 
<sr-users-boun...@lists.kamailio.org<mailto:sr-users-boun...@lists.kamailio.org>>
 on behalf of Wilkins, Steve <swwilk...@mitre.org<mailto:swwilk...@mitre.org>>
Sent: Tuesday, February 6, 2018 00:32
To: Kamailio (SER) - Users Mailing List
Subject: [SR-Users] Contact and Record-Route are using Private IP Address- is 
this correct?



Hello All,



Contact and Record-Route are using Private IP Address - is this correct? I 
though the Public IP should be used.  I do not know what setting is causing 
this to happen.  Does anyone have any ideas?



Thank you,

-Steve
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Contact and Record-Route are using Private IP Address- is this correct?

2018-02-05 Thread Samuel F .
I'm assuming you are interfacing with an external party, and then, yes, the 
external IP should be used for the RR header assuming that party should be able 
to route to that route.

Furthermore I assume you have multiple interfaces on your machine, in such case 
you need to set the listen/advertise param:

https://www.kamailio.org/wiki/cookbooks/5.1.x/core#listen
cookbooks:5.1.x:core [Kamailio SIP Server 
Wiki]
This is the second section of the configuration file, containing the directives 
to load modules and set their parameters. It contains the directives loadmodule 
and ...
www.kamailio.org


Cheers,
Samuel

From: sr-users  on behalf of Wilkins, 
Steve 
Sent: Tuesday, February 6, 2018 00:32
To: Kamailio (SER) - Users Mailing List
Subject: [SR-Users] Contact and Record-Route are using Private IP Address- is 
this correct?


Hello All,



Contact and Record-Route are using Private IP Address - is this correct? I 
though the Public IP should be used.  I do not know what setting is causing 
this to happen.  Does anyone have any ideas?



Thank you,

-Steve
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kami as NAT traversal + FS as media

2017-12-25 Thread Samuel F .
Yes, it is very possible to do that. If you google kamailio / freeswitch / 
asterisk, there are plenty of tutorials out there.


// Samuel


From: sr-users  on behalf of Yu Boot 

Sent: Monday, December 25, 2017 10:16:52 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] Kami as NAT traversal + FS as media

Hello. I want to implement the following scheme:

Kami takes inbound call, replces SPD for correct NAT trversal and
forward that call to FS. Kami should NOT be in RTP stream. Is it
possible? Any advices?

Thanks.

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users=02%7C01%7C%7Cc62cb619c26e414f31bf08d54b785255%7C84df9e7fe9f640afb435%7C1%7C0%7C636497902502010596=9ntn%2FkZX84lMcD8v9hOvDNUrE4n%2FYmvaL8Og7nHVXc0%3D=0
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] URL problems connecting to external (Azure) MySQL database

2017-11-27 Thread Samuel F .
Hi again,


Reviewing the source for the parsing function it looks like it won't be 
possible.


https://github.com/kamailio/kamailio/blob/5295a4f5eac08c1bb100bf554a995833c434c4dc/src/modules/db_mysql/my_uri.c#L147

We see that once it hits the @, if it hasn't hit a : or / before it will assume 
everything to the left of the @ is the username and then it will start to parse 
everything to the right of the @ as the hostname.

In your case the host will be: clouddb and the port will be: 
passw...@clouddb.mysql.database.azure.com

Have you checked the docs under section 6?:

6. Reading configuration from my.cnf


Not sure how that is implemented to fetch the data but that might perhaps be a 
way to get around the parsing structure in the mysql module.


Also, feel free to submit a patch for the above parsing function if possible.


// Samuel



From: sr-users <sr-users-boun...@lists.kamailio.org> on behalf of Floimair 
Florian <f.floim...@commend.com>
Sent: Monday, November 27, 2017 4:47:52 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] URL problems connecting to external (Azure) MySQL 
database


Thanks for your quick reply!



Unfortunately the result is exactly the same error.







With best regards

Florian Floimair




Von: sr-users [mailto:sr-users-boun...@lists.kamailio.org] Im Auftrag von 
Samuel F.
Gesendet: Montag, 27. November 2017 16:04
An: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Betreff: Re: [SR-Users] URL problems connecting to external (Azure) MySQL 
database



Hey,



Could you try replacing the @-sign in the username with: %40  (percent-forty)?



// Samuel



From: sr-users 
<sr-users-boun...@lists.kamailio.org<mailto:sr-users-boun...@lists.kamailio.org>>
 on behalf of Floimair Florian 
<f.floim...@commend.com<mailto:f.floim...@commend.com>>
Sent: Monday, November 27, 2017 3:33:21 PM
To: Kamailio (SER) - Users Mailing List
Subject: [SR-Users] URL problems connecting to external (Azure) MySQL database



Hi!



I’m having troubles connecting Kamailio to an external MySQL database (on 
Microsoft Azure Cloud).

Initially creating the database with kamctl worked fine, but accessing it at 
runtime via db_url fails.



A somewhat unusual thing about the connection to a MySQL database on Azure is 
that the username contains an ‘@’ character.

This leads me to believe that this case is somewhat unhandled when parsing the 
database URI.



Trying to connect to something like



modparam("sipcapture", "db_url", 
"mysql://user@clouddb:passw...@clouddb.mysql.database.azure.com/db")



Results in errors starting Kamailio



ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver error: 
Unknown MySQL server host 'clouddb' (-2)

ERROR:  [db.c:318]: db_do_init2(): could not add connection to the pool

ERROR: sipcapture [sipcapture.c:1146]: child_init(): unable to connect to 
database [mysql://user@clouddb:passw...@clouddb.mysql.database.azure.com/db] 
from capture_mode param.

Is there a trick on how to achieve a connection in this case like some sort of 
escape character probably?





Mit freundlichen Grüßen

Florian Floimair (IMS) 1568




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] URL problems connecting to external (Azure) MySQL database

2017-11-27 Thread Samuel F .
Hey,


Could you try replacing the @-sign in the username with: %40  (percent-forty)?


// Samuel


From: sr-users  on behalf of Floimair 
Florian 
Sent: Monday, November 27, 2017 3:33:21 PM
To: Kamailio (SER) - Users Mailing List
Subject: [SR-Users] URL problems connecting to external (Azure) MySQL database


Hi!



I’m having troubles connecting Kamailio to an external MySQL database (on 
Microsoft Azure Cloud).

Initially creating the database with kamctl worked fine, but accessing it at 
runtime via db_url fails.



A somewhat unusual thing about the connection to a MySQL database on Azure is 
that the username contains an ‘@’ character.

This leads me to believe that this case is somewhat unhandled when parsing the 
database URI.



Trying to connect to something like



modparam("sipcapture", "db_url", 
"mysql://user@clouddb:passw...@clouddb.mysql.database.azure.com/db")



Results in errors starting Kamailio



ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver error: 
Unknown MySQL server host 'clouddb' (-2)

ERROR:  [db.c:318]: db_do_init2(): could not add connection to the pool

ERROR: sipcapture [sipcapture.c:1146]: child_init(): unable to connect to 
database [mysql://user@clouddb:passw...@clouddb.mysql.database.azure.com/db] 
from capture_mode param.

Is there a trick on how to achieve a connection in this case like some sort of 
escape character probably?





Mit freundlichen Grüßen

Florian Floimair (IMS) 1568




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio KEMI Framework Tutorial

2017-11-24 Thread Samuel F .
Hey,


Almost done with a POC. Should I open up a PR and we can review / iterate on it 
or is there a better of way of sharing the code?


Cheers,

Samuel


From: Daniel-Constantin Mierla <mico...@gmail.com>
Sent: Friday, November 24, 2017 3:41:35 PM
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio KEMI Framework Tutorial


Hello,

On 24.11.17 13:43, Samuel F. wrote:

Hey,


Just tested and it seems to work well! I compared the output to the output from 
app_lua to run some type of sanity check and it seems to show the same 
information.

I think that KSR.x package doesn't have exit() and drop() functions in 
app_python ... but not sure if KSR.x is dumped via rpc.


However, there is one issue with the rpc app_lua.api_list, when running the RPC 
command it returns the result set twice so you get a msize of twice the msize 
of app_python and duplicated data.

I will check.

Cheers,
Daniel



// Samuel


From: Daniel-Constantin Mierla <mico...@gmail.com><mailto:mico...@gmail.com>
Sent: Thursday, November 23, 2017 12:52:24 PM
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio KEMI Framework Tutorial


Hello,


I just pushed the rpc command app_python.api_list to master branch. Can you 
test and see if works? If all ok, then I will push it to branch 5.1 as well.


Cheers,
Daniel

On 23.11.17 08:31, Daniel-Constantin Mierla wrote:

Hello,

On 22.11.17 19:47, Samuel F. wrote:

Hi again,


Regarding RPC list: I do not think it is implemented for python?

it is not, indeed, I just looked at the code. I am not much into python myself, 
so it was overlooked -- I just added kemi support for it on top of the previous 
app_python.


I checked the source and couldn't find anything that would handle the RPC call:

kamctl rpc app_python.api_list

Regarding the documentation:
I didn't mean to document in the source code, sorry for not expressing myself 
clearly,

That was a proposal on the IRC devel meeting to add doxygen docs for kemi 
function, which is good to have anyhow, but for something with more details and 
examples, doxygen can become a mess.

 I ment to generate the Kemi function list documentation from the source code 
automatically via a script instead of updating it manually (so the 
documentation doesn't become stale). One example could be to run the RPC 
api_list and take that list to generate a documentation file that shows all 
available functions. I tried to check that out now but couldn't get it working 
for python because I think the command is missing (v5.0.4).

So to condense my proposal on how we could structure the KEMI docs I would 
suggest:
- General documentation about how KEMI works: As it is now, great
- Document special functions that are only implemented in KEMI /or differs from 
the original module implementation: As it is now, great
- Not have sections for each and every module, just one section with a long 
list of exported KEMI functions with a link to the original documentation

I'm happy to take a shot at generating a script for this but would need help to 
understand how I can export the python API list.

I am going to add the rpc command to app_python, then you can try to build your 
tool for it.

Cheers,
Daniel


// Samuel


From: Daniel-Constantin Mierla <mico...@gmail.com><mailto:mico...@gmail.com>
Sent: Tuesday, November 21, 2017 3:20:21 PM
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio KEMI Framework Tutorial


Hello,

On 21.11.17 10:20, Samuel F. wrote:

Hi Daniel,


First, I'd just like to say thanks and let you know we are very grateful for 
the KEMI framework. We have developed three small applications running on 
python KEMI in production serving calls every day successfully without any 
issues at all. The development process was very smooth and quick.

thanks for the feedback, really appreciated! It is good to know that KEMI is 
being used in production and also it shows its potential for various needs.



I reviewed the documentation and think it's great that the KEMI framework gets 
an extensive documentation.


One thought I had regarding documenting the exported functions is that I think 
it's good if they are exported to the docs automatically from the source code. 
My opinion is that it is better to have documentation that reflects the current 
state of the source code rather than having stale/out-of-date documentation.


Perhaps having a parser that locates all the exported functions, lists them in 
appropriate modules with the return value and then a link to the actual modules 
documentation?

There is an RPC command that lists the exported KEMI functions for a running 
Kamailio. It reflects exactly what functions are available from the kemi 
framework internal structure. This is like an auto discovery, it is done 
automaticall

Re: [SR-Users] Kamailio KEMI Framework Tutorial

2017-11-24 Thread Samuel F .
Hey,


Just tested and it seems to work well! I compared the output to the output from 
app_lua to run some type of sanity check and it seems to show the same 
information.


However, there is one issue with the rpc app_lua.api_list, when running the RPC 
command it returns the result set twice so you get a msize of twice the msize 
of app_python and duplicated data.


// Samuel


From: Daniel-Constantin Mierla <mico...@gmail.com>
Sent: Thursday, November 23, 2017 12:52:24 PM
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio KEMI Framework Tutorial


Hello,


I just pushed the rpc command app_python.api_list to master branch. Can you 
test and see if works? If all ok, then I will push it to branch 5.1 as well.


Cheers,
Daniel

On 23.11.17 08:31, Daniel-Constantin Mierla wrote:

Hello,

On 22.11.17 19:47, Samuel F. wrote:

Hi again,


Regarding RPC list: I do not think it is implemented for python?

it is not, indeed, I just looked at the code. I am not much into python myself, 
so it was overlooked -- I just added kemi support for it on top of the previous 
app_python.


I checked the source and couldn't find anything that would handle the RPC call:

kamctl rpc app_python.api_list

Regarding the documentation:
I didn't mean to document in the source code, sorry for not expressing myself 
clearly,

That was a proposal on the IRC devel meeting to add doxygen docs for kemi 
function, which is good to have anyhow, but for something with more details and 
examples, doxygen can become a mess.

 I ment to generate the Kemi function list documentation from the source code 
automatically via a script instead of updating it manually (so the 
documentation doesn't become stale). One example could be to run the RPC 
api_list and take that list to generate a documentation file that shows all 
available functions. I tried to check that out now but couldn't get it working 
for python because I think the command is missing (v5.0.4).

So to condense my proposal on how we could structure the KEMI docs I would 
suggest:
- General documentation about how KEMI works: As it is now, great
- Document special functions that are only implemented in KEMI /or differs from 
the original module implementation: As it is now, great
- Not have sections for each and every module, just one section with a long 
list of exported KEMI functions with a link to the original documentation

I'm happy to take a shot at generating a script for this but would need help to 
understand how I can export the python API list.

I am going to add the rpc command to app_python, then you can try to build your 
tool for it.

Cheers,
Daniel


// Samuel


From: Daniel-Constantin Mierla <mico...@gmail.com><mailto:mico...@gmail.com>
Sent: Tuesday, November 21, 2017 3:20:21 PM
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio KEMI Framework Tutorial


Hello,

On 21.11.17 10:20, Samuel F. wrote:

Hi Daniel,


First, I'd just like to say thanks and let you know we are very grateful for 
the KEMI framework. We have developed three small applications running on 
python KEMI in production serving calls every day successfully without any 
issues at all. The development process was very smooth and quick.

thanks for the feedback, really appreciated! It is good to know that KEMI is 
being used in production and also it shows its potential for various needs.



I reviewed the documentation and think it's great that the KEMI framework gets 
an extensive documentation.


One thought I had regarding documenting the exported functions is that I think 
it's good if they are exported to the docs automatically from the source code. 
My opinion is that it is better to have documentation that reflects the current 
state of the source code rather than having stale/out-of-date documentation.


Perhaps having a parser that locates all the exported functions, lists them in 
appropriate modules with the return value and then a link to the actual modules 
documentation?

There is an RPC command that lists the exported KEMI functions for a running 
Kamailio. It reflects exactly what functions are available from the kemi 
framework internal structure. This is like an auto discovery, it is done 
automatically.

Addition docs can be added in the code using doxygen, however, while that is 
good for short descriptions, I don't find it good to add extensive docs and 
especially usage examples in the code. Also, from past experiences, 
non-developer users tend not to look at the code, therefore the improvements to 
docs in code from general users are very low.

Anyhow, this tutorial was started with the initial goal of covering the KEMI 
framework in general, and the special functions. For the functions exported by 
modules I added only the acc as an example (which is also a skeleton at this 
moment).

As I said, I am open for suggestions on 

Re: [SR-Users] Kamailio KEMI Framework Tutorial

2017-11-22 Thread Samuel F .
Hi again,


Regarding RPC list: I do not think it is implemented for python? I checked the 
source and couldn't find anything that would handle the RPC call:

kamctl rpc app_python.api_list

Regarding the documentation:
I didn't mean to document in the source code, sorry for not expressing myself 
clearly, I ment to generate the Kemi function list documentation from the 
source code automatically via a script instead of updating it manually (so the 
documentation doesn't become stale). One example could be to run the RPC 
api_list and take that list to generate a documentation file that shows all 
available functions. I tried to check that out now but couldn't get it working 
for python because I think the command is missing (v5.0.4).

So to condense my proposal on how we could structure the KEMI docs I would 
suggest:
- General documentation about how KEMI works: As it is now, great
- Document special functions that are only implemented in KEMI /or differs from 
the original module implementation: As it is now, great
- Not have sections for each and every module, just one section with a long 
list of exported KEMI functions with a link to the original documentation

I'm happy to take a shot at generating a script for this but would need help to 
understand how I can export the python API list.

// Samuel



From: Daniel-Constantin Mierla <mico...@gmail.com>
Sent: Tuesday, November 21, 2017 3:20:21 PM
To: Samuel F.; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio KEMI Framework Tutorial


Hello,

On 21.11.17 10:20, Samuel F. wrote:

Hi Daniel,


First, I'd just like to say thanks and let you know we are very grateful for 
the KEMI framework. We have developed three small applications running on 
python KEMI in production serving calls every day successfully without any 
issues at all. The development process was very smooth and quick.

thanks for the feedback, really appreciated! It is good to know that KEMI is 
being used in production and also it shows its potential for various needs.



I reviewed the documentation and think it's great that the KEMI framework gets 
an extensive documentation.


One thought I had regarding documenting the exported functions is that I think 
it's good if they are exported to the docs automatically from the source code. 
My opinion is that it is better to have documentation that reflects the current 
state of the source code rather than having stale/out-of-date documentation.


Perhaps having a parser that locates all the exported functions, lists them in 
appropriate modules with the return value and then a link to the actual modules 
documentation?

There is an RPC command that lists the exported KEMI functions for a running 
Kamailio. It reflects exactly what functions are available from the kemi 
framework internal structure. This is like an auto discovery, it is done 
automatically.

Addition docs can be added in the code using doxygen, however, while that is 
good for short descriptions, I don't find it good to add extensive docs and 
especially usage examples in the code. Also, from past experiences, 
non-developer users tend not to look at the code, therefore the improvements to 
docs in code from general users are very low.

Anyhow, this tutorial was started with the initial goal of covering the KEMI 
framework in general, and the special functions. For the functions exported by 
modules I added only the acc as an example (which is also a skeleton at this 
moment).

As I said, I am open for suggestions on how to do the docs for kemi functions 
from modules. Your proposal with using somehow the code is not like being 
dismissed, I just expressed my opinions based. Contributions to parse the code 
and extract prototypes are of course welcome.

Cheers,
Daniel




// Samuel


From: sr-users 
<sr-users-boun...@lists.kamailio.org><mailto:sr-users-boun...@lists.kamailio.org>
 on behalf of Daniel-Constantin Mierla 
<mico...@gmail.com><mailto:mico...@gmail.com>
Sent: Monday, November 20, 2017 4:11:54 PM
To: Kamailio (SER) - Users Mailing List; Kamailio (SER) - Devel Mailing List
Subject: [SR-Users] Kamailio KEMI Framework Tutorial

Hello,

I started a tutorial for Kamailio KEMI Framework written in markdown
format targeting use of mkdocs. It is published on github as part of
kamailio-docs repository:

  *
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio-docs%2Ftree%2Fmaster%2Fkamailio-kemi-framework=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=MuTy1ZgjcDEbQdHTGA2LpO1sKUDAxxo%2BupwGr%2BBspCE%3D=0

The mkdocs build (to browse and read) is online at:

  * 
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fkamailio.org%2Fdocs%2Ftutorials%2Fdevel%2Fkamailio-kemi-framework%2F=02%7C01%

Re: [SR-Users] Kamailio KEMI Framework Tutorial

2017-11-21 Thread Samuel F .
Hi Daniel,


First, I'd just like to say thanks and let you know we are very grateful for 
the KEMI framework. We have developed three small applications running on 
python KEMI in production serving calls every day successfully without any 
issues at all. The development process was very smooth and quick.


I reviewed the documentation and think it's great that the KEMI framework gets 
an extensive documentation.


One thought I had regarding documenting the exported functions is that I think 
it's good if they are exported to the docs automatically from the source code. 
My opinion is that it is better to have documentation that reflects the current 
state of the source code rather than having stale/out-of-date documentation.


Perhaps having a parser that locates all the exported functions, lists them in 
appropriate modules with the return value and then a link to the actual modules 
documentation?


// Samuel


From: sr-users  on behalf of 
Daniel-Constantin Mierla 
Sent: Monday, November 20, 2017 4:11:54 PM
To: Kamailio (SER) - Users Mailing List; Kamailio (SER) - Devel Mailing List
Subject: [SR-Users] Kamailio KEMI Framework Tutorial

Hello,

I started a tutorial for Kamailio KEMI Framework written in markdown
format targeting use of mkdocs. It is published on github as part of
kamailio-docs repository:

  *
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio-docs%2Ftree%2Fmaster%2Fkamailio-kemi-framework=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=MuTy1ZgjcDEbQdHTGA2LpO1sKUDAxxo%2BupwGr%2BBspCE%3D=0

The mkdocs build (to browse and read) is online at:

  * 
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fkamailio.org%2Fdocs%2Ftutorials%2Fdevel%2Fkamailio-kemi-framework%2F=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=FHJ1zANtLQI6o2%2F1wFPFYfu1B94JlQ%2FHTLDbaVp7dUg%3D=0

It is work in progress and contributions from the community are more
than welcome -- doing push requests on github project is the recommended
way for contributions:

  * 
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio-docs%2F=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=utRI9tOvpEuyBWFU70KaBaod6URNk0ju4rTSQl%2FhO3I%3D=0

The main goal is document the role of KEMI, its benefits and how it can
be used. It addition it should cover the list of functions exported to
KEMI by core as well as special KEMI functions.

Regarding the functions exported by kamailio modules to KEMI I added as
an skeleton the ones exported by acc module. However, I am not sure if
we should do it there or add them to the existing docs of the modules.
Opinions on this?!?

Cheers,
Daniel

--
Daniel-Constantin Mierla
https://nam02.safelinks.protection.outlook.com/?url=www.twitter.com%2Fmiconda=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=%2F1Fg1476daehbTE4jVNmQ1%2BQro52j%2Fy6maGN8HZmHjU%3D=0
 -- 
https://nam02.safelinks.protection.outlook.com/?url=www.linkedin.com%2Fin%2Fmiconda=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=WytUIkS%2FT0cdu%2BEMhSLz8TFhkn2PADOVGEjnHF5d2lE%3D=0
Kamailio Advanced Training - 
https://nam02.safelinks.protection.outlook.com/?url=www.asipto.com=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=b8D9EWNFf5eocdwbjZDu8nKmFF777nNE5yknicVgDKs%3D=0
Kamailio World Conference - May 14-16, 2018 - 
https://nam02.safelinks.protection.outlook.com/?url=www.kamailioworld.com=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=X7KEbj5w3kLSiCPrpgnrdoCITpeBiWPfAeYFyY2yMhk%3D=0


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435%7C1%7C0%7C636467876150276887=HLJ5knbTzvZ2EFRpdNEPawUUy5ArJVL6HVqitepIM2Q%3D=0
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio 5.0 with asterisks

2017-07-20 Thread Samuel F .
This seems to be an Asterisk issue and not Kamailio issue.


In particular, it seems that you haven't set up your peer configuration in 
Asterisk in such a way that it matches towards the Kamailio context.


I would suggest that you do a verbose console connection to the Asterisk and 
check which context the INVITE ends up in.


Most likely you will need to change the peer type and perhaps identify it by IP 
so it doesn't have to register.


// Samuel


From: sr-users  on behalf of Aidar Kamalov 

Sent: Thursday, July 20, 2017 6:31:37 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] kamailio 5.0 with asterisks

Hello!

I'm new with kamailio, so may be don't understand some basic.
I'm tryin to load balance asterisk servers with kamailio and dispatcher module. 
My ip phones registered at kamailio, for example:

[root@sipchel ~]# kamctl ul show 101
{
  "jsonrpc":  "2.0",
  "result": {
"AoR":  "101",
"Contacts": [{
"Contact":  {
  "Address":  
"sip:101@192.168.2.62;line=4733c4bfa459eea",
  "Expires":  2953,
  "Q":  -1,
  "Call-ID":  "1361221648",
  "CSeq": 136,
  "User-Agent": "Linphone/3.6.1 (eXosip2/3.6.0)",
  "Received": "[not set]",
  "Path": "[not set]",
  "State":  "CS_SYNC",
  "Flags":  0,
  "CFlags": 0,
  "Socket": "udp:192.168.10.54:5060",
  "Methods":  -1,
  "Ruid": "uloc-596f5abc-2ce5-2",
  "Instance": "[not set]",
  "Reg-Id": 0,
  "Last-Keepalive": 1500530337,
  "Last-Modified":  1500530337
}
  }]
  },
  "id": 15024
}


I have realtime asterisk server.
[root@sipchel ~]# kamctl dispatcher dump
{
  "jsonrpc":  "2.0",
  "result": {
"NRSETS": 1,
"RECORDS":  [{
"SET":  {
  "ID": 1,
  "TARGETS":  [{
  "DEST": {
"URI":  "sip:192.168.4.16",
"FLAGS":  "IX",
"PRIORITY": 0
  }
}, {
  "DEST": {
"URI":  "sip:192.168.10.47",
"FLAGS":  "AX",
"PRIORITY": 0
  }
}]
}
  }]
  },
  "id": 15087
}


So I want if 101 call to 102 it will process by asterisk(for call recording and 
other features). Now if I call from 101 to 102 kamailio will forward to 
asterisk and asterisk dialplan cannot find that extesion(as expected, because 
it is not registed on asterisk)
[kamailio]
exten => _1XX,1,Dial(SIP/${EXTEN})
exten => _1XX,n,Hangup
If I change dialplan to Dial(SIP/KAMAILIO/${EXTEN}) call wil return to 
kamailio, but kamailio send it back to asterisk...

I hope I explained correctly, my English is terrible.
Is my screnario proper? How this usually done? Should I forward sip 
registrations to asterisks?




My kamailio config
# dispatcher params
modparam("dispatcher", "db_url", 
"mysql://kamailio:kamailiorw@localhost/kamailio")
modparam("dispatcher", "ds_ping_interval", 30)
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")

modparam("auth_db", "db_url", DBASTURL)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "user_column", "name")
modparam("auth_db", "password_column", "sippasswd")
modparam("auth_db", "load_credentials", "")
#modparam("auth_db", "version_table", 0)


request_route {

<--># per request initial checks
<-->route(REQINIT);

<--># NAT detection
<-->route(NATDETECT);

<--># CANCEL processing
<-->if (is_method("CANCEL")) {
<--><-->if (t_check_trans()) {
<--><--><-->route(RELAY);
<--><-->}
<--><-->exit;
<-->}

<--># handle retransmissions
<-->if (!is_method("ACK")) {
<--><-->if(t_precheck_trans()) {
<--><--><-->t_check_trans();
<--><--><-->exit;
<--><-->}
<--><-->t_check_trans();
<-->}

<--># handle requests within SIP dialogs
<-->route(WITHINDLG);

<-->### only initial requests (no To tag)

<--># authentication
<-->route(AUTH);

<--># record routing for dialog forming requests (in case they are routed)
<--># - remove preloaded route headers
<-->remove_hf("Route");
<-->if (is_method("INVITE|SUBSCRIBE")) {
<--><-->record_route();
<-->}

<--># account only INVITEs
<-->if (is_method("INVITE")) {
<--><-->setflag(FLT_ACC); # do accounting
<-->}

<--># dispatch requests to foreign domains
<-->route(SIPOUT);
-->### requests for my local domains

<--># handle presence related requests
<-->route(PRESENCE);

<--># handle registrations
<-->route(REGISTRAR);

<-->if 

Re: [SR-Users] What happens to calls when Kamailio restarts?

2017-07-13 Thread Samuel F .
Thank you for the responses! As a follow up question, how do companies with 
large loads on their Kamailios handle restarts especially considering the 
CANCELs?

What is a good (business) process to restart a Kamailio without incurring any 
interruptions at all? What other components in the infrastructure would be in 
place and which ones are in use in the wild?


// Samuel


From: sr-users  on behalf of Sebastian 
Damm 
Sent: Thursday, July 13, 2017 2:39:39 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] What happens to calls when Kamailio restarts?

Hi,

On Wed, Jul 12, 2017 at 11:53 AM, Alex Balashov
 wrote:
> All SIP messages passing through the proxy can be forwarded statelessly
> and based on properties of the SIP message alone.

There's one thing that could happen: Calls that get cancelled after a
restart, could possibly keep on ringing on the far end. At least if
you check for an active transaction in your kamailio config.

  if (!t_check_trans()) {
  sl_send_reply("481", "Call/Transaction does not exist");
  xlog("L_ERR", "CANCEL: found no matching transaction F=$fu T=$tu
R=$ru\n");
  return;
  }

And if you do some sort of random dispatching, CANCELs could end up on
a different gateway.

But other than that, a restart shouldn't cause much trouble.
Especially in-call requests get routed by Route headers only.

Regards,
Sebastian

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] What happens to calls when Kamailio restarts?

2017-07-12 Thread Samuel F .
Hi,


I have a question regarding calls and Kamailio restarts.


Suppose Kamailio crashes (and started again), is restarted or failed over to a 
different server (same IP). What then happens with calls?


Let's suppose the following scenario:

- 1000 calls active on the machine

- Some are in call setup, some are in call, some are in teardown phases

- The proxy is stateful

- The proxy forwards calls from B2BUA machines to an ITSP (outbound only)

- Uses record-routing

- Uses loose routing


What will be the likely outcome of the restart with regards to the calls in the 
different phases and accounting for said calls?


All the best,

Samuel
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users