Re: [SR-Users] which is better for B2BUA

2021-07-31 Thread Mojtaba
Thanks Guys for your comments.
@Gerry, I agree with you, I have a few experiences working with Yate, It
could work great in enterprise solutions. Thanks
@Denys, Thanks for sharing your experience, Although its configurations
look complicated, But in signaling, It would work great.
Just a question, Let me know which scenario is like that you use?

---
or
---



On Fri, Jul 30, 2021 at 9:15 AM Denys Pozniak 
wrote:

> Hello!
> We used sems to interconnect with external operators. But with a heavy
> call load and with the processing of the media stream, it often crashed.
> Now we use Kamailio / Rtpengine for media stream processing and sems for
> signaling processing. We install all this on one server. It probably looks
> complicated, but it works great.
>
> вт, 27 июл. 2021 г. в 16:10, Gerry | Rigatta :
>
>> Hi,
>>
>> Some comments on Yate.
>>
>> Yate works well as a B2BUA. It is very performant and stable. It can
>> bypass media dynamically.
>>
>> The main beauty of Yate is how it processes calls internally. Yate
>> represents calls internally as messages with parameters (caller, callee,
>> codecs …) . While the call passes from the incoming to the outgoing call
>> leg the message parameters can be manipulated by different yate modules. In
>> turn, message parameters can trigger yate modules for some actions, e.g.
>> start a sip call.
>>
>> The Yate internal messaging allows to build with little code complex call
>> logic. E.g a mysql query result can be used directly for routing. E,g, you
>> can build a switch just with a couple of mysql procedures.
>>
>> Cheers
>>
>> Gerry
>>
>>
>>
>> On 27 Jul 2021, at 11:35, Karsten Horsmann  wrote:
>>
>> Hello,
>>
>> just for the records:
>>
>> You can also bypass media with FreeSWITCH if you want. The overall
>> handling of many parallel calls is still not so high like in SEMS.
>>
>> https://freeswitch.org/confluence/display/FREESWITCH/Proxy+Media
>> This is also possible on a per Call base.
>>
>> And you can use different profiles as well in FreeSWITCH.
>>
>> Asterisk Experts will have more knowledge what is possible there, and
>> maybe someone told us whats going on with Yate.
>>
>> Kind regards
>> Karsten
>>
>> Am Di., 13. Juli 2021 um 10:11 Uhr schrieb Mojtaba :
>>
>>>
>>> Hello there,
>>> According to ,
>>> https://lists.kamailio.org/pipermail/sr-users/2016-March/092058.html,
>>> which talked about  B2BUA (just signalling) in Kamailio.
>>> As i have experienced working with SEMS, freeswitch and Kamailio while
>>> using B2BUA feature, Each of them have pros and cons:
>>> 1- The sems is a light sip engine server with several applications (like
>>> as sbc) for using b2bua. All incoming and outgoing calls could go to sems
>>> server for doing b2bua like this:
>>>
>>>
>>> Incoming<===>Kamailio<>Sems<>Kamailio<===>outgoing
>>>
>>> 2- In sems, you could disable rtp realying. It forces sems to work just
>>> as b2bua without anchoring RTP
>>> 3- Easy to use different active profiles in routing.
>>>
>>> __
>> 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
>>
>>
>> __
>> 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
>>
>
>
> --
>
> BR,
> Denys Pozniak
>
>
> __
> 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
>


-- 
--Mojtaba Esfandiari.S
__
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] help

2021-07-31 Thread Karsten Horsmann
Hi Said,

if no one is answering your questions then you should ask more specific
what is the issue and what you try to solve that.

That could result in more answers.

Kind regards
Karsten Horsmann

Said Hassani  schrieb am Fr., 30. Juli 2021, 08:11:

> Dear Team,
>
> I would like to know how to link Kamailio with openIMSCore?
> I would like to use Kamailio as an Application server.
> Please guide me or if there is someone who has worked on this subject, I
> would like to benefit from his help.
>
> __
> 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
>
__
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] Access via script to location data in the memory

2021-07-31 Thread Social Boh

So, my final configuration is:

One domain with AWS Route53 same weight configuration: 50% server1 and 
50% server2


The user register over the domain.

Two Kamailio Servers with DMQ and DMQ_USRLOC modules configured; 1.2.3.4 
first server IP and 5.6.7.8 second server IP


Most important configurations *Server1*:

/*listen=udp:1.2.3.4:5060
listen=udp:1.2.3.4:5222*/

/*#  dmq params 
modparam("dmq", "server_address", "sip:1.2.3.4")
modparam("dmq", "notification_address", "sip:5.6.7.8")
modparam("dmq", "multi_notify", 0)
modparam("dmq", "num_workers", 4)
modparam("dmq", "ping_interval", 30)

#  dmq_usrloc params 
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_size", 10)
modparam("dmq_usrloc", "batch_usleep", 1000)
modparam("dmq_usrloc", "batch_msg_size", 6)
modparam("dmq_usrloc", "batch_msg_contacts", 50)
modparam("dmq_usrloc", "usrloc_domain", "location")
modparam("dmq_usrloc", "replicate_socket_info", 0)
modparam("dmq_usrloc", "usrloc_delete", 1)*/

before the block begin with:

/*$avp(oexten) = $rU;
    if (!lookup("location")) {*/

I put

/*if (!dmq_is_from_node()) {*//*
*//*if(reg_fetch_contacts("location", "$ru", "contacto")) {*//*
*//*if($(ulc(contacto=>socket))) == 0 {*//*
*//*rewritehost("5.6.7.8");*//*
*//*    }*//*
*//*    route(RELAY);*//*
*//*    }*//*
*//*    }*/

If the socket value is null (0) means the user is registered on the 
second Kamailio so send INVITE to second Kamailio


/*route[AUTH] {*//*
*//*#!ifdef WITH_AUTH*//*
*//*
*//*if (dmq_is_from_node()) {*//*
*//*    $ru = $tu;*//*
*//*return;*//*
*//*}*/

If INVITE comes from other DMQ node don't need authentication but I have 
to change RURI with To URI because I work in a multidomain setting and 
I'm  using the does_uri_exist function to know if the request is local 
or not.


*Server2*:

/*listen=udp:5.6.7.8:5060
listen=udp:5.6.7.8:5222*/

/**/

/*#  dmq params 
modparam("dmq", "server_address", "sip:5.6.7.8")
modparam("dmq", "notification_address", "sip:1.2.3.4")
modparam("dmq", "multi_notify", 0)
modparam("dmq", "num_workers", 4)
modparam("dmq", "ping_interval", 30)

#  dmq_usrloc params 
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_size", 10)
modparam("dmq_usrloc", "batch_usleep", 1000)
modparam("dmq_usrloc", "batch_msg_size", 6)
modparam("dmq_usrloc", "batch_msg_contacts", 50)
modparam("dmq_usrloc", "usrloc_domain", "location")
modparam("dmq_usrloc", "replicate_socket_info", 0)
modparam("dmq_usrloc", "usrloc_delete", 1)*/

before the block begin with:

/*$avp(oexten) = $rU;
    if (!lookup("location")) {*/

/**/

/*if (!dmq_is_from_node()) {*//*
*//*    if(reg_fetch_contacts("location", "$ru", 
"contacto")) {*//*

*//*    if($(ulc(contacto=>socket))) == 0 {*//*
*//*    rewritehost("1.2.3.4");*//*
*//*    }*//*
*//*    route(RELAY);*//*
*//*    }*//*
*//*    }*/

If the socket value is null (0) means the user is registered on the 
first Kamailio so send INVITE to first Kamailio


/*route[AUTH] {
#!ifdef WITH_AUTH

if (dmq_is_from_node()) {
    $ru = $tu;
return;
}*/

If INVITE comes from other DMQ node don't need authentication but I have 
to change RURI with To URI because I work in a multidomain setting and 
I'm  using the does_uri_exist function to know if the request is local 
or not.


LIMITATIONS:

 * works only with a device for user. If a user registered from two o
   more devices I don't know how achieve the same behavior
 * works with Two Kamailio due to rewritehost function...
 * maybe the routing can be better

Regards

---
I'm SoCIaL, MayBe

El 31/07/2021 a las 5:23 a. m., Henning Westerholt escribió:


Great, thanks for the confirmation.

Henning

*From:* sr-users  *On Behalf Of 
*Social Boh

*Sent:* Friday, July 30, 2021 8:36 PM
*To:* Kamailio (SER) - Users Mailing List 
*Subject:* Re: [SR-Users] Access via script to location data in the memory

Works!

I can access location data presents only in the memory. Now, next step 
is using $(ulc(contacto=>socket)) to decide which Kamailio have to 
process the call.


Thank you

---
I'm SoCIaL, MayBe

El 30/07/2021 a las 11:51 a. m., Henning Westerholt escribió:

Hi,

just quickly looked in the registrar code, it uses the standard
usrloc functions to get data from memory or database.

Maybe just give it a try, I think it should work also in
in-memory/dmq mode.

Cheers,

Henning

*From:* sr-users 
 *On Behalf Of *Social Boh
*Sent:* Friday, July 30, 2021 6:42 PM
*To:* Kamailio (SER) - Users Mailing List
 
*Subject:* Re: [SR-Users] Access via script to location data in
the memory

Hello,

reg_fetch_conta

Re: [SR-Users] Access via script to location data in the memory

2021-07-31 Thread Henning Westerholt
Great, thanks for the confirmation.

Henning

From: sr-users  On Behalf Of Social Boh
Sent: Friday, July 30, 2021 8:36 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Access via script to location data in the memory


Works!

I can access location data presents only in the memory. Now, next step is using 
$(ulc(contacto=>socket)) to decide which Kamailio have to process the call.

Thank you

---

I'm SoCIaL, MayBe
El 30/07/2021 a las 11:51 a. m., Henning Westerholt escribió:
Hi,

just quickly looked in the registrar code, it uses the standard usrloc 
functions to get data from memory or database.

Maybe just give it a try, I think it should work also in in-memory/dmq mode.

Cheers,

Henning

From: sr-users 

 On Behalf Of Social Boh
Sent: Friday, July 30, 2021 6:42 PM
To: Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] Access via script to location data in the memory


Hello,

reg_fetch_contacts use a table (I understood) to looking for data about a user.

I'm using USRLOC module without database.

Regards



---

I'm SoCIaL, MayBe
El 30/07/2021 a las 11:18 a. m., Henning Westerholt escribió:
Hello,

have you looked to the reg_fetch_contact as already pointed out? Then you can 
access e.g. the socket with the $ulc PV, see the end of the registrar docs for 
an example.

Cheers,

Henning

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

From: sr-users 

 On Behalf Of Social Boh
Sent: Friday, July 30, 2021 6:11 PM
To: Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] Access via script to location data in the memory


Hello,

maybe is better I explain what I'd like to achieve:

I have two Kamailio using DMQ and DMQ_USRLOC modules so each REGISTER is 
replicate on each Kamailio. I'm using DNS weight to distribute the REGISTERs 
between the 2 Kamailios.

The only difference I have seen in the location data, with kamctl ul show 
command, is the Kamailio receives REGISTER have socket parameter with 
transport, ip, y port like udp:1.2.3.4:5060 where 1.2.3.4 is Kamailio public 
IP; the other Kamailio have this field empty.

When a call arrive to one Kamailio, querying the Socket field I can known if I 
have to send the INVITE locally or forward the INVITE to second Kamailio.

I don't know if there is other way to achieve this goal.

I think PATH protocol not apply here because If I reply the REGISTER to the 
second Kamailio adding path header, I don't need DMQ_USRLOC.

The idea is to take advantage of using these DMQ related modules.

Regards

---

I'm SoCIaL, MayBe
El 29/07/2021 a las 5:16 p. m., Henning Westerholt escribió:

Hello,



There are different functions in the registrar module, check them out: 
https://kamailio.org/docs/modules/devel/modules/registrar.html#idm576



reg_fetch_contacts(..) might be something you could use.



Cheers,



Henning


__
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