[SR-Users] Re: tsilo dependency on usrloc

2023-12-01 Thread Federico Cabiddu via sr-users
Hi Alex,
sorry for the late reply. I had to revisit the tsilo code, long time
without looking at it :)
When I designed the module I had in mind what I considered a "natural"
scenario for the push notifications: the entity acting as a registrar being
the one responsible for a call forking.
Of course other scenarios have arisen which are not covered by the current
implementation, one of which is to be able to add branches without the
usrloc/registrar mechanism.
We could add two new functions that do the same as ts_append and
ts_append_to but without performing the look:
- ts_append_no_lookup(ruri, [contact]): add to all the transactions stored
for ruri a new branch for  (if not specified extracted from the
current SIP message)
- ts_append_to_no_lookup(tindex, tlabel, [contact]): add to the transaction
specified by tindex and tlabel  a new branch for 
Maybe names are a bit long but is to give the idea.
Do you think that a solution like this would cover your (and others')
scenarios?
I can try to find the time to work on it :)

Cheers,

Federico



On Tue, Nov 28, 2023 at 8:39 PM Alex Balashov via sr-users <
sr-users@lists.kamailio.org> wrote:

> PS. It seems to me there are some kludgy options to work around this
> limitation, i.e. to basically reinvent tsilo.
>
> They all boil down to suspending the transaction and using some sort of
> IPC mechanism to queue new branch destinations, then, after some defined
> interval, using some dequeueing mechanism as a semaphore to kick-start the
> forking process.
>
> For instance, one could do this by hashing the RURI destination,
> transaction index and label in htable, then suspending the transaction,
> then piling some branches into it and then setting the expiration value of
> the RURI key to immediate, causing event_route[htable:expired:] to
> kick off. Depending on where exactly that executes, this could resume the
> transaction, add the branches and manage the forking. Or one could try some
> tricks with config locks, or mqueue's unique key mode.
>
> But none of these solutions allow the continuous drip of new serial
> forking destinations into an active transaction. They all require
> suspending and waiting a sufficient amount of time to believe oneself to
> have collected all the potential destinations, then to reanimate. This is
> not necessarily how the real world works. These mechanisms are also quite
> complicated, and complexity breeds fragility.
>
> -- Alex
>
> > On 28 Nov 2023, at 13:38, Alex Balashov 
> wrote:
> >
> > Hi,
> >
> > I wanted to revisit the topic of tsilo dependence on the location
> service. All three ts_append*() functions have the following quality:
> >
> > - ts_append(): "performing a contact lookup on the table specified by
> the domain parameter."
> > - ts_append_by_contact(): "the contact lookup is performed"
> > - ts_append_to(): "performing a contacts lookup on the table specified
> by the domain parameter"
> >
> > Why is this extensive coupling to usrloc necessary? This makes it
> impossible to use `tsilo` in case of providing a push-notification add-on
> that front-ends an upstream registrar, requiring a kind of local shadow
> registrar or mid-registrar. What would make more sense is a generic
> mechanism that allows one to "drip" new contacts into an existing
> transaction, whether suspended or active.
> >
> > Kamailio has a mechanism to add more branches to an existing
> transaction, but the scope of that mechanism is only from *inside* the
> vantage point of the transaction in question. The key parlour trick of
> `tsilo` is that it permits dripping new branches into a *different*
> transaction.
> >
> > ts_append_to() almost does the trick, providing a target index and
> label, but it just insists on doing a registrar lookup to source the
> contacts.
> >
> > What is really wanted and needed for the downstream PN gateway use-case
> is a means of extracting contacts from incoming registrations (or other
> sources, potentially) without storing them in any fashion locally, without
> using or even loading usrloc, and just throwing them over the fence into a
> different transaction.
> >
> > Is this somehow possible by means other than tsilo? Am I overlooking
> something?
> >
> > Cheers,
> >
> > -- Alex
> >
> > --
> > Alex Balashov
> > Principal Consultant
> > Evariste Systems LLC
> > Web: https://evaristesys.com
> > Tel: +1-706-510-6800
> >
>
> --
> Alex Balashov
> Principal Consultant
> Evariste Systems LLC
> Web: https://evaristesys.com
> Tel: +1-706-510-6800
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-us

[SR-Users] Unable to use db_alias_lookup to call multiple extensions

2023-12-01 Thread Merul Patel, PhD via sr-users
Hi,

Kamailio newby here. Having some trouble with using alias_db to forward an 
incoming call to two extensions. Thanks in advance for any help.

I've tried using the Ubuntu Jammy ARM64 packages, as well as compiling the 
source for version 5.7.3.  In both cases, I've added three extensions, and 
calls directly between them work fine with the vanilla kamailio.cfg.

However, I then wanted to add an alias so that when called it would dial two 
extensions, but only the first extension is ever called.

My kamailio.cfg only differs in a few places:

$ diff kamailio.cfg kamailio.cfg.original  3,6d2
< #!define WITH_AUTH 1
< #!define WITH_DEBUG 1
< #!define WITH_ALIASDB 1
< #
268,270d263
< loadmodule "db_sqlite.so"
< #!define DBURL 
"sqlite:///usr/local/kamailio-devel/etc/kamailio/kamailio.sqlite"
<  367c360
< modparam("tm", "failure_reply_mode", 0)
---
> modparam("tm", "failure_reply_mode", 3)
450d442
< modparam("alias_db", "append_branches", 1)

I can see from the log that when dialling the desired alias (5000) an alias_db 
query is performed:

Dec 01 20:00:23 merrivale /usr/local/kamailio-devel/sbin/kamailio[3264]: DEBUG: 
{1 2 INVITE 651794328853009-230332414159388@192.168.17.145} alias_db 
[alookup.c:169]: alias_db_query(): new URI [0] is 
[sip:6002@merrivale.localdomain]
Dec 01 20:00:23 merrivale /usr/local/kamailio-devel/sbin/kamailio[3264]: DEBUG: 
{1 2 INVITE 651794328853009-230332414159388@192.168.17.145} alias_db 
[alookup.c:169]: alias_db_query(): new URI [1] is 
[sip:6001@merrivale.localdomain]

But only the first result is called. I've changed the order of the aliases in 
the sqlite db and just the first result is called.

What am I missing?

Merul
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Setting up Kamailio as SIP Proxy

2023-12-01 Thread Saul Ibarra via sr-users
Hey Fred,
I got it working thanks to your example, it is ofc not the exact same
configuration i needed but it helped to understand more about the UAC
module and Kamailio in general, it was my first try with it.

Related question, does an error "Module db_DBURL not found" has anything to
do with the UAC module?
there is also "uac_reg_load_db(): database module not found"

For this test i used Ubuntu (because locally i was using docker in a M1 Mac
and it was erroring because of the builds available on the debian
registry), maybe it has anything to do with that?

You saved me man, thanks!

On Wed, Nov 29, 2023 at 11:06 AM Saul Ibarra 
wrote:

> Hey Fred,
> thanks for the info and the example on how to handle this.
>
> I'll take a look at it and try to get it working
> Thanks again
>
> On Tue, Nov 28, 2023 at 11:45 PM Fred Posner  wrote:
>
>> Hi Saul,
>>
>> Great to see you here…
>>
>> So, there’s not a ton of examples out there on UAC, but many of us have
>> done what you’re describing and later on I’ll try to respond with a config
>> example.
>>
>> Nick vs Networking has some good, verbose discussions on many modules
>> including;
>>
>> https://nickvsnetworking.com/kamailio-bytes-sip-uac-module-to-act-as-a-uac-sip-client/
>>
>> For what you’re talking about doing, I’d probably have the credentials
>> stored in a DB (mariadb, Postgres, etc) and then have that register to the
>> carriers.
>>
>> Asterisk would connect to your Kamailio, and then using whatever logic
>> you want (LCR, x-header, favorite, etc) you would then send out to the
>> carrier with kamailio handling (via uac) the authentication on the INVITEs.
>>
>> For incoming, it depends on the carrier how you receive the call. Some
>> carriers will send all dids to just your registered username, others will
>> send with DID info in the SIP.
>>
>> Every carrier is a snowflake.
>>
>> Keeping with the snowflake theme, some carriers are also “finicky” on
>> outbound traffic and don’t like to see certain SIP; where some modules like
>> topos may assist.
>>
>>
>> Regards,
>>
>> Fred Posner
>> p: +1 (352) 664-3733
>>
>>
>>
>> > On Nov 28, 2023, at 8:26 PM, Saul Ibarra via sr-users <
>> sr-users@lists.kamailio.org> wrote:
>> >
>> > Thanks for your response,
>> > I have checked the UAC module, but i would like get more information
>> about how it works. I have worked with Asterisk in the past, if i were to
>> handle this let's say with an asterisk in the middle, it will probably be
>> two sip accounts + a dialplan config to make them call each other
>> >
>> > So here the "equivalent" is UAC module to do the 'register' to the
>> provider, but, does it means that as soon as kamailio have the provider
>> credentials it will try to register?
>> >
>> > While using a DB (i'm using mariadb), will any update on the DB be
>> automatically accessible by Kamailio or i should do some 'reload' for it?
>> >
>> > I'm confused by the way it works which is pretty different from
>> Asterisk in the end, but i like the idea of having also full control over
>> what's happening and when
>> >
>> >
>> > On Tue, Nov 28, 2023 at 9:39 PM Yuriy G  wrote:
>> > Hi. Use UAC module
>> > Examples of the configuration are in the docs
>> >
>> > https://www.kamailio.org/docs/modules/5.7.x/modules/uac.html#idm700
>> >
>> > On Wed, Nov 29, 2023, 01:26 Saul Ibarra via sr-users <
>> sr-users@lists.kamailio.org> wrote:
>> > Hi,
>> > I am needing some help setting up kamailio as a sip proxy between a
>> provider(trunk) and a test pbx
>> > The trunk requires username&password and i would like to add that
>> information to the request within the Kamailio proxy, so that the PBX can
>> authenticate directly by IP (without username&password) through the
>> Kamailio proxy.
>> >
>> > As a programmer with a limited background in SIP (currently learning),
>> I am keen on understanding the intricacies of this setup at the SIP level.
>> > Could you please direct me to resources or documentation that covers
>> scenarios similar to mine?
>> >
>> > Any help or guidance you could provide would be greatly appreciated.
>> >
>> > Thanks
>> > __
>> > Kamailio - Users Mailing List - Non Commercial Discussions
>> > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> > Important: keep the mailing list in the recipients, do not reply only
>> to the sender!
>> > Edit mailing list options or unsubscribe:
>> > __
>> > Kamailio - Users Mailing List - Non Commercial Discussions
>> > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> > Important: keep the mailing list in the recipients, do not reply only
>> to the sender!
>> > Edit mailing list options or unsubscribe:
>>
>>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list

[SR-Users] Re: How to use: kamcmd ul.db_users?

2023-12-01 Thread Henning Westerholt via sr-users
Hello,

the standard usrloc statistic values don't work for you?

https://kamailio.org/docs/modules/5.6.x/modules/usrloc.html#usrloc.s.registered_users

Cheers,

Henning


-- 
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com



> -Original Message-
> From: Benoit Panizzon via sr-users 
> Sent: Donnerstag, 30. November 2023 15:20
> To: sr-users@lists.kamailio.org
> Cc: Benoit Panizzon 
> Subject: [SR-Users] How to use: kamcmd ul.db_users?
> 
> Hi List
> 
> I want to find a way to check how many users are regsitered.
> 
> https://www.kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.
> r.db_users
> 
> But no matter how I try, I get a 500 error...
> 
> # kamcmd ul.db_users location
> 
> And yes, the table is called 'location'.
> 
> I did try to find out how kamctl ul show --brief pulls that information, but 
> did
> not succeed. Also that command takes way too long how that we have several
> thousand registered users.
> 
> Or would I need to query this directly from the database?
> 
> Mit freundlichen Grüssen
> 
> -Benoît Panizzon-
> --
> I m p r o W a r e   A G-Leiter Commerce Kunden
> __
> 
> Zurlindenstrasse 29 Tel  +41 61 826 93 00
> CH-4133 PrattelnFax  +41 61 826 93 01
> Schweiz Web  http://www.imp.ch
> __
> __
> Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe
> send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the
> sender!
> Edit mailing list options or unsubscribe:
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Info: RTC Devroom at FOSDEM 2024

2023-12-01 Thread Daniel-Constantin Mierla via sr-users
Hello,

another edition of FOSDEM is approaching and it will include again a
Real Time Communications devroom. If anyone wants to share their
interesting applications or experiences in the field, consider to submit
a presentation proposal. The CfP is available at:

  - https://lists.fosdem.org/pipermail/fosdem/2023q4/003518.html

It does not have to be about Kamailio, all RTC topics are welcome, just
think to be something useful for developers, as the event is targeting them.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.com

__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe: