Re: [SR-Users] Guidelines on E164 conversions

2021-07-30 Thread Melissa Frasik
Thank you so much! I removed any $fU/$rU manipulation in favor of 
uac_replace_from/to and so far, results have been much more consistent. 
Appreciate all the help!


Melissa Frasik

Developer

melissa.fra...@iptelx.net

Phone:  (989) 891-2800

Fax:  (989) 891-2801

[cid:fd86c074-5618-48e4-8ca0-1ed41c69d3e0]

www.dicecorp.com



[cid:780ee621-51aa-4f13-90f6-6be3bb239e90][cid:ff4cc17e-fb35-400e-9d71-3ab0bd466f0c][cid:53753460-c1c5-4c07-ac8e-d61c778095de][cid:02bbb391-2898-4410-90eb-5b311af9e37e][cid:57fbdb17-aa8e-462b-b7ba-8efac17f3145]


From: Henning Westerholt 
Sent: Thursday, July 29, 2021 9:35 AM
To: Kamailio (SER) - Users Mailing List 
Cc: Melissa Frasik 
Subject: RE: Guidelines on E164 conversions


Hello,



Yes – as said, you should use the uac functions to change the From/To headers. 
This is recommended over using the $fU or $tU.



Cheers,



Henning



From: sr-users  On Behalf Of Melissa Frasik
Sent: Wednesday, July 28, 2021 7:52 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Guidelines on E164 conversions



Hello,



My apologies, I seem to have ​posted an incomplete code segment. I only seem to 
have issues when it comes to replacing $fU (before using uac_replace_from) - 
the same action on $rU seems to work properly. In the below situation, the $fU 
variable should be updated with the plus, but the $avp(uacreplacefromdisplay) 
variable has the value of the original $fU, not the updated one. Is this 
practice redundant, and should actions on $fU and $rU be avoided in favor of 
uac_replace_to/uac_replace_from?





$fU = "+" + $avp(src=>countrycode) + $fU;

$avp(uacreplacefromdisplay) = $fU;

$avp(uacreplacefromuri) = $fu;



if ($avp(uacreplacefromdisplay) && $avp(uacreplacefromuri)) {


uac_replace_from("$avp(uacreplacefromdisplay)","$avp(uacreplacefromuri)");

$avp(uacreplacefromdisplay[*])=$null;

$avp(uacreplacefromuri[*])=$null;

}



xlog("$ci - converting domestic caller id number to $fU ($fu) - 
$avp(uacreplacefromdisplay) $avp(uacreplacefromuri)");




Thank you so much for your help!



From: Henning Westerholt mailto:h...@skalatan.de>>
Sent: Wednesday, July 28, 2021 1:29 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Cc: Melissa Frasik 
mailto:melissa.fra...@dicecorp.com>>
Subject: RE: Guidelines on E164 conversions



Hello,



If you want to change the From (or To) header content, you should use the “uac” 
modules replace_from/_to functions. They will transparently make sure that both 
end-points get the correct header content.



Cheers,



Henning



--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com





From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Melissa Frasik
Sent: Tuesday, July 27, 2021 11:26 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] Guidelines on E164 conversions



Hi all,

I'm running into some issues with E164 conversions and was wondering if there 
was a decent standardized method for conversions. Conversions using $rU seem to 
be working great, but $fU is behaving badly. This is what I have so far:

xlog("$ci - caller id was $avp(src=>callerid)");



if($avp(src=>callerid) =~ "^\+"){

xlog("$ci - caller id already E164");

}else if($(rU{s.substr,0,$(avp(src=>countrycode){s.len})}) == 
$avp(src=>countrycode)){

$avp(src=>callerid) = "+" + $avp(src=>callerid);

$fU = $avp(src=>callerid);

$avp(uacreplacefromdisplay) = $fU;

$avp(uacreplacefromuri) = $fu;

xlog("$ci - Adding plus to make caller id e164");

}else{

$fU = "+" + $avp(src=>countrycode) + $fU;

$avp(uacreplacefromdisplay) = $fU;

$avp(uacreplacefromuri) = $fu;

xlog("$ci - converting domestic caller id number to $fU ($fu) - 
$avp(uacreplacefromdisplay) $avp(uacreplacefromuri)");

}



Previously, I'd found a suggestion mentioning using uac_replace_from in the 
route[RELAY] (which is the purpose of the uacreplacefrom avps), but $fU does 
not appear to be changing its value. Is there something I'm doing incorrectly?
__
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-30 Thread Social Boh

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


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

2021-07-30 Thread Social Boh

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


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

2021-07-30 Thread Social Boh

I'll try and report.

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


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

2021-07-30 Thread Henning Westerholt
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


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

2021-07-30 Thread Social Boh

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


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

2021-07-30 Thread Henning Westerholt
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


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

2021-07-30 Thread Social Boh

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


Re: [SR-Users] Integration with multiple MS Teams instances

2021-07-30 Thread Володимир Іванець
Unfortunately, I faced a different problem after the
"tls_set_connect_server_id()" function was applied.

After Kamailio starts, second trunk is the first one to establish
connection:

*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/parser/msg_parser.c:154]: get_hdr_field(): cseq : <10>
*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/parser/parse_hname2.c:294]: parse_sip_header_name(): parsed header
name [Call-ID] type 6*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tm [uac.c:189]:
uac_refresh_hdr_shortcuts(): cseq: [CSeq: 10]*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/tcp_main.c:1993]: tcp_send(): no open tcp connection found, opening
new one*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/ip_addr.c:577]: print_ip(): tcpconn_new: new tcp connection:
52.114.75.24*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/tcp_main.c:1175]: tcpconn_new(): on port 5061, type 3, socket -1*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/tcp_main.c:1498]: tcpconn_add(): hashes: 2831:67:0, 1*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_server.c:244]: tls_complete_init(): completing tls connection
initialization*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_server.c:207]: tls_get_connect_server_name(): xavp with outbound
server name not found*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_server.c:180]: tls_get_connect_server_id(): xavp with outbound server
id not found*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_server.c:184]: tls_get_connect_server_id(): found global outbound
server id: kamailio.domain2.com *
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_domain.c:1583]: tls_lookup_cfg(): comparing addr: [172.16.30.206:5063
]  [172.16.30.206:0 ] --
id: [kamailio.domain2.com ]
[kamailio.domain2.com ]*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_domain.c:1586]: tls_lookup_cfg(): TLS config found by server id*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_server.c:274]: tls_complete_init(): Using initial TLS domain
TLSc<172.16.30.206:5063 > (dom 0x7f2d2a5f17a0
ctx 0x7f2d2abebad8 sn [kamailio.domain2.com ])*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_domain.c:1208]: tls_lookup_private_key(): Private key lookup for
SSL_CTX-0x7f2d2abebad8: (nil)*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tls
[tls_domain.c:778]: sr_ssl_ctx_info_callback(): SSL handshake started*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/tcp_main.c:2888]: tcpconn_1st_send(): pending write on new connection
0x7f2d2afb4680 sock 10 (-1/517 bytes written) (err: 11 - Resource
temporarily unavailable)*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tm [uac.c:686]:
send_prepared_request_impl(): uac: 0x7f2d2afb1420  branch: 0  to
52.114.75.24:5061 *






































*# kamcmd core.tcp_list{id: 1type: TLSstate:
CONN_OKtimeout: 3lifetime: 600ref_count: 2
src_ip: 52.114.75.24src_port: 5061dst_ip: 172.16.30.206
dst_port: 0}{id: 2type: TLSstate: CONN_OK
  timeout: 3lifetime: 600ref_count: 2src_ip:
52.114.75.24src_port: 4290dst_ip: 172.16.30.206
dst_port: 5063}{id: 3type: TLSstate: CONN_OK
timeout: 566lifetime: 600ref_count: 1src_ip:
52.114.75.24src_port: 4291dst_ip: 172.16.30.206
dst_port: 5063}*

Then Kamailio initiates connection for the first trunk:

*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/parser/msg_parser.c:154]: get_hdr_field(): cseq : <10>
*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/parser/parse_hname2.c:294]: parse_sip_header_name(): parsed header
name [Call-ID] type 6*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tm [uac.c:189]:
uac_refresh_hdr_shortcuts(): cseq: [CSeq: 10]*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: 
[core/tcp_main.c:1610]: _tcpconn_find(): found connection by peer address
(id: 1)*
*Jul 29 21:25:22 kamailio /usr/sbin/kamailio[2645]: DEBUG: tm [uac.c:686]:
send_prepared_request_impl(): uac: 0x7f2d2afce198  branch: 0  to
52.114.75.24:5061 *


Although it has to connect from a different socket it sees an active
connection to the same address and uses it instead. It looks like it sends
SIP requests for both trunks through the single TLS connection.

Does anyone know how to make Kamailio create separate TLS connections from
different sockets for different tr

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

2021-07-30 Thread Denys Pozniak
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


Re: [SR-Users] How to unload previously loaded destinations in the case of applying multiple ds_select_domain

2021-07-30 Thread Daniel-Constantin Mierla
Hello,

delete the xavps based on the names you set via modparams xavp_dst and
xavp_ctx.

Cheers,
Daniel

On 30.07.21 11:14, Serdar GÜÇLÜER wrote:
> Hello all,
>
> I have a trouble that is related to the way of usage of dispatcher module.
>
> I am working with Kamailio 5.3.2 and using dispatcher module as load
> balancer to route calls to the media gateways.
>
> My dispatching routes are below as simply,
>
> route[DISPATCH] {
> if(ds_select_domain("2", "4")) {
> route(MYRELAY);
> } else {
> send_reply("503","Service Unavailable - No MGW");
> exit;
> }
> }
> route[MYRELAY] {
> t_on_failure("MYFAILURE");
> if(!t_relay()) {
> sl_reply_error();
> }
> exit;
> }
> failure_route[MYFAILURE] {
> route(NATMANAGE);
> revert_uri();
> if (t_is_canceled()) {
> exit;
> }
> if ($T_reply_code == 408 || $T_reply_code == 503) {
> if(ds_next_domain()) {
> route(MYRELAY);
> } else {
> send_reply("503","Service Unavailable");
> exit;
> }
> } else {
> if(ds_select_domain("6", "4")) {
> route(MYVMRELAY);
> } else {
> send_reply(486,"Busy");
> exit;
> }
> }
> }
> route[MYVMRELAY] {
> t_on_failure("MYVMFAILURE");
> if(!t_relay()) {
> sl_reply_error();
> }
> exit;
> }
> failure_route[MYVMFAILURE] {
> route(NATMANAGE);
> revert_uri();
> if (t_is_canceled()) {
> exit;
> }
> if(ds_next_domain()) {
> route(MYVMRELAY);
> } else {
> send_reply("503","Service Unavailable");
> exit;
> }
> }
>
>
> I have multiple media gateways(setid=2) and voicemail
> servers(setid=6). As can be seen from the configuration,
> after first routing, for transaction reply code except 408 or 503, I
> am routing call to the voicemail server using dispatcher.
> In that phase, dispatcher module is remembering previously loaded
> destinations that come from first ds_select_domain
> and module try to route these destinations in the case that all
> voicemail servers are unavailable.
> So basically, I want to unload all destinations comes from previous
> ds_select_domain.
>
> From the documentation, i tried ds_load_update and ds_load_unset
> methods but not worked for me.
>
> Is there any way to overcome that problem or any right usages of these
> methods.
>
> Thank you,
>
> Serdar
>
>
> __
> 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

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda

__
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


[SR-Users] help

2021-07-30 Thread Said Hassani
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


[SR-Users] How to unload previously loaded destinations in the case of applying multiple ds_select_domain

2021-07-30 Thread Serdar GÜÇLÜER

Hello all,

I have a trouble that is related to the way of usage of dispatcher module.

I am working with Kamailio 5.3.2 and using dispatcher module as load 
balancer to route calls to the media gateways.


My dispatching routes are below as simply,

route[DISPATCH] {
if(ds_select_domain("2", "4")) {
route(MYRELAY);
} else {
send_reply("503","Service Unavailable - No MGW");
exit;
}
}
route[MYRELAY] {
t_on_failure("MYFAILURE");
if(!t_relay()) {
sl_reply_error();
}
exit;
}
failure_route[MYFAILURE] {
route(NATMANAGE);
revert_uri();
if (t_is_canceled()) {
exit;
}
if ($T_reply_code == 408 || $T_reply_code == 503) {
if(ds_next_domain()) {
route(MYRELAY);
} else {
send_reply("503","Service Unavailable");
exit;
}
} else {
if(ds_select_domain("6", "4")) {
route(MYVMRELAY);
} else {
send_reply(486,"Busy");
exit;
}
}
}
route[MYVMRELAY] {
t_on_failure("MYVMFAILURE");
if(!t_relay()) {
sl_reply_error();
}
exit;
}
failure_route[MYVMFAILURE] {
route(NATMANAGE);
revert_uri();
if (t_is_canceled()) {
exit;
}
if(ds_next_domain()) {
route(MYVMRELAY);
} else {
send_reply("503","Service Unavailable");
exit;
}
}


I have multiple media gateways(setid=2) and voicemail servers(setid=6). 
As can be seen from the configuration,
after first routing, for transaction reply code except 408 or 503, I am 
routing call to the voicemail server using dispatcher.
In that phase, dispatcher module is remembering previously loaded 
destinations that come from first ds_select_domain
and module try to route these destinations in the case that all 
voicemail servers are unavailable.
So basically, I want to unload all destinations comes from previous 
ds_select_domain.


From the documentation, i tried ds_load_update and ds_load_unset 
methods but not worked for me.


Is there any way to overcome that problem or any right usages of these 
methods.


Thank you,

Serdar

__
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