Re: [SR-Users] Kamailio IMS as kubernetes pods

2020-08-25 Thread Sergey Safarov
I am not k8s developer.
So cannot provide detailed instructions. Just my point of view.

You can look
https://kubernetes.io/docs/concepts/extend-kubernetes/operator/
https://www.magalix.com/blog/creating-custom-kubernetes-operators



On Tue, Aug 25, 2020 at 7:41 PM Pavithra Mohanraja 
wrote:

> Hi,
>
> It would be helpful if you could elaborate what has to be done for
> kubernetes pods when you mention sip ingress
>
>
> Thanks,
> Pavithra
>
> On Tue, Aug 25, 2020, 9:32 PM Sergey Safarov  wrote:
>
>> Lot of issues with static IP in Kubernetes.
>>
>> Looks as need deploy "sip ingress" like "HTTP/HTTPS ingress" and then
>> route calls to pods.
>>
>>
>> On Tue, Aug 25, 2020 at 4:40 PM Pavithra Mohanraja <
>> pavimohan3...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am configuring kamailio IMS as kubernetes pods .
>>> so each component will be configured as separate pod .
>>> In order to establish a connection between pods , I am configuring bind9
>>> dns server in pcscf pod itself. Communication is happening via Pod IP
>>> address.
>>>
>>> Is there any possibility to have the communication using cluster IP . If
>>> anybody is aware of kubernetes, Please help me in this regard.
>>>
>>> I have my /etc/resolv.conf file in pods with
>>> nameserver 
>>> search 
>>>
>>> Please help.
>>>
>>>
>>> Thanks,
>>> Pavithra
>>> ___
>>> 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
>>
> ___
> 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] Kamailio routing incoming phone call ranges to different dispatch groups

2020-08-25 Thread David Villasmil
If you’re using a db, You could also use use_preference and set the
dispatcher group there. So that if you need to change existing or add new
numbers, you don’t need to change the config, simply add them to the table.

On Tue, 25 Aug 2020 at 07:38, Jurijs Ivolga  wrote:

> Hi Patrik,
>
> It would help if you will include your config and some logs.
>
> But something like this should work:
>
>
>
> if($rU=~"^(0201316)[0-1][0-9]$")
>
> {
>
>
>
> ds_select_dst("1", "4")
>
>
>
>
> }  else {
>
>
>
>
>
> ds_select_dst("2", "4")
>
>
>
>
>
>
>
>
> }
>
>
>
>
>
> I never tried this code, so it might have some errors, but you should
> understand the overall idea.
>
>
> Jurijs
>
>
> On Tue, Aug 25, 2020 at 9:18 AM Patrik Nilsson  wrote:
>
>> Hi,
>>
>> Although what I'm trying to achieve seems like an easy task, I have been
>> tearing my hair for the past two days getting Kamailio to dispatch incoming
>> phone calls to two different groups of Asterisk servers in my dispatcher
>> list. I have 30 dedicated phone numbers from Telco: 020131600 - 020131629.
>> I want 00-19 to be routed to Group 1, and 20-29 to be routed to Group 2,
>> with a Round-robin algorithm. I'm aware that I can set up these incoming
>> phone numbers in each Asterisk server's extension dial plans; nevertheless,
>> I want Kamailio to do the initial incoming routing to a specific group (as
>> Group 2, for instance, will never receive calls from for
>> instance 02013161).
>>
>> Example dispatcher.list:
>> #Company A (Group 1)
>> 1 sip:10.50.0.1 0 0 maxload=20
>> 1 sip:10.50.0.2 0 0 maxload=20
>> 1 sip:10.50.0.3 0 0 maxload=20
>> #Company B (Group 2)
>> 2 sip: 10.60.0.1 0 0 maxload=20
>> 2 sip: 10.60.0.2 0 0 maxload=20
>> 2 sip: 10.60.0.3 0 0 maxload=20
>>
>> I assume this is done in the route[DISPATCH] of my kamailio.cfg, using
>> ds_select_dst, but my previous attempts to get this routing to work just
>> breaks the config file.
>>
>> I appreciate any help that I can get!
>>
>> Best regards,
>> Patrik
>> ___
>>
>>
>> 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
>
> --
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio IMS as kubernetes pods

2020-08-25 Thread Pavithra Mohanraja
Hi,

It would be helpful if you could elaborate what has to be done for
kubernetes pods when you mention sip ingress


Thanks,
Pavithra

On Tue, Aug 25, 2020, 9:32 PM Sergey Safarov  wrote:

> Lot of issues with static IP in Kubernetes.
>
> Looks as need deploy "sip ingress" like "HTTP/HTTPS ingress" and then
> route calls to pods.
>
>
> On Tue, Aug 25, 2020 at 4:40 PM Pavithra Mohanraja <
> pavimohan3...@gmail.com> wrote:
>
>> Hi,
>>
>> I am configuring kamailio IMS as kubernetes pods .
>> so each component will be configured as separate pod .
>> In order to establish a connection between pods , I am configuring bind9
>> dns server in pcscf pod itself. Communication is happening via Pod IP
>> address.
>>
>> Is there any possibility to have the communication using cluster IP . If
>> anybody is aware of kubernetes, Please help me in this regard.
>>
>> I have my /etc/resolv.conf file in pods with
>> nameserver 
>> search 
>>
>> Please help.
>>
>>
>> Thanks,
>> Pavithra
>> ___
>> 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
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio IMS as kubernetes pods

2020-08-25 Thread Sergey Safarov
Lot of issues with static IP in Kubernetes.

Looks as need deploy "sip ingress" like "HTTP/HTTPS ingress" and then route
calls to pods.


On Tue, Aug 25, 2020 at 4:40 PM Pavithra Mohanraja 
wrote:

> Hi,
>
> I am configuring kamailio IMS as kubernetes pods .
> so each component will be configured as separate pod .
> In order to establish a connection between pods , I am configuring bind9
> dns server in pcscf pod itself. Communication is happening via Pod IP
> address.
>
> Is there any possibility to have the communication using cluster IP . If
> anybody is aware of kubernetes, Please help me in this regard.
>
> I have my /etc/resolv.conf file in pods with
> nameserver 
> search 
>
> Please help.
>
>
> Thanks,
> Pavithra
> ___
> 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] RTP PROXY (rtpproxy_stream2uas getting error)

2020-08-25 Thread Daniel-Constantin Mierla
Hello,

depending on the direction, you may have to use stream to uac function,
I can see you use only stream to uas function.

Cheers,
Daniel

On 25.08.20 16:16, Amit Pal wrote:
>
> Dear Daniel,
>   I am using following snippets.
> when I am using hold from caller  side then still no hold sound play
> to callee but when hold from callee getting  error “handle_play: can't
> create player”
>
> my scripts snippets
>
> #IN Request ROUTE
>
> if (is_method("INVITE")) {
>
>     if (has_body("application/sdp")) {
>
>     if(rtpproxy_offer()){
>
>    
> t_on_reply("1");
>
>     }
>
>         if (is_audio_on_hold()) {
>
>        
> xlog("SCRIPT: [$cfg(route)][$T_branch_idx] is_Audio_on_Hold_RTPPROXY
> audio on hold, preparing to play media on reply to $rm\n");
>
>    
> rtpproxy_stream2uas("/home/coralswitch/queuesounds/moh2.wav", "-1");
>
>     } else {
>
>    
> xlog("SCRIPT: [$cfg(route)][$T_branch_idx] is_Audio_on_UNHold_RTPPROXY
> audio on hold, preparing to play media on reply to $rm\n");
>
>         rtpproxy_stop_stream2uas();
>
>     };
>
>     }else {
>
>         t_on_reply("2");
>
>     }
>
>  if (is_method("ACK") && has_body("application/sdp")) {  
>
>     rtpproxy_answer();
>
> }
>
>  
>
>  
>
>  
>
> #ON REPLY ROUTE
>
>  
>
> onreply_route[1]
>
> {
>
>     if (has_body("application/sdp"))  {   
>
>     set_rtp_proxy_set(0);
>
>     rtpproxy_answer();
>
>     }
>
>    
>
> }
>
>  
>
> onreply_route[2]
>
> {
>
>     if (has_body("application/sdp")){
>
>     rtpproxy_offer();
>
>     }
>
> }
>
>  
>
> Please guide what is wrong here.
>
>
> Thanks
>
>  
>
> Regards
>
> Amit Pal
>
>  
>
>  
>
>  
>
>  
>
> *From:* Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Tuesday, August 25, 2020 6:57 PM
> *To:* Kamailio (SER) - Users Mailing List; Amit Pal
> *Subject:* Re: [SR-Users] RTP PROXY (rtpproxy_stream2uas getting error)
>
>  
>
> Hello,
>
> that typically happens when you try to play to the callee before
> knowing where it expect the RTP (before getting response with sdp for
> INVITE). Maybe you can share the relevant config snippets to see if we
> can spot something wrong there.
>
> Cheers,
> Daniel
>
> On 24.08.20 13:18, Amit Pal wrote:
>
> Dear Team ,
>
> I am using  Kamailio and RTPProxy for media. I
> am trying to play caller/callee side  media by
> rtpproxy_stream2uas/ rtpproxy_stream2uac.
>
> But I am getting error
>
>  
>
> secondary rtpproxy[27007]: DBUG:handle_command: received command
> "29329_6 P-1
> 2c60634699018317MTg0YzVlODc0NTBiZGU1ZGJiYmNmYjY1MDc0MjIwMzI.
> /home/coralswitch/queuesounds/moh2.wav session
> b2f563cf067c489ca7102e96b622f2f1;1 9f10411f;1"
>
> rtpproxy[27007]: ERR:handle_play: can't create player
>
> rtpproxy[27007]: DBUG:doreply: sending reply "29329_6 E6#012"
>
> rtpproxy[27007]: INFO:process_rtp: session timeout
>
> rtpproxy[27007]: INFO:remove_session: RTP stats: 1083 in from
> callee, 936 in from caller, 2019 relayed, 0 dropped
>
> rtpproxy[27007]: INFO:remove_session: RTCP stats: 30 in from
> callee, 41 in from caller, 71 relayed, 0 dropped
>
> rtpproxy[27007]: INFO:remove_session: session on ports 36556/60108
> is cleaned up
>
>  
>
> why this error are coming *. Even some time with change in script
> following error   “handle_play: can't create player” not showing
> but even not media playing.*
>
> Log are attached with mail.
>
> Please do the need full.
>
>  
>
>  
>
> Regards
>
> Amit Pal
>
>  
>
>
>
> ___
>
> Kamailio (SER) - Users Mailing List
>
> sr-users@lists.kamailio.org 
>
> 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 
> Funding: https://www.paypal.me/dcmierla

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

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


Re: [SR-Users] Setup Push notifications from SIP-PBX to Linphone Android -

2020-08-25 Thread Alex Balashov
I suppose that is the general way of things.

—
Sent from mobile, with due apologies for brevity and errors.

> On Aug 25, 2020, at 11:33 AM, Johnny Ritzer  wrote:
> 
> 
> Sweeet thanks   at least I know it can be  done hehe. Just have to  code it 
> right  
>  
> From: sr-users 
> Date: Tuesday, August 25, 2020 at 7:17 AM
> To: Kamailio (SER) - Users Mailing List 
> Subject: Re: [SR-Users] Setup Push notifications from SIP-PBX to Linphone 
> Android -
> 
> Hello,
> 
> for the records, videos with Federico's presentations about this topic are on 
> youtube KamailioWorld channel:
> 
>  * https://www.youtube.com/c/KamailioWorld/
> 
> And slides should be on:
> 
>   * https://www.kamailio.org/events/
> 
> Look at the past KamailioWorld conferences.
> 
> Cheers,
> Daniel
> 
> On 25.08.20 08:30, Federico Cabiddu wrote:
> Hi,
> you can watch this presentation for an introduction to mobile pushes and a 
> simple way of approaching them.
> For a more standard approach you can have a look at this recent RFC: 
> https://tools.ietf.org/html/rfc8599 about push notifications with SIP.
>  
> Best regards,
>  
> Federico
>  
> On Sun, Aug 23, 2020 at 7:56 AM Johnny Ritzer  wrote:
> I have a setup where we wanted to just build a android app linphone to 
> SIP-PBX.
>  
> But come to find out upon further research due to potential battery 
> drain/background app usage. The device isn’t registered all the time and need 
> some sort of push notification to google firebase back to android app to 
> re-setup the register / INVITE call.
>  
> Is there a  module/config of this kind of setup.  (now could I use  cloud 
> kamailio  or would this have to  be onsite local  to the PBX).
> ___
> 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
> -- 
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
> ___
> 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] Setup Push notifications from SIP-PBX to Linphone Android -

2020-08-25 Thread Johnny Ritzer
Sweeet thanks   at least I know it can be  done hehe. Just have to  code it 
right  

From: sr-users 
Date: Tuesday, August 25, 2020 at 7:17 AM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Setup Push notifications from SIP-PBX to Linphone 
Android -

Hello,

for the records, videos with Federico's presentations about this topic are on 
youtube KamailioWorld channel:

 * https://www.youtube.com/c/KamailioWorld/

And slides should be on:

  * https://www.kamailio.org/events/

Look at the past KamailioWorld conferences.

Cheers,
Daniel
On 25.08.20 08:30, Federico Cabiddu wrote:
Hi,
you can watch this presentation for an introduction to mobile pushes and a 
simple way of approaching them.
For a more standard approach you can have a look at this recent RFC: 
https://tools.ietf.org/html/rfc8599 about push notifications with SIP.

Best regards,

Federico

On Sun, Aug 23, 2020 at 7:56 AM Johnny Ritzer 
mailto:sudor...@gmail.com>> wrote:
I have a setup where we wanted to just build a android app linphone to SIP-PBX.

But come to find out upon further research due to potential battery 
drain/background app usage. The device isn’t registered all the time and need 
some sort of push notification to google firebase back to android app to 
re-setup the register / INVITE call.

Is there a  module/config of this kind of setup.  (now could I use  cloud 
kamailio  or would this have to  be onsite local  to the PBX).
___
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

--

Daniel-Constantin Mierla -- www.asipto.com

www.twitter.com/miconda -- 
www.linkedin.com/in/miconda

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


Re: [SR-Users] RTP PROXY (rtpproxy_stream2uas getting error)

2020-08-25 Thread Amit Pal
Dear Daniel,
  I am using following snippets.
when I am using hold from caller  side then still no hold sound play to
callee but when hold from callee getting  error "handle_play: can't create
player"

my scripts snippets

#IN Request ROUTE

if (is_method("INVITE")) {

if (has_body("application/sdp")) {

if(rtpproxy_offer()){

 
t_on_reply("1");

}

if (is_audio_on_hold()) {

 
xlog("SCRIPT: [$cfg(route)][$T_branch_idx] is_Audio_on_Hold_RTPPROXY audio
on hold, preparing to play media on reply to $rm\n");

 
rtpproxy_stream2uas("/home/coralswitch/queuesounds/moh2.wav", "-1");

} else {

 
xlog("SCRIPT: [$cfg(route)][$T_branch_idx] is_Audio_on_UNHold_RTPPROXY audio
on hold, preparing to play media on reply to $rm\n");

rtpproxy_stop_stream2uas();

};

}else {

t_on_reply("2");

}

 if (is_method("ACK") && has_body("application/sdp")) {   

rtpproxy_answer();

}

 

 

 

#ON REPLY ROUTE

 

onreply_route[1]

{

if (has_body("application/sdp"))  {

set_rtp_proxy_set(0);

rtpproxy_answer();

}



}

 

onreply_route[2]

{

if (has_body("application/sdp")){

rtpproxy_offer();

}

}

 

Please guide what is wrong here.


Thanks

 

Regards

Amit Pal

 

 

 

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Tuesday, August 25, 2020 6:57 PM
To: Kamailio (SER) - Users Mailing List; Amit Pal
Subject: Re: [SR-Users] RTP PROXY (rtpproxy_stream2uas getting error)

 

Hello,

that typically happens when you try to play to the callee before knowing
where it expect the RTP (before getting response with sdp for INVITE). Maybe
you can share the relevant config snippets to see if we can spot something
wrong there.

Cheers,
Daniel

On 24.08.20 13:18, Amit Pal wrote:

Dear Team , 

I am using  Kamailio and RTPProxy for media. I am trying
to play caller/callee side  media by rtpproxy_stream2uas/
rtpproxy_stream2uac.

But I am getting error

 

secondary rtpproxy[27007]: DBUG:handle_command: received command "29329_6
P-1 2c60634699018317MTg0YzVlODc0NTBiZGU1ZGJiYmNmYjY1MDc0MjIwMzI.
/home/coralswitch/queuesounds/moh2.wav session
b2f563cf067c489ca7102e96b622f2f1;1 9f10411f;1"

rtpproxy[27007]: ERR:handle_play: can't create player

rtpproxy[27007]: DBUG:doreply: sending reply "29329_6 E6#012"

rtpproxy[27007]: INFO:process_rtp: session timeout

rtpproxy[27007]: INFO:remove_session: RTP stats: 1083 in from callee, 936 in
from caller, 2019 relayed, 0 dropped

rtpproxy[27007]: INFO:remove_session: RTCP stats: 30 in from callee, 41 in
from caller, 71 relayed, 0 dropped

rtpproxy[27007]: INFO:remove_session: session on ports 36556/60108 is
cleaned up

 

why this error are coming . Even some time with change in script following
error   "handle_play: can't create player" not showing but even not media
playing.

Log are attached with mail.

Please do the need full.

 

 

Regards

Amit Pal

 





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org  
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  
Funding: https://www.paypal.me/dcmierla


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


[SR-Users] Kamailio IMS as kubernetes pods

2020-08-25 Thread Pavithra Mohanraja
Hi,

I am configuring kamailio IMS as kubernetes pods .
so each component will be configured as separate pod .
In order to establish a connection between pods , I am configuring bind9
dns server in pcscf pod itself. Communication is happening via Pod IP
address.

Is there any possibility to have the communication using cluster IP . If
anybody is aware of kubernetes, Please help me in this regard.

I have my /etc/resolv.conf file in pods with
nameserver 
search 

Please help.


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


Re: [SR-Users] Is the "openssl bug #1491" relevant to openssl v.1.1.1?

2020-08-25 Thread Daniel-Constantin Mierla
Hello,

we should review those conditions, and limit their use for newer
versions of the libssl. Iirc, there is already an issue on tracker for
this topic.

The minimal free memory is probably still go to have as a safety, newer
complex algorithms and larger size for certificates make tls processing
more memory greedy.

Cheers,
Daniel

On 17.08.20 13:07, Leonid Fainshtein wrote:
> Hi,
> Is it still necessary to care about the minimal free memory amount in
> the TLS module configuration (e.g., the low_mem_threshold1/2
> parameters) in Ubuntu 18.04 with openssl v.1.1.1?
> I tried to find some more information about the "openssl bug #1491"
> but the 1491 issue in the current Openssl bug tracking system seems to
> be not related to the memory problem:
>
> https://github.com/openssl/openssl/issues/1491
>
> Best regards,
> Leonid Fainshtein
> Xorcom Ltd
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 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
Funding: https://www.paypal.me/dcmierla

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


Re: [SR-Users] Kamailio drop calls with Teams

2020-08-25 Thread Daniel-Constantin Mierla
Hello,

run with debug=3 in kamailio.cfg and see if the ACK comes to Kamailio,
if yes, then some routing issue in kamailio.cfg. If does not come, you
will have to check the headers to see if MS Teams expects something else
there, typically is about Record-Route domains...

Cheers,
Daniel

On 20.08.20 12:25, sip user wrote:
> Hi, I'm connecting Teams with kamailio server. From Kamailio to teams
> I have no problems, but from teams to Kamailio yes. Drop the call..
>
> With ngrep I see that:
>
> INVITE
> sip:1005@CLIENT_IP:55766;transport=UDP;rinstance=d47edf336726e940 SIP/2.0.
> Record-Route: .
> Record-Route: .
> FROM: "Javier Gonz..lez
> Mu..oz";tag=c17bb1eb7f8649d4a89d8d4a876ac32b.
> TO: .
> CSEQ: 1 INVITE.
> CALL-ID: c1364913e582553a9a9c2544c3583b0a.
> MAX-FORWARDS: 69.
> Via: SIP/2.0/UDP
> 92.222.217.64;branch=z9hG4bK7bb5.0fbae76a37829205e04279f220a26af2.0;i=a1.
> VIA: SIP/2.0/TLS 52.114.76.76:5061;branch=z9hG4bKd216a55.
> RECORD-ROUTE:
> .
> CONTACT:
> .
> CONTENT-LENGTH: 1091.
> MIN-SE: 300.
> SUPPORTED: timer.
> USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.7.31.1 i.EUNO.0.
> CONTENT-TYPE: application/sdp.
> ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY.
> P-ASSERTED-IDENTITY: ,.
> PRIVACY: id.
> SESSION-EXPIRES: 3600.
> .
> v=0.
> o=- 165103 0 IN IP4 127.0.0.1.
> s=session.
> c=IN IP4 52.113.44.8.
> b=CT:1000.
> t=0 0.
> m=audio 50452 RTP/SAVP 104 9 103 111 18 0 8 97 101 13 118.
> c=IN IP4 52.113.44.8.
> a=rtcp:50453.
> a=ice-ufrag:FZTb.
> a=ice-pwd:yD3P7nr+xNq0VYdv7xpB1F+Y.
> a=rtcp-mux.
> a=candidate:1 1 UDP 2130706431 52.113.44.8 50452 typ srflx raddr
> 10.0.33.240 rport 50
>
> U CLIENT_IP:55766 -> FQND_IP:5060 #2
> SIP/2.0 180 Ringing.
> Via: SIP/2.0/UDP
> FQND_IP;branch=z9hG4bK7bb5.0fbae76a37829205e04279f220a26af2.0;i=a1.
> Via: SIP/2.0/TLS 52.114.76.76:5061;branch=z9hG4bKd216a55.
> Record-Route: .
> Record-Route: .
> Record-Route:
> .
> Contact:
> .
> To: ;tag=de4e6b45.
> From: "Javier Gonz..lez
> Mu..oz";tag=c17bb1eb7f8649d4a89d8d4a876ac32b.
> Call-ID: c1364913e582553a9a9c2544c3583b0a.
> CSeq: 1 INVITE.
> User-Agent: 3CXPhone 6.0.26523.0.
> Content-Length: 0.
>
> U CLIENT_IP:55766 -> FQND_IP:5060 #3
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP
> FQND_IP;branch=z9hG4bK7bb5.0fbae76a37829205e04279f220a26af2.0;i=a1.
> Via: SIP/2.0/TLS 52.114.76.76:5061;branch=z9hG4bKd216a55.
> Record-Route: .
> Record-Route: .
> Record-Route:
> .
> Contact:
> .
> To: ;tag=de4e6b45.
> From: "Javier Gonz..lez
> Mu..oz";tag=c17bb1eb7f8649d4a89d8d4a876ac32b.
> Call-ID: c1364913e582553a9a9c2544c3583b0a.
> CSeq: 1 INVITE.
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY,
> REFER, INFO, MESSAGE.
> Content-Type: application/sdp.
> Supported: replaces.
> User-Agent: 3CXPhone 6.0.26523.0.
> Content-Length: 1067.
> .
> v=0.
> o=3cxVCE 324945090 117647850 IN IP4 .
> s=3cxVCE Audio Call.
> t=0 0.
> m=audio 0 RTP/SAVP 104 9 103 111 18 0 8 97 101 13 118.
> c=IN IP4 52.113.44.8.
> a=rtpmap:104 SILK/16000.
> a=rtpmap:9 G722/8000.
> a=rtpmap:103 SILK/8000.
> a=rtpmap:111 SIREN/16000.
> a=fmtp:111 bitrate=16000.
> a=rtpmap:18 G729/8000.
> a=fmtp:18 annexb=no.
> a=rtpmap:0 PCMU/8000.
> a=rtpmap:8 PCMA/8000.
> a=rtpmap:97 RED/8000.
> a=rtpmap:101 telephone-event/8000.
> a=fmtp:101 0-16.
> a=rtpmap:13 CN/8000.
> a=rtpmap:118 CN/16000.
> a=rtcp:50453.
> a=ice-ufrag:FZTb.
> a=ice-pwd:yD3P7nr+xNq0VYdv7xpB1F+Y.
> a=rtcp-mux.
> a=candidate:1 1 UDP 213
>
> I never received ACK..
>
> In my configuration:
>
> Kamailio.cfg:
>
> #!KAMAILIO
> #!define WITH_TLS
>
> event_route[tm:local-request] {
>
>         if(is_method("OPTIONS") && $ru =~ "pstnhub.microsoft.com
> ") {
>                append_hf("Contact: \r\n");
>         }
>         xlog("L_INFO", "Sent out tm request: $mb\n");
> }
>
> request_route{
>
>    remove_hf("Route");
>         if (is_method("INVITE|SUBSCRIBE")) {
>                 xlog("L_INFO","$fU is trying to call to $rU con
> valores $tu\n");
>                 $rU="1005";
>         }
> }
>
> What I'm doing wrong?
>
> I don't understand why not received ACK..
>
> Could anyone help me?
>
> Thanks
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 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
Funding: https://www.paypal.me/dcmierla

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


Re: [SR-Users] Weird config parsing issues - 5.4

2020-08-25 Thread Daniel-Constantin Mierla
Hello,

in such cases, check the config file content and be sure you have
corresponding "#!endif" for each #!ifdef or #!ifndef.

Cheers,
Daniel

On 20.08.20 17:46, Noah Mehl wrote:
> All,
>
> I have built branch 5.4 from source, and I’m working with the default config. 
>  However, from time to time I get this error when launching kamailio:
>
> root@inbound-kamailio-test-02:~# /usr/local/sbin/kamailio -P 
> /run/kamailio/kamailio.pid -f /usr/local/etc/kamailio/kamailio.cfg -m 128 -M 
> 64 -E
>  0(1296) CRITICAL:  [core/cfg.y:3588]: yyerror_at(): parse error in 
> config file /usr/local/etc/kamailio/kamailio.cfg, line 410, column 30-34: 
> syntax error
>  0(1296) CRITICAL:  [core/cfg.y:3588]: yyerror_at(): parse error in 
> config file /usr/local/etc/kamailio/kamailio.cfg, line 410, column 30-34: 
> Invalid arguments
>  0(1296) CRITICAL:  [core/cfg.y:3591]: yyerror_at(): parse error in 
> config file /usr/local/etc/kamailio/kamailio.cfg, line 410, column 35: 
> ERROR: bad config file (3 errors)
>  0(1296) ERROR:  [core/ppcfg.c:234]: pp_ifdef_level_error(): different 
> number of preprocessor directives: 1 more #!if[n]def as #!endif
>
> However, if I run a “make install” from the source directory, this error goes 
> away.  Has anyone run into this issue before?
>
> Configs attached.
>
> Thanks!
>
> ~Noah
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 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
Funding: https://www.paypal.me/dcmierla

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


Re: [SR-Users] CockroachDB and Kamailio

2020-08-25 Thread Daniel-Constantin Mierla
Hello,

somehow I understood that you want to replace id filed in tables from
integer (auto increment) to some sort of string uid. Some modules expect
that field to be integer, so changing its type can break them. If you
change to use random unique values instead of auto-increment, then I
expect to work.

Cheers,
Daniel

On 21.08.20 23:47, Noah Mehl wrote:
> Daniel/Henning,
>
> I have created a new branch that is much more CockroachDB
> compatible: https://github.com/reperio/kamailio/tree/cockroachdb-compat
>
> So far, the only thing I’ve noticed that isn’t compatible
> is: 
> https://github.com/reperio/kamailio/blob/62aad6591423e1f693397d33ddefd234938d1293/utils/kamctl/kamdbctl.pgsql#L137,
> as the concat() function actually exists in PostgreSQL > 9ish and
> CockroachDB.  That being said, the only difference I can find between
> MySQL rand() and PostgreSQL random() is just the name.  Is this still
> an issue with the lcr module?  If so, can you point me to where it’s
> being used?
>
> Otherwise, I have tested this update with PostgreSQL and CockroachDB.
>
> Thanks!
>
> ~Noah
>
>> On Aug 21, 2020, at 2:38 PM, Noah Mehl > > wrote:
>>
>> Daniel,
>>
>> Thanks for the thoughtful reply.  I can, at the very least, try and
>> work on the stock pgsql scripts to work OOTB with CockroachDB (minus
>> the create functions).
>>
>> The only table we really care about UUID right now is subscriber, and
>> we can just track that ourselves.
>>
>> I will give kamcli a try, and hopefully will be able to help in the
>> future.
>>
>> Thanks!
>>
>> ~Noah
>>
>>> On Aug 21, 2020, at 4:34 AM, Daniel-Constantin Mierla
>>> mailto:mico...@gmail.com>> wrote:
>>>
>>> Hello,
>>>
>>> the default kamailio.cfg is aiming to offer a starting point for
>>> building more complex configuration/SIP routing policies, not to
>>> offer all the options we support in Kamailio. MySQL is provided
>>> there to show how to connect to database, being chosen because it
>>> was the first database connect module that was developed and it is
>>> kept because it is still very popular. You are more than welcome to
>>> add a sample config of using postgress, which can be placed
>>> somewhere in the misc/examples/. Making the default config too
>>> complex may result in "scaring" the people trying to use Kamailio
>>> for first time.
>>>
>>> Using string UUID instead of the auto-increment integer id it will
>>> break at least lcr and msilo, iirc. Most of the modules do not use
>>> id column, but some do it. Siremis, the web management interface is
>>> also using the id field, but it doesn't support Postgres at this moment.
>>>
>>> If you have some Python knowledge (and spare time), maybe you can
>>> help adding support for it in kamcli:
>>>
>>>   * https://github.com/kamailio/kamcli
>>>
>>> kamcli aims to be a more modern alternative to kamctl/kamdbctl
>>> (e.g., better input validation, flexibility in output formatting,
>>> internal interactive shell with auto-completion, ...), eventually
>>> replacing them in the future. So far I was focusing on MySQL, being
>>> the database type I use. Most of the commands should just work for
>>> Postgres, because db operations are done using SqlAlchemy package,
>>> but a few commands (from the kamcli db ... subcommand) use the cli
>>> tool of the database system. At the end these can be skipped, iirc,
>>> also for kamctl, some of the corresponding subcommands are only for
>>> mysql (like kamctl db connect), but testing and seeing if it works
>>> or not with Postgres or CockroachDB would be appreciated.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 20.08.20 22:42, Noah Mehl wrote:
 Henning,

 So, for the default config, it only has the option for: WITH_MYSQL.
  I was wondering if a WITH_PGSQL would be accepted.

 As for the kamdbctl scripts, there are a few things I’ve noticed:

 I would prefer UUID vs SERIAL.  This actually is a little more
 annoying when dealing with the SEQUENCE entity in Postgres.  The
 only change required, is to load the pgcrypto extension and switch
 to uuid instead of SERIAL.  I have a tracking branch here:

 https://github.com/reperio/kamailio/tree/postgres_uuid

 The other reason is that for cockroachdb, using gen_random_uuid()
 is documented to be more efficient
  (in
 addition to being a preference).

 As for cockroachdb, I have a tracking branch (based on the uuid
 branch) that seems to be working well:

 https://github.com/reperio/kamailio/tree/cockroach

 So far, the only issue in the creation/managment of the schema
 is: CREATE FUNCTION.  But it looks like maybe concat() and random()
 are already supported by
 cockroackdb: 
 https://www.cockroachlabs.com/docs/stable/functions-and-operators.html.
  I will have to dig deeper into the lcr module to see where/if this
 is an issue.

 

Re: [SR-Users] RTP PROXY (rtpproxy_stream2uas getting error)

2020-08-25 Thread Daniel-Constantin Mierla
Hello,

that typically happens when you try to play to the callee before knowing
where it expect the RTP (before getting response with sdp for INVITE).
Maybe you can share the relevant config snippets to see if we can spot
something wrong there.

Cheers,
Daniel

On 24.08.20 13:18, Amit Pal wrote:
>
> Dear Team ,
>
> I am using  Kamailio and RTPProxy for media. I am
> trying to play caller/callee side  media by rtpproxy_stream2uas/
> rtpproxy_stream2uac.
>
> But I am getting error
>
>  
>
> secondary rtpproxy[27007]: DBUG:handle_command: received command
> "29329_6 P-1
> 2c60634699018317MTg0YzVlODc0NTBiZGU1ZGJiYmNmYjY1MDc0MjIwMzI.
> /home/coralswitch/queuesounds/moh2.wav session
> b2f563cf067c489ca7102e96b622f2f1;1 9f10411f;1"
>
> rtpproxy[27007]: ERR:handle_play: can't create player
>
> rtpproxy[27007]: DBUG:doreply: sending reply "29329_6 E6#012"
>
> rtpproxy[27007]: INFO:process_rtp: session timeout
>
> rtpproxy[27007]: INFO:remove_session: RTP stats: 1083 in from callee,
> 936 in from caller, 2019 relayed, 0 dropped
>
> rtpproxy[27007]: INFO:remove_session: RTCP stats: 30 in from callee,
> 41 in from caller, 71 relayed, 0 dropped
>
> rtpproxy[27007]: INFO:remove_session: session on ports 36556/60108 is
> cleaned up
>
>  
>
> why this error are coming *. Even some time with change in script
> following error   “handle_play: can't create player” not showing but
> even not media playing.*
>
> Log are attached with mail.
>
> Please do the need full.
>
>  
>
>  
>
> Regards
>
> Amit Pal
>
>  
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 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
Funding: https://www.paypal.me/dcmierla

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


Re: [SR-Users] Setup Push notifications from SIP-PBX to Linphone Android -

2020-08-25 Thread Daniel-Constantin Mierla
Hello,

for the records, videos with Federico's presentations about this topic
are on youtube KamailioWorld channel:

 * https://www.youtube.com/c/KamailioWorld/

And slides should be on:

  * https://www.kamailio.org/events/

Look at the past KamailioWorld conferences.

Cheers,
Daniel

On 25.08.20 08:30, Federico Cabiddu wrote:
> Hi,
> you can watch this presentation for an introduction to mobile pushes
> and a simple way of approaching them.
> For a more standard approach you can have a look at this recent
> RFC: https://tools.ietf.org/html/rfc8599 about push notifications with
> SIP.
>
> Best regards,
>
> Federico
>
> On Sun, Aug 23, 2020 at 7:56 AM Johnny Ritzer  > wrote:
>
> I have a setup where we wanted to just build a android app
> linphone to SIP-PBX.
>
>  
>
> But come to find out upon further research due to potential
> battery drain/background app usage. The device isn’t registered
> all the time and need some sort of push notification to google
> firebase back to android app to re-setup the register / INVITE call.
>
>  
>
> Is there a  module/config of this kind of setup.  (now could I
> use  cloud kamailio  or would this have to  be onsite local  to
> the PBX).
>
> ___
> 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

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

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


[SR-Users] Kamailio routing incoming phone call ranges to different dispatch groups

2020-08-25 Thread Patrik Nilsson
Hi,

Although what I'm trying to achieve seems like an easy task, I have been 
tearing my hair for the past two days getting Kamailio to dispatch incoming 
phone calls to two different groups of Asterisk servers in my dispatcher list. 
I have 30 dedicated phone numbers from Telco: 020131600 - 020131629. I want 
00-19 to be routed to Group 1, and 20-29 to be routed to Group 2, with a 
Round-robin algorithm. I'm aware that I can set up these incoming phone numbers 
in each Asterisk server's extension dial plans; nevertheless, I want Kamailio 
to do the initial incoming routing to a specific group (as Group 2, for 
instance, will never receive calls from for instance 02013161).

Example dispatcher.list:
#Company A (Group 1)
1 sip:10.50.0.1 0 0 maxload=20
1 sip:10.50.0.2 0 0 maxload=20
1 sip:10.50.0.3 0 0 maxload=20
#Company B (Group 2)
2 sip: 10.60.0.1 0 0 maxload=20
2 sip: 10.60.0.2 0 0 maxload=20
2 sip: 10.60.0.3 0 0 maxload=20

I assume this is done in the route[DISPATCH] of my kamailio.cfg, using 
ds_select_dst, but my previous attempts to get this routing to work just breaks 
the config file.

I appreciate any help that I can get!

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


Re: [SR-Users] Kamailio routing incoming phone call ranges to different dispatch groups

2020-08-25 Thread Jurijs Ivolga
Hi Patrik,

It would help if you will include your config and some logs.

But something like this should work:

if($rU=~"^(0201316)[0-1][0-9]$")

{

ds_select_dst("1", "4")

}  else {

ds_select_dst("2", "4")

}

I never tried this code, so it might have some errors, but you should
understand the overall idea.

Jurijs


On Tue, Aug 25, 2020 at 9:18 AM Patrik Nilsson  wrote:

> Hi,
>
> Although what I'm trying to achieve seems like an easy task, I have been
> tearing my hair for the past two days getting Kamailio to dispatch incoming
> phone calls to two different groups of Asterisk servers in my dispatcher
> list. I have 30 dedicated phone numbers from Telco: 020131600 - 020131629.
> I want 00-19 to be routed to Group 1, and 20-29 to be routed to Group 2,
> with a Round-robin algorithm. I'm aware that I can set up these incoming
> phone numbers in each Asterisk server's extension dial plans; nevertheless,
> I want Kamailio to do the initial incoming routing to a specific group (as
> Group 2, for instance, will never receive calls from for
> instance 02013161).
>
> Example dispatcher.list:
> #Company A (Group 1)
> 1 sip:10.50.0.1 0 0 maxload=20
> 1 sip:10.50.0.2 0 0 maxload=20
> 1 sip:10.50.0.3 0 0 maxload=20
> #Company B (Group 2)
> 2 sip: 10.60.0.1 0 0 maxload=20
> 2 sip: 10.60.0.2 0 0 maxload=20
> 2 sip: 10.60.0.3 0 0 maxload=20
>
> I assume this is done in the route[DISPATCH] of my kamailio.cfg, using
> ds_select_dst, but my previous attempts to get this routing to work just
> breaks the config file.
>
> I appreciate any help that I can get!
>
> Best regards,
> Patrik
> ___
> 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] Setup Push notifications from SIP-PBX to Linphone Android -

2020-08-25 Thread Federico Cabiddu
Hi,
you can watch this presentation for an introduction to mobile pushes and a
simple way of approaching them.
For a more standard approach you can have a look at this recent RFC:
https://tools.ietf.org/html/rfc8599 about push notifications with SIP.

Best regards,

Federico

On Sun, Aug 23, 2020 at 7:56 AM Johnny Ritzer  wrote:

> I have a setup where we wanted to just build a android app linphone to
> SIP-PBX.
>
>
>
> But come to find out upon further research due to potential battery
> drain/background app usage. The device isn’t registered all the time and
> need some sort of push notification to google firebase back to android app
> to re-setup the register / INVITE call.
>
>
>
> Is there a  module/config of this kind of setup.  (now could I use  cloud
> kamailio  or would this have to  be onsite local  to the PBX).
> ___
> 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