Re: [SR-Users] mhomed not working for tls destination

2022-07-05 Thread Aidar Kamalov
Hi, thank you for your reply, I have tried it at kamailio 5.5 and 5.6
versions, and there are two network interfaces. Actually, I have created a
testing vm for this, with a simple almost default kamailio configuration.
And yes, with forcing socket everything is working fine, but I just want to
know maybe there is a kamailio params that allow "mhomed" params to work
with tcp/tls destinations, or is it impossible by TCP design, or is it a
kamailio bug.

I wonder if anyone uses kamailio with 2+ network interfaces and uses tls
and don't use $fs?


-- 
Aidar
__
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] mhomed not working for tls destination

2022-07-01 Thread Aidar Kamalov
Hello,

I have faced an issue when mhomed parameter working well only for udp
destinations in systems with multiple network interfaces.
If kamailio forward call to the UDP destination, mhomed option chooses the
correct Via and the correct network interface for sending.
But if the destination is tls, mhomed chooses first described in
configuration file "listen=" interface and use this IP in Via header

Network routes in the system are correct and "ip r get IP" returns the
correct route and interface.


Should mhomed work with tcp/tls or is this impossible with TCP design?

-- 
Aidar
__
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] DMQ node list

2021-07-14 Thread Aidar Kamalov
Hello,

I have a kamailio cluster with two nodes
kamailio-1.local:  10.101.2.119
kamailio-2.local: 10.101.2.247


with dmq configs:

kamailio-1:
modparam("dmq", "server_address", "sip:MY_IP4_ADDR:5060")
modparam("dmq", "notification_address", "kamailio-2.local:5060")

kamailio-2:
modparam("dmq", "server_address", "sip:MY_IP4_ADDR:5060")
modparam("dmq", "notification_address", "kamailio-1.local:5060")


All works fine, but kamcmd dmq.list_nodes on kamailio-1.local show me:
 {
host: 10.101.2.247
port: 5060
resolved_ip: 10.101.2.247
status: active
last_notification: 0
local: 0
}
{
host: kamailio-1.local
port: 5060
resolved_ip: 10.101.2.119
status: active
last_notification: 0
local: 0
}
{
host: kamailio-2.local
port: 5060
resolved_ip: 10.101.2.247
status: active
last_notification: 0
local: 0
}
{
host: 10.101.2.119
port: 5060
resolved_ip: 10.101.2.119
status: active
last_notification: 0
local: 1
}

and  kamailio-2.local show me:
{
host: kamailio-2.local
port: 5060
resolved_ip: 10.101.2.247
status: active
last_notification: 0
local: 0
}
{
host: 10.101.2.119
port: 5060
resolved_ip: 10.101.2.119
status: active
last_notification: 0
local: 0
}
{
host: kamailio-1.local
port: 5060
resolved_ip: 10.101.2.119
status: active
last_notification: 0
local: 0
}
{
host: 10.101.2.247
port: 5060
resolved_ip: 10.101.2.247
status: active
last_notification: 0
local: 1
}


So there are only two hosts in the cluster, but there are 4 records in
dmq.list_nodes. Also in sip trace I can see that kamailio send DMQ messages
to itself too (because it ip marked as local: 0 I think).
Is it ok? Is it normal behavior? What should I do to fix it? Should
multi_notify and DNS name with 2 A records fix it (and why?)?
-- 
Aydar A. Kamalov
__
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] Change Record Route onreply

2020-08-10 Thread Aidar Kamalov
for kamailio, rtpengine, asterisk and clients on locahost. Docker is on
Linux and Windows.

I have configured onreply route, not sure if it is a right way, but looks
like it works as I need.
if (ds_is_from_list()) {
 remove_hf("Record-Route");
 append_hf("Record-Route: \r\n");
}

пн, 10 авг. 2020 г. в 17:25, Alex Balashov :

> Why do you want to do this?
>
> —
> Sent from mobile, with due apologies for brevity and errors.
>
> > On Aug 10, 2020, at 6:35 AM, Aidar Kamalov 
> wrote:
> >
> > 
> > Hello,
> >
> > I have kamailio with only one interface. Is it possible to set one RR -
> lan ip address to INVITEs (to dispatcher list members) and 127.0.0.1 to
> replies 200OK (to softphone)?
> > I can't use record_route() function in onreply route because:  Command
> cannot be used in the block.
> >
> > --
> > Aydar A. Kamalov
> > ___
> > 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
>


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


[SR-Users] Change Record Route onreply

2020-08-10 Thread Aidar Kamalov
Hello,

I have kamailio with only one interface. Is it possible to set one RR - lan
ip address to INVITEs (to dispatcher list members) and 127.0.0.1 to replies
200OK (to softphone)?
I can't use record_route() function in onreply route because:  Command
cannot be used in the block.

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


[SR-Users] Kamailio under NAT

2020-06-05 Thread Aidar Kamalov
Hello,

I am trying to start kamailio+rtpengine+asterisk in docker with
docker-compose (not in network host mode). And I faced behavior that I
can't understand.

When my phone(fanvil) sends a register to kamailio with his ip in contact -
192.168.88.55 (to host's ip address 192.168.88.55), kamailio 200OK answers
with "received=172.18.0.1" param in Via. (172.18.0.1 it is host's docker
interface, kamailio's ip is 172.18.0.4)

After that my phone unregisters with Expires: 0 and sends a new register
with 172.18.0.1 in contact.
Is that correct? Is there any way to fix this?


2020/06/05 12:05:51.764617 172.18.0.1:46142 -> 172.18.0.4:5060
REGISTER sip:192.168.88.55 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.100:5756;branch=z9hG4bK14305253915361123;rport
From: akamvm ;tag=1125027099
To: akamvm 
Call-ID: 2849918516212-2718811609@192.168.88.100
CSeq: 1 REGISTER
Contact: 
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: Fanvil X3S 2.10.2.6887 0c383e217eb9
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK,
UPDATE, MESSAGE
Content-Length: 0


2020/06/05 12:05:51.765716 172.18.0.4:5060 -> 172.18.0.1:46142
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.100:5756
;branch=z9hG4bK14305253915361123;rport=46142;received=172.18.0.1
From: akamvm ;tag=1125027099
To: akamvm ;tag=1cbccc00ba5f7d13255bc12726ccacc5.59da
Call-ID: 2849918516212-2718811609@192.168.88.100
CSeq: 1 REGISTER
Contact: ;expires=3600
Server: kamailio (5.2.1 (x86_64/linux))
Content-Length: 0


2020/06/05 12:05:51.779447 172.18.0.1:46142 -> 172.18.0.4:5060
REGISTER sip:192.168.88.55 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.100:5756;branch=z9hG4bK251317807114669601;rport
From: akamvm ;tag=1125027099
To: akamvm 
Call-ID: 2849918516212-2718811609@192.168.88.100
CSeq: 2 REGISTER
Contact: 
Max-Forwards: 70
Expires: 0
Supported: path
User-Agent: Fanvil X3S 2.10.2.6887 0c383e217eb9
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK,
UPDATE, MESSAGE
Content-Length: 0

2020/06/05 12:05:51.780479 172.18.0.4:5060 -> 172.18.0.1:46142
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.100:5756
;branch=z9hG4bK251317807114669601;rport=46142;received=172.18.0.1
From: akamvm ;tag=1125027099
To: akamvm ;tag=1cbccc00ba5f7d13255bc12726ccacc5.f669
Call-ID: 2849918516212-2718811609@192.168.88.100
CSeq: 2 REGISTER
Server: kamailio (5.2.1 (x86_64/linux))
Content-Length: 0


And new register:
2020/06/05 12:05:51.780287 172.18.0.1:46142 -> 172.18.0.4:5060
REGISTER sip:192.168.88.55 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.100:5756;branch=z9hG4bK2696168232620424454;rport
From: akamvm ;tag=2649930762
To: akamvm 
Call-ID: 257831362525663-2610472014851@172.18.0.1
CSeq: 1 REGISTER
Contact: 
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: Fanvil X3S 2.10.2.6887 0c383e217eb9
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK,
UPDATE, MESSAGE
Content-Length: 0


2020/06/05 12:05:51.781208 172.18.0.4:5060 -> 172.18.0.1:46142
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.100:5756
;branch=z9hG4bK2696168232620424454;rport=46142;received=172.18.0.1
From: akamvm ;tag=2649930762
To: akamvm ;tag=1cbccc00ba5f7d13255bc12726ccacc5.4b3b
Call-ID: 257831362525663-2610472014851@172.18.0.1
CSeq: 1 REGISTER
Contact: ;expires=3600
Server: kamailio (5.2.1 (x86_64/linux))
Content-Length: 0
-- 
Aydar A. Kamalov
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio as SBC for Teams

2020-04-10 Thread Aidar Kamalov
I thought they look only at first RR field?

пт, 10 апр. 2020 г. в 17:03, Sergiu Pojoga :

> You have too many RR of Kamailio, x1 FQDN, x3 IP. Why?
>
> IMO, you should have only 2 of Kamailio, if you're doing transport
> conversion. Both FQDNs + ";r2=on". MS clearly says FQDN everywhere, no IP,
> especially RR
>
> On Fri, Apr 10, 2020 at 7:06 AM Aidar Kamalov 
> wrote:
>
>> Thanks for the answer, I have disabled forse_rport() for Teams side,
>> responses now going to address in Via header, but it is not resolved my
>> issue, no ACK from Teams :(
>>
>> чт, 9 апр. 2020 г. в 18:22, Sergiu Pojoga :
>>
>>> Hi Aydar,
>>>
>>> Request from MS proxy has  VIA: SIP/2.0/TLS 52.114.7.24:5061, that's
>>> where your reply should go. You're sending to 52.114.7.24:1024 instead?
>>>
>>> Also, looks like you're missing "r2=on" on the other RR, only one has it.
>>>
>>> Cheers,
>>>
>>> On Thu, Apr 9, 2020 at 11:09 AM Aidar Kamalov 
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I read https://skalatan.de/en/blog/kamailio-sbc-teams and trying to
>>>> use kamailio for teams.
>>>> But I faced that MS not responding ACK to my 200OK. Somethin is wrong,
>>>> but I don't know what. I call from teams to kamailio.
>>>> Can you help me please
>>>>
>>>> This is initial INVITE from Teams:
>>>> 2020/04/09 22:55:17.346092 52.114.7.24:1024 -> KAMAILIO_IP:5061
>>>> INVITE sip:+x@MY_KAMAILIO_FQDN:5061;user=phone;transport=tls
>>>> SIP/2.0
>>>> FROM: Aidar Kamalov>>> ;user=phone>;tag=de28a5b5333b451a97312097f91f5564
>>>> TO: 
>>>> CSEQ: 1 INVITE
>>>> CALL-ID: 3d5ad3cdd01457be94d127fa20478cf1
>>>> MAX-FORWARDS: 70
>>>> VIA: SIP/2.0/TLS 52.114.7.24:5061;branch=z9hG4bKdb903e2c
>>>> RECORD-ROUTE: >>> ;transport=tls;lr>
>>>> CONTACT: >>> ;x-i=903eeaac-b19e-43a0-8e75-bb222049922a;x-c=3d5ad3cdd01457be94d127fa20478cf1/d/8/d3d2c2e3f3c14f88bb2fe843b4bc70e4>
>>>> CONTENT-LENGTH: 2426
>>>> USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.4.4.3 i.ASEA.5
>>>> CONTENT-TYPE: application/sdp
>>>> ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
>>>>
>>>> v=0
>>>> o=- 0 0 IN IP4 52.114.252.146
>>>> s=session
>>>> c=IN IP4 52.114.252.146
>>>> b=CT:5
>>>> t=0 0
>>>> m=audio 52939 RTP/SAVP 104 9 111 18 0 8 103 97 13 118 119 101
>>>> a=rtcp:52925
>>>> a=ice-ufrag:rKBm
>>>> a=ice-pwd:BkjUnkfIvYV5pjteSteevL1O
>>>> a=rtcp-mux
>>>> a=candidate:4 1 UDP 184547839 52.114.252.146 52939 typ relay raddr
>>>> 31.13.144.55 rport 57780
>>>> a=candidate:4 2 UDP 184547326 52.114.252.146 52925 typ relay raddr
>>>> 31.13.144.55 rport 57781
>>>> a=candidate:1 1 tcp-act 2121006590 100.78.247.179 1024 typ host
>>>> a=candidate:1 2 tcp-act 2121006590 100.78.247.179 1024 typ host
>>>> a=candidate:2 1 UDP 2130705919 100.78.247.179 39182 typ host
>>>> a=candidate:2 2 UDP 2130705406 100.78.247.179 39183 typ host
>>>> a=candidate:3 1 UDP 1694497791 31.13.144.55 57780 typ srflx raddr
>>>> 100.78.247.179 rport 39182
>>>> a=candidate:3 2 UDP 1694497278 31.13.144.55 57781 typ srflx raddr
>>>> 100.78.247.179 rport 39183
>>>> a=candidate:5 1 tcp-act 1684796926 31.13.144.55 9761 typ srflx raddr
>>>> 100.78.247.179 rport 41775
>>>> a=candidate:5 2 tcp-act 1684796926 31.13.144.55 9761 typ srflx raddr
>>>> 100.78.247.179 rport 41775
>>>> a=candidate:6 1 tcp-pass 174453758 52.114.252.130 59925 typ relay raddr
>>>> 31.13.144.55 rport 9761
>>>> a=candidate:6 2 tcp-pass 174453758 52.114.252.130 59925 typ relay raddr
>>>> 31.13.144.55 rport 9761
>>>> a=candidate:7 1 tcp-act 174846462 52.114.252.130 59925 typ relay raddr
>>>> 31.13.144.55 rport 9761
>>>> a=candidate:7 2 tcp-act 174846462 52.114.252.130 59925 typ relay raddr
>>>> 31.13.144.55 rport 9761
>>>> a=x-candidate-info:4 network-type=WWAN
>>>> a=x-candidate-info:1 network-type=WWAN
>>>> a=x-candidate-info:2 network-type=WWAN
>>>> a=x-candidate-info:3 network-type=WWAN
>>>> a=x-candidate-info:5 network-type=WWAN
>>>> a=x-candidate-info:6 network-type=WWAN
>>>> a=x-candidate-info:7 network-type=WWAN
>>>> a=crypto:1 AES_CM_128_H

Re: [SR-Users] kamailio as SBC for Teams

2020-04-10 Thread Aidar Kamalov
Thanks for the answer, I have disabled forse_rport() for Teams side,
responses now going to address in Via header, but it is not resolved my
issue, no ACK from Teams :(

чт, 9 апр. 2020 г. в 18:22, Sergiu Pojoga :

> Hi Aydar,
>
> Request from MS proxy has  VIA: SIP/2.0/TLS 52.114.7.24:5061, that's
> where your reply should go. You're sending to 52.114.7.24:1024 instead?
>
> Also, looks like you're missing "r2=on" on the other RR, only one has it.
>
> Cheers,
>
> On Thu, Apr 9, 2020 at 11:09 AM Aidar Kamalov 
> wrote:
>
>> Hello,
>>
>> I read https://skalatan.de/en/blog/kamailio-sbc-teams and trying to use
>> kamailio for teams.
>> But I faced that MS not responding ACK to my 200OK. Somethin is wrong,
>> but I don't know what. I call from teams to kamailio.
>> Can you help me please
>>
>> This is initial INVITE from Teams:
>> 2020/04/09 22:55:17.346092 52.114.7.24:1024 -> KAMAILIO_IP:5061
>> INVITE sip:+x@MY_KAMAILIO_FQDN:5061;user=phone;transport=tls
>> SIP/2.0
>> FROM: Aidar Kamalov> ;user=phone>;tag=de28a5b5333b451a97312097f91f5564
>> TO: 
>> CSEQ: 1 INVITE
>> CALL-ID: 3d5ad3cdd01457be94d127fa20478cf1
>> MAX-FORWARDS: 70
>> VIA: SIP/2.0/TLS 52.114.7.24:5061;branch=z9hG4bKdb903e2c
>> RECORD-ROUTE: > ;transport=tls;lr>
>> CONTACT: > ;x-i=903eeaac-b19e-43a0-8e75-bb222049922a;x-c=3d5ad3cdd01457be94d127fa20478cf1/d/8/d3d2c2e3f3c14f88bb2fe843b4bc70e4>
>> CONTENT-LENGTH: 2426
>> USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.4.4.3 i.ASEA.5
>> CONTENT-TYPE: application/sdp
>> ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
>>
>> v=0
>> o=- 0 0 IN IP4 52.114.252.146
>> s=session
>> c=IN IP4 52.114.252.146
>> b=CT:5
>> t=0 0
>> m=audio 52939 RTP/SAVP 104 9 111 18 0 8 103 97 13 118 119 101
>> a=rtcp:52925
>> a=ice-ufrag:rKBm
>> a=ice-pwd:BkjUnkfIvYV5pjteSteevL1O
>> a=rtcp-mux
>> a=candidate:4 1 UDP 184547839 52.114.252.146 52939 typ relay raddr
>> 31.13.144.55 rport 57780
>> a=candidate:4 2 UDP 184547326 52.114.252.146 52925 typ relay raddr
>> 31.13.144.55 rport 57781
>> a=candidate:1 1 tcp-act 2121006590 100.78.247.179 1024 typ host
>> a=candidate:1 2 tcp-act 2121006590 100.78.247.179 1024 typ host
>> a=candidate:2 1 UDP 2130705919 100.78.247.179 39182 typ host
>> a=candidate:2 2 UDP 2130705406 100.78.247.179 39183 typ host
>> a=candidate:3 1 UDP 1694497791 31.13.144.55 57780 typ srflx raddr
>> 100.78.247.179 rport 39182
>> a=candidate:3 2 UDP 1694497278 31.13.144.55 57781 typ srflx raddr
>> 100.78.247.179 rport 39183
>> a=candidate:5 1 tcp-act 1684796926 31.13.144.55 9761 typ srflx raddr
>> 100.78.247.179 rport 41775
>> a=candidate:5 2 tcp-act 1684796926 31.13.144.55 9761 typ srflx raddr
>> 100.78.247.179 rport 41775
>> a=candidate:6 1 tcp-pass 174453758 52.114.252.130 59925 typ relay raddr
>> 31.13.144.55 rport 9761
>> a=candidate:6 2 tcp-pass 174453758 52.114.252.130 59925 typ relay raddr
>> 31.13.144.55 rport 9761
>> a=candidate:7 1 tcp-act 174846462 52.114.252.130 59925 typ relay raddr
>> 31.13.144.55 rport 9761
>> a=candidate:7 2 tcp-act 174846462 52.114.252.130 59925 typ relay raddr
>> 31.13.144.55 rport 9761
>> a=x-candidate-info:4 network-type=WWAN
>> a=x-candidate-info:1 network-type=WWAN
>> a=x-candidate-info:2 network-type=WWAN
>> a=x-candidate-info:3 network-type=WWAN
>> a=x-candidate-info:5 network-type=WWAN
>> a=x-candidate-info:6 network-type=WWAN
>> a=x-candidate-info:7 network-type=WWAN
>> a=crypto:1 AES_CM_128_HMAC_SHA1_32
>> inline:DY3r3DWRojJm94CJQ83OAavmlRCwPf5ciRxHCT40|2^31
>> a=crypto:2 AES_CM_128_HMAC_SHA1_80
>> inline:DY3r3DWRojJm94CJQ83OAavmlRCwPf5ciRxHCT40|2^31
>> a=crypto:3 AES_CM_128_HMAC_SHA1_80
>> inline:DY3r3DWRojJm94CJQ83OAavmlRCwPf5ciRxHCT40|2^31|1:1
>> a=rtpmap:104 SILK/16000
>> a=fmtp:104 useinbandfec=1; usedtx=0
>> a=rtpmap:9 G722/8000
>> a=rtpmap:111 SIREN/16000
>> a=fmtp:111 bitrate=16000
>> a=rtpmap:18 G729/8000
>> a=rtpmap:0 PCMU/8000
>> a=rtpmap:8 PCMA/8000
>> a=rtpmap:103 SILK/8000
>> a=fmtp:103 useinbandfec=1; usedtx=0
>> a=rtpmap:97 RED/8000
>> a=rtpmap:13 CN/8000
>> a=rtpmap:118 CN/16000
>> a=rtpmap:119 CN/24000
>> a=rtpmap:101 telephone-event/8000
>> a=fmtp:101 0-16
>> a=ptime:20
>> a=maxptime:200
>>
>>
>>
>> and my 200OK to MS is:
>>
>> 2020/04/09 22:55:19.976427 KAMAILIO_IP:5061 -> 52.114.7.24:1024
>> SIP/2.0 200 OK
>> Record-Route:
>> 
>> Record-Route:
>> 
>> Via: SIP/2.0/TLS

[SR-Users] kamailio as SBC for Teams

2020-04-09 Thread Aidar Kamalov
Hello,

I read https://skalatan.de/en/blog/kamailio-sbc-teams and trying to use
kamailio for teams.
But I faced that MS not responding ACK to my 200OK. Somethin is wrong, but
I don't know what. I call from teams to kamailio.
Can you help me please

This is initial INVITE from Teams:
2020/04/09 22:55:17.346092 52.114.7.24:1024 -> KAMAILIO_IP:5061
INVITE sip:+x@MY_KAMAILIO_FQDN:5061;user=phone;transport=tls SIP/2.0
FROM: Aidar Kamalov;tag=de28a5b5333b451a97312097f91f5564
TO: 
CSEQ: 1 INVITE
CALL-ID: 3d5ad3cdd01457be94d127fa20478cf1
MAX-FORWARDS: 70
VIA: SIP/2.0/TLS 52.114.7.24:5061;branch=z9hG4bKdb903e2c
RECORD-ROUTE: 
CONTACT: 
CONTENT-LENGTH: 2426
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.4.4.3 i.ASEA.5
CONTENT-TYPE: application/sdp
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY

v=0
o=- 0 0 IN IP4 52.114.252.146
s=session
c=IN IP4 52.114.252.146
b=CT:5
t=0 0
m=audio 52939 RTP/SAVP 104 9 111 18 0 8 103 97 13 118 119 101
a=rtcp:52925
a=ice-ufrag:rKBm
a=ice-pwd:BkjUnkfIvYV5pjteSteevL1O
a=rtcp-mux
a=candidate:4 1 UDP 184547839 52.114.252.146 52939 typ relay raddr
31.13.144.55 rport 57780
a=candidate:4 2 UDP 184547326 52.114.252.146 52925 typ relay raddr
31.13.144.55 rport 57781
a=candidate:1 1 tcp-act 2121006590 100.78.247.179 1024 typ host
a=candidate:1 2 tcp-act 2121006590 100.78.247.179 1024 typ host
a=candidate:2 1 UDP 2130705919 100.78.247.179 39182 typ host
a=candidate:2 2 UDP 2130705406 100.78.247.179 39183 typ host
a=candidate:3 1 UDP 1694497791 31.13.144.55 57780 typ srflx raddr
100.78.247.179 rport 39182
a=candidate:3 2 UDP 1694497278 31.13.144.55 57781 typ srflx raddr
100.78.247.179 rport 39183
a=candidate:5 1 tcp-act 1684796926 31.13.144.55 9761 typ srflx raddr
100.78.247.179 rport 41775
a=candidate:5 2 tcp-act 1684796926 31.13.144.55 9761 typ srflx raddr
100.78.247.179 rport 41775
a=candidate:6 1 tcp-pass 174453758 52.114.252.130 59925 typ relay raddr
31.13.144.55 rport 9761
a=candidate:6 2 tcp-pass 174453758 52.114.252.130 59925 typ relay raddr
31.13.144.55 rport 9761
a=candidate:7 1 tcp-act 174846462 52.114.252.130 59925 typ relay raddr
31.13.144.55 rport 9761
a=candidate:7 2 tcp-act 174846462 52.114.252.130 59925 typ relay raddr
31.13.144.55 rport 9761
a=x-candidate-info:4 network-type=WWAN
a=x-candidate-info:1 network-type=WWAN
a=x-candidate-info:2 network-type=WWAN
a=x-candidate-info:3 network-type=WWAN
a=x-candidate-info:5 network-type=WWAN
a=x-candidate-info:6 network-type=WWAN
a=x-candidate-info:7 network-type=WWAN
a=crypto:1 AES_CM_128_HMAC_SHA1_32
inline:DY3r3DWRojJm94CJQ83OAavmlRCwPf5ciRxHCT40|2^31
a=crypto:2 AES_CM_128_HMAC_SHA1_80
inline:DY3r3DWRojJm94CJQ83OAavmlRCwPf5ciRxHCT40|2^31
a=crypto:3 AES_CM_128_HMAC_SHA1_80
inline:DY3r3DWRojJm94CJQ83OAavmlRCwPf5ciRxHCT40|2^31|1:1
a=rtpmap:104 SILK/16000
a=fmtp:104 useinbandfec=1; usedtx=0
a=rtpmap:9 G722/8000
a=rtpmap:111 SIREN/16000
a=fmtp:111 bitrate=16000
a=rtpmap:18 G729/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:103 SILK/8000
a=fmtp:103 useinbandfec=1; usedtx=0
a=rtpmap:97 RED/8000
a=rtpmap:13 CN/8000
a=rtpmap:118 CN/16000
a=rtpmap:119 CN/24000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:200



and my 200OK to MS is:

2020/04/09 22:55:19.976427 KAMAILIO_IP:5061 -> 52.114.7.24:1024
SIP/2.0 200 OK
Record-Route:

Record-Route:

Via: SIP/2.0/TLS 52.114.7.24:5061;rport=1024;branch=z9hG4bKdb903e2c
Record-Route:

Record-Route:

Record-Route:

Record-Route:

Record-Route: 
To: ;tag=3795432917-393759697
From: ;tag=de28a5b5333b451a97312097f91f5564
Call-ID: 3d5ad3cdd01457be94d127fa20478cf1
CSeq: 1 INVITE
Allow:
PUBLISH,MESSAGE,UPDATE,PRACK,SUBSCRIBE,REFER,INFO,NOTIFY,REGISTER,OPTIONS,BYE,INVITE,ACK,CANCEL
Content-Type: application/sdp
Accept: application/sdp
Content-Length: 282
User-Agent: MY_DOMAIN
Contact:


v=0
o=ETPI-MSX1 0 0 IN IP4 KAMAILIO_IP
s=sip call
c=IN IP4 KAMAILIO_IP
t=0 0
m=audio 12176 RTP/SAVP 8
b=AS:64
a=maxptime:20
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:12177
a=crypto:1 AES_CM_128_HMAC_SHA1_32
inline:03ZmcR+CxxB7k7C8QvWBgseYq7cH7py7VxqfLM8j
a=ptime:20


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


[SR-Users] Topoh and dialog track_cseq_updates

2020-03-12 Thread Aidar Kamalov
Hello,
I am trying to increase cseq in invite with credentials to 401
Unauthorized, but with topoh.so module and mask_callid enabled it does not
work.
Are there any way to fix it?

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


[SR-Users] centos 7 repo is broken

2020-01-27 Thread Aidar Kamalov
Hello

#  yum install kamailio
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.reconn.ru
 * extras: mirror.docker.ru
 * nux-dextop: mirror.li.nux.ro
 * updates: dedic.sh
Resolving Dependencies
--> Running transaction check
---> Package kamailio.x86_64 0:5.2.6-7.el7.centos will be installed
--> Processing Dependency: /usr/bin/python23 for package:
kamailio-5.2.6-7.el7.centos.x86_64
--> Processing Dependency: /usr/bin/python23 for package:
kamailio-5.2.6-7.el7.centos.x86_64
--> Finished Dependency Resolution
Error: Package: kamailio-5.2.6-7.el7.centos.x86_64 (kamailio)
   Requires: /usr/bin/python23
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

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


[SR-Users] centos7 rpm for evapi

2019-10-10 Thread Aidar Kamalov
Hello,

how can I install evapi for kamailio using rpm repo?

# ls /usr/lib64/kamailio/modules | grep evapi | wc -l
0

# yum provides *evapi.so
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.docker.ru
 * extras: mirror.linux-ia64.org
 * updates: mirror.corbina.net
No matches found

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


[SR-Users] kamailio 5.1.4 for centos 7 repo

2018-06-21 Thread Aidar Kamalov
Hello,

http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-5.1.4-1.el7.centos.x86_64.rpm.mirrorlist

In file information block you can see file size is 5643596 bytes. But if
you download it - file size is 5642888. And it is not possible to install
kamailio 5.1.4 on centos7 from repo.


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


Re: [SR-Users] centos 7 repo is broken?

2018-06-18 Thread Aidar Kamalov
Centos7 repo?

[MIRROR] kamailio-5.1.4-1.el7.centos.x86_64.rpm: Interrupted by header
callback: Server reports Content-Length: 5642888 but expected size is:
5643596


пн, 18 июн. 2018 г. в 22:08, Sergey Safarov :

> Think it is temporal failure
> I downloaded successfully
>
> Sergey
>
> пн, 18 июн. 2018 г. в 18:53, Aidar Kamalov :
>
>> Hello,
>>
>> can't install kamailio from repo (repo was update 16 jun), error:
>>
>> kamailio-5.1.4-1.el7.centos.x8 FAILED
>>
>>
>> http://download.opensuse.org/repositories/home%3A/kamailio%3A/v5.1.x-rpms/CentOS_7/x86_64/kamailio-5.1.4-1.el7.centos.x86_64.rpm:
>> [Errno 14] HTTP Error 416 - Requested Range Not Satisfiable/s |0 B
>> --:--:-- ETA
>> --
>> Aydar A. Kamalov
>> ___
>> 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
>


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


[SR-Users] centos 7 repo is broken?

2018-06-18 Thread Aidar Kamalov
Hello,

can't install kamailio from repo (repo was update 16 jun), error:

kamailio-5.1.4-1.el7.centos.x8 FAILED

http://download.opensuse.org/repositories/home%3A/kamailio%3A/v5.1.x-rpms/CentOS_7/x86_64/kamailio-5.1.4-1.el7.centos.x86_64.rpm:
[Errno 14] HTTP Error 416 - Requested Range Not Satisfiable/s |0 B
--:--:-- ETA
-- 
Aydar A. Kamalov
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] kamailio 5.1 keepalive module + usrloc

2018-05-04 Thread Aidar Kamalov
Hi,

can I with keepalive module ping with is_alive function endpoints connected
to kamailio?
Or this module can use only static destionations via modparam("keepalive",
"destination", "sip.provider.com")?


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


Re: [SR-Users] redis via haproxy

2017-12-06 Thread Aidar Kamalov
There is no problems without haproxy. And haproxy no problems without
kamailio :)

I used tcpdump (can't attach here) to dump port 6380, so kamailio should
connect to haproxy, because it send ping and receive pong.

2017-12-06 11:06 GMT+03:00 Юрий Горличенко <gorlichenko...@inbox.ru>:

> Hi try first to use single redis for make sure that it is not a ha proxy
> trouble.
>
> If error still exists - try to collect debug information.
>
> Среда, 6 декабря 2017, 10:53 +03:00 от Aidar Kamalov <
> aidar.kama...@gmail.com>:
>
> Hello,
>
> Kamailio after restart(or start) sometimes can't connect to redis (via
> haproxy) with logs:
>
> Dec  6 07:29:30 siptest /usr/sbin/kamailio[47291]: NOTICE: 

[SR-Users] redis via haproxy

2017-12-05 Thread Aidar Kamalov
Hello,

Kamailio after restart(or start) sometimes can't connect to redis (via
haproxy) with logs:

Dec  6 07:29:30 siptest /usr/sbin/kamailio[47291]: NOTICE: 

Re: [SR-Users] dmq issues

2017-12-01 Thread Aidar Kamalov
Now I added all my nodes, except self, on all nodes. It is ok now.

1 дек. 2017 г. 15:07 пользователь "Charles Chance" <
charles.cha...@sipcentric.com> написал:

> Hi Julien,
>
> Please do and I'll gladly take a closer look.
>
> Best,
>
> Charles
>
> On 1 December 2017 at 11:59, Julien Chavanton <jchavan...@gmail.com>
> wrote:
>
>> Hi Charles, great trick the FQDN + multi_notify
>>
>> I am guessing that with the multi_notify setting, the problem I was
>> refering too may be solved.
>>
>> I will document it in a github issue.
>>
>>
>>
>> On Fri, Dec 1, 2017 at 3:26 AM, Charles Chance <
>> charles.cha...@sipcentric.com> wrote:
>>
>>> Hello,
>>>
>>> It seems you have already solved your issue, but just to add, it's often
>>> better to provide an FQDN as notification_address which resolves to
>>> multiple IPs (and set "multi_notify" parameter).
>>>
>>> There should be no issues when shutting down multiple nodes at once, as
>>> long as the remaining nodes are still in contact with each other - at
>>> least, that is my experience across several long-established (and highly
>>> dynamic) clusters. When the disabled nodes are re-enabled, providing they
>>> have the address of at least one active node (or better, an FQDN resolving
>>> to multiple) they'll rejoin seamlessly.
>>>
>>> Of course, if others have a different experience, it would be good to
>>> learn more about it.
>>>
>>> Cheers,
>>>
>>> Charles
>>>
>>>
>>> On 1 December 2017 at 11:00, Julien Chavanton <jchavan...@gmail.com>
>>> wrote:
>>>
>>>> Forgot to mention
>>>>
>>>> 192.168.150.225 must have another node as notitifcation peer, not
>>>> himself else he will not replicate data to other nodes
>>>>
>>>> On Fri, Dec 1, 2017 at 2:33 AM, Julien Chavanton <jchavan...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Aydar,
>>>>>
>>>>> You can have only one notification_address in this case the last one
>>>>> will be used "192.168.150.225" this will be you DMQ master node
>>>>>
>>>>> I know the bus can break if you shutdown multiple nodes at the same
>>>>> time and one of them is the master node and then you restart them. (not
>>>>> sure if this is your case)
>>>>>
>>>>> If this happens the only option I can see is to restart all nodes one
>>>>> by one.
>>>>>
>>>>> I think this case could be handled better maybe by adding a dmq resync
>>>>> command that can recreate the bus .
>>>>>
>>>>>
>>>>> On Fri, Dec 1, 2017 at 12:32 AM, Aidar Kamalov <
>>>>> aidar.kama...@gmail.com> wrote:
>>>>>
>>>>>> Hello. I have 4  kamailio nodes with same config:
>>>>>>
>>>>>> modparam("dmq", "server_address", "sip:LOCALIP:5050")
>>>>>> modparam("dmq", "notification_address", "sip:192.168.8.213:5050")
>>>>>> modparam("dmq", "notification_address", "sip:192.168.10.54:5050")
>>>>>> modparam("dmq", "notification_address", "sip:192.168.107.195:5050")
>>>>>> modparam("dmq", "notification_address", "sip:192.168.150.225:5050")
>>>>>> modparam("dmq", "num_workers", 6)
>>>>>> modparam("dmq_usrloc", "enable", 1)
>>>>>> modparam("dmq_usrloc", "sync", 1)
>>>>>> modparam("dmq_usrloc", "batch_size", 2000)
>>>>>> modparam("dmq_usrloc", "batch_usleep", 1000)
>>>>>>
>>>>>>
>>>>>> regularly (don't know why) I've got issues - replication is broken,
>>>>>> for example now at all nodes I have:
>>>>>> # kamcmd dmq.list_nodes
>>>>>> {
>>>>>> host: 192.168.8.213
>>>>>> port: 5050
>>>>>> resolved_ip: 192.168.8.213
>>>>>> status: 2
>>>>>> last_notification: 0
>>>>>> local: 0
>>>>>> }
>>>>>> {
>>>>>> host: 192.168.10.54
>>>>>> port: 5050
>>>>>> resolved_ip: 192.168.10.54
>>>>>> status: 2
>>>>>> last_notification: 0
>>>>>> local: 0
>>>>>> }
>>>>>> {
>>>>>> host: 192.168.150.225
>>>>>> port: 5050
>>>>>> resolved_ip: 192.168.150.225
>>>>>> status: 8
>>>>>> last_notification: 0
>>>>>> local: 0
>>>>>> }
>>>>>> {
>>>>>> host: 192.168.107.195
>>>>>> port: 5050
>>>>>> resolved_ip: 192.168.107.195
>>>>>> status: 2
>>>>>> last_notification: 0
>>>>>> local: 1
>>>>>> }
>>>>>>
>>>>>> but at node 192.168.150.225:
>>>>>> # kamcmd dmq.list_nodes
>>>>>> {
>>>>>> host: 192.168.150.225
>>>>>> port: 5050
>>>>>> resolved_ip: 192.168.150.225
>>>>>> status: 2
>>>>>> last_notification: 0
>>>>>> local: 0
>>>>>> }
>>>>>> {
>>>>>> host: 192.168.150.225
>>>>>> port: 5050
>>>>>> resolved_ip: 192.168.150.225
>>>>>> status: 2
>>>>>> last_notification: 0
>>>>>> local: 1
>>>>>> }
>>>>>>
>>>>>> nodes restart doesn't help. but if i exec
>>>>>> systemctl stop kamailio && sleep 15 && systemctl start kamailio
>>>>>> it is partially solve my issue - dmq.list_nodes show all nodes, but
>>>>>> at 192.168.150.225 i see not all user locations: they are added gradually
>>>>>>
>>>>>> There is no errors in logs
>>>>>> Dec  1 08:28:37 sipufa /usr/sbin/kamailio[18252]: NOTICE: 

Re: [SR-Users] dmq issues

2017-12-01 Thread Aidar Kamalov
It was because at 192.168.150.225 I set this ip for both - server_address
and notification_address and 192.168.150.225 is last sting in config.

After a while this node send KDMQ to other nodes and disable itself :)

So, I must not set all my nodes(except itself) in notification_address at
each node?

U 192.168.150.225:5050 -> 192.168.10.54:5050
KDMQ sip:notification_peer@192.168.10.54:5050 SIP/2.0.
Via: SIP/2.0/UDP 192.168.150.225:5050
;branch=z9hG4bK2174.88e29643.0.
To: <sip:notification_peer@192.168.10.54:5050>.
From: <sip:notification_peer@192.168.150.225:5050
>;tag=a11041f20d719e0a854f96ceebf821bd-99c6.
CSeq: 10 KDMQ.
Call-ID: 621ad9f474b335d6-18221@192.168.150.225.
Content-Length: 198.
User-Agent: kamailio (5.0.4 (x86_64/linux)).
Max-Forwards: 1.
Content-Type: text/plain.
.
sip:192.168.8.213:5050;status=active.
sip:192.168.107.195:5050;status=active.
sip:192.168.10.54:5050;status=active.
sip:192.168.150.225:5050;status=active.
sip:192.168.150.225:5050;status=disabled.


2017-12-01 13:33 GMT+03:00 Julien Chavanton <jchavan...@gmail.com>:

> Hi Aydar,
>
> You can have only one notification_address in this case the last one will
> be used "192.168.150.225" this will be you DMQ master node
>
> I know the bus can break if you shutdown multiple nodes at the same time
> and one of them is the master node and then you restart them. (not sure if
> this is your case)
>
> If this happens the only option I can see is to restart all nodes one by
> one.
>
> I think this case could be handled better maybe by adding a dmq resync
> command that can recreate the bus .
>
>
> On Fri, Dec 1, 2017 at 12:32 AM, Aidar Kamalov <aidar.kama...@gmail.com>
> wrote:
>
>> Hello. I have 4  kamailio nodes with same config:
>>
>> modparam("dmq", "server_address", "sip:LOCALIP:5050")
>> modparam("dmq", "notification_address", "sip:192.168.8.213:5050")
>> modparam("dmq", "notification_address", "sip:192.168.10.54:5050")
>> modparam("dmq", "notification_address", "sip:192.168.107.195:5050")
>> modparam("dmq", "notification_address", "sip:192.168.150.225:5050")
>> modparam("dmq", "num_workers", 6)
>> modparam("dmq_usrloc", "enable", 1)
>> modparam("dmq_usrloc", "sync", 1)
>> modparam("dmq_usrloc", "batch_size", 2000)
>> modparam("dmq_usrloc", "batch_usleep", 1000)
>>
>>
>> regularly (don't know why) I've got issues - replication is broken, for
>> example now at all nodes I have:
>> # kamcmd dmq.list_nodes
>> {
>> host: 192.168.8.213
>> port: 5050
>> resolved_ip: 192.168.8.213
>> status: 2
>> last_notification: 0
>> local: 0
>> }
>> {
>> host: 192.168.10.54
>> port: 5050
>> resolved_ip: 192.168.10.54
>> status: 2
>> last_notification: 0
>> local: 0
>> }
>> {
>> host: 192.168.150.225
>> port: 5050
>> resolved_ip: 192.168.150.225
>> status: 8
>> last_notification: 0
>> local: 0
>> }
>> {
>> host: 192.168.107.195
>> port: 5050
>> resolved_ip: 192.168.107.195
>> status: 2
>> last_notification: 0
>> local: 1
>> }
>>
>> but at node 192.168.150.225:
>> # kamcmd dmq.list_nodes
>> {
>> host: 192.168.150.225
>> port: 5050
>> resolved_ip: 192.168.150.225
>> status: 2
>> last_notification: 0
>> local: 0
>> }
>> {
>> host: 192.168.150.225
>> port: 5050
>> resolved_ip: 192.168.150.225
>> status: 2
>> last_notification: 0
>> local: 1
>> }
>>
>> nodes restart doesn't help. but if i exec
>> systemctl stop kamailio && sleep 15 && systemctl start kamailio
>> it is partially solve my issue - dmq.list_nodes show all nodes, but at
>> 192.168.150.225 i see not all user locations: they are added gradually
>>
>> There is no errors in logs
>> Dec  1 08:28:37 sipufa /usr/sbin/kamailio[18252]: NOTICE: 

[SR-Users] dmq issues

2017-12-01 Thread Aidar Kamalov
Hello. I have 4  kamailio nodes with same config:

modparam("dmq", "server_address", "sip:LOCALIP:5050")
modparam("dmq", "notification_address", "sip:192.168.8.213:5050")
modparam("dmq", "notification_address", "sip:192.168.10.54:5050")
modparam("dmq", "notification_address", "sip:192.168.107.195:5050")
modparam("dmq", "notification_address", "sip:192.168.150.225:5050")
modparam("dmq", "num_workers", 6)
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_size", 2000)
modparam("dmq_usrloc", "batch_usleep", 1000)


regularly (don't know why) I've got issues - replication is broken, for
example now at all nodes I have:
# kamcmd dmq.list_nodes
{
host: 192.168.8.213
port: 5050
resolved_ip: 192.168.8.213
status: 2
last_notification: 0
local: 0
}
{
host: 192.168.10.54
port: 5050
resolved_ip: 192.168.10.54
status: 2
last_notification: 0
local: 0
}
{
host: 192.168.150.225
port: 5050
resolved_ip: 192.168.150.225
status: 8
last_notification: 0
local: 0
}
{
host: 192.168.107.195
port: 5050
resolved_ip: 192.168.107.195
status: 2
last_notification: 0
local: 1
}

but at node 192.168.150.225:
# kamcmd dmq.list_nodes
{
host: 192.168.150.225
port: 5050
resolved_ip: 192.168.150.225
status: 2
last_notification: 0
local: 0
}
{
host: 192.168.150.225
port: 5050
resolved_ip: 192.168.150.225
status: 2
last_notification: 0
local: 1
}

nodes restart doesn't help. but if i exec
systemctl stop kamailio && sleep 15 && systemctl start kamailio
it is partially solve my issue - dmq.list_nodes show all nodes, but at
192.168.150.225 i see not all user locations: they are added gradually

There is no errors in logs
Dec  1 08:28:37 sipufa /usr/sbin/kamailio[18252]: NOTICE: 

Re: [SR-Users] blf in kamailio dmq cluster

2017-11-29 Thread Aidar Kamalov
I will setup dnsmasq on each kamailio server, which will resolve
sip.example.com to own ip. And clients from this city will use this dns and
connect to sip.example.com

2017-11-30 9:17 GMT+03:00 Yuriy Gorlichenko <ovoshl...@gmail.com>:

> I this here is a way to share user for watcher from any domain using
> rpc.subscribe command after handle_subscribe()
> It is availible to make simple service that will be triggered by subscribe
> request and make fake subscribe request with needed data for other domains.
> Handle this subscribe also by handle_subscribe(). It will put needed
> user@domain pair to watchers from needed whatcher and then will trigger
> publish for user because in watchers table it will exist on every domain.
>
> Also you can use same schema with just publush that will run after handle
> publish on when kamailio will generate publish ( triggering in
> local-request)
>
> just choose sinpliest way for you
>
> On Nov 29, 2017 21:35, "Charles Chance" <charles.cha...@sipcentric.com>
> wrote:
>
>> Hello,
>>
>> So I understand that each server has its own FQDN and you want to point
>> users to their closest proxy, but are all servers part of the same
>> 'logical' domain?
>>
>> The SIP domain/realm does not have to be the same as the address/hostname
>> of the individual proxy server that is servicing a request.
>>
>> Unless, of course, you have a reason to maintain a separate domain for
>> each city. In which case, I don't believe there is a way to ignore the
>> domain in handle_publish() - users will need to subscribe to the correct
>> user@domain combination.
>>
>> Cheers,
>>
>> Charles
>>
>>
>>
>> On 29 November 2017 at 13:49, Aidar Kamalov <aidar.kama...@gmail.com>
>> wrote:
>>
>>> I have some kamailio servers in each city: city1.example.com,
>>> city2.example.com, city3.example.com.
>>> Users in city1 connects to city1.example.com.
>>>
>>> each kamailio has in config:
>>> alias="city1.example.com"
>>> alias="city2.example.com"
>>> alias="city3.example.com"
>>>
>>> modparam("dmq", "server_address", "sip:LOCALIP:5050")
>>> modparam("dmq", "notification_address", "sip:city1.example.com:5050")
>>> modparam("dmq", "notification_address", "sip:city2.example.com:5050")
>>> modparam("dmq", "notification_address", "sip:city3.example.com:5050")
>>> modparam("dmq", "num_workers", 6)
>>> modparam("dmq_usrloc", "enable", 1)
>>> modparam("dmq_usrloc", "sync", 1)
>>>
>>> if(is_method("PUBLISH")) {
>>> handle_publish();
>>> if(!dmq_is_from_node()) dmq_t_replicate();
>>> t_release();
>>> } else if(is_method("SUBSCRIBE")) {
>>> handle_subscribe();
>>> if(!dmq_is_from_node()) dmq_t_replicate();
>>> t_release();
>>> }
>>>
>>>
>>> When publish from city1.example.com replicated to city2.example.com, PUBLISH
>>> sip:34...@city1.example.com SIP/2.0 but there is no
>>> 34...@city1.example.com in active_watchers table there is
>>> 34...@city2.example.com. So when publish is coming to city2.example.com
>>> handle_publish can not found it, and doesn't send NOTIFY.
>>>
>>> Is it any way to ignore domain part in handle_publish()?
>>>
>>>
>>> 2017-11-29 16:23 GMT+03:00 Charles Chance <charles.cha...@sipcentric.com
>>> >:
>>>
>>>> Hello,
>>>>
>>>> Why are you trying to operate across domains in the same DMQ cluster?
>>>> Usually, servers operating in different domains do not need to be aware of
>>>> each other's user location and/or subscription records - if a request is
>>>> for another domain, simply forward it to the server(s) responsible for that
>>>> domain.
>>>>
>>>> Also, regardless of DMQ or any replication, publishes for one domain
>>>> would not match subscriptions for another domain; even on a single server.
>>>>
>>>> Can you describe your architecture in more detail and what you are
>>>> looking to achieve with replication?
>>>>
>>>> Cheers,
>>>>
>>>> Charles
>>>>
>>&g

Re: [SR-Users] blf in kamailio dmq cluster

2017-11-29 Thread Aidar Kamalov
I have some kamailio servers in each city: city1.example.com,
city2.example.com, city3.example.com.
Users in city1 connects to city1.example.com.

each kamailio has in config:
alias="city1.example.com"
alias="city2.example.com"
alias="city3.example.com"

modparam("dmq", "server_address", "sip:LOCALIP:5050")
modparam("dmq", "notification_address", "sip:city1.example.com:5050")
modparam("dmq", "notification_address", "sip:city2.example.com:5050")
modparam("dmq", "notification_address", "sip:city3.example.com:5050")
modparam("dmq", "num_workers", 6)
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)

if(is_method("PUBLISH")) {
handle_publish();
if(!dmq_is_from_node()) dmq_t_replicate();
t_release();
} else if(is_method("SUBSCRIBE")) {
handle_subscribe();
if(!dmq_is_from_node()) dmq_t_replicate();
t_release();
}


When publish from city1.example.com replicated to city2.example.com, PUBLISH
sip:34...@city1.example.com SIP/2.0 but there is no 34...@city1.example.com
in active_watchers table there is  34...@city2.example.com. So when publish
is coming to city2.example.com handle_publish can not found it, and doesn't
send NOTIFY.

Is it any way to ignore domain part in handle_publish()?


2017-11-29 16:23 GMT+03:00 Charles Chance <charles.cha...@sipcentric.com>:

> Hello,
>
> Why are you trying to operate across domains in the same DMQ cluster?
> Usually, servers operating in different domains do not need to be aware of
> each other's user location and/or subscription records - if a request is
> for another domain, simply forward it to the server(s) responsible for that
> domain.
>
> Also, regardless of DMQ or any replication, publishes for one domain would
> not match subscriptions for another domain; even on a single server.
>
> Can you describe your architecture in more detail and what you are looking
> to achieve with replication?
>
> Cheers,
>
> Charles
>
>
> On 29 November 2017 at 12:45, Aidar Kamalov <aidar.kama...@gmail.com>
> wrote:
>
>> Hello,
>>
>> I have two(or more) kamailio servers with dmq module and dmq_usrloc -
>> sip1.example.com and sip2.example.com
>> publish and subcribe replication works too.
>>
>> BLF works fine if clients connected to the same kamailio server, because
>> in active_watchers table stored with same domain sip1.example.com
>>
>> But what to do when call going from one server to second? Is there any
>> configuration to ignore domain in pusblish, subscribe, notify, etc?
>>
>> --
>> Aydar A. Kamalov
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> --
> *Charles Chance*
> Managing Director
>
> t. 0330 120 1200m. 07932 063 891
>
> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
> Birmingham Science Park, Birmingham B7 4BB.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>


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


Re: [SR-Users] blf in kamailio dmq cluster

2017-11-29 Thread Aidar Kamalov
It is already replicated. but domains are not same.

2017-11-29 15:52 GMT+03:00 Yuriy Gorlichenko <ovoshl...@gmail.com>:

> Hi. Just replicate publish messages to second server.
>
> On Nov 29, 2017 19:46, "Aidar Kamalov" <aidar.kama...@gmail.com> wrote:
>
>> Hello,
>>
>> I have two(or more) kamailio servers with dmq module and dmq_usrloc -
>> sip1.example.com and sip2.example.com
>> publish and subcribe replication works too.
>>
>> BLF works fine if clients connected to the same kamailio server, because
>> in active_watchers table stored with same domain sip1.example.com
>>
>> But what to do when call going from one server to second? Is there any
>> configuration to ignore domain in pusblish, subscribe, notify, etc?
>>
>> --
>> Aydar A. Kamalov
>>
>> ___
>> 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
>
>


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


[SR-Users] blf in kamailio dmq cluster

2017-11-29 Thread Aidar Kamalov
Hello,

I have two(or more) kamailio servers with dmq module and dmq_usrloc -
sip1.example.com and sip2.example.com
publish and subcribe replication works too.

BLF works fine if clients connected to the same kamailio server, because in
active_watchers table stored with same domain sip1.example.com

But what to do when call going from one server to second? Is there any
configuration to ignore domain in pusblish, subscribe, notify, etc?

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


Re: [SR-Users] dmq replicate

2017-11-28 Thread Aidar Kamalov
I think I understood..

I put
if(!dmq_is_from_node()) dmq_t_replicate()
after
handle_publish(), handle_subscribe() and t_release()

and now it work ok.



2017-11-28 16:11 GMT+03:00 Aidar Kamalov <aidar.kama...@gmail.com>:

> Hello,
>
> I set up kamailio cluster. dmq_usrloc works fine, but PUSBLISH and
> SUBSCRIBE replication not.
> If I make a call to first node I've got many(hundreds) PUBLISH messages
> from first node to first node and some messages (8 for example) to other
> nodes.
> And second xnotice in config not executes. And errors n log ERROR: 
> [core/sr_module.c:1726]: get_int_fparam(): Unsupported param type for int
> value: 32
>
> How to replicate publish and subscribe, is it wrong way?
>
>
> my confiig:
> request_route {
> if(is_method("KDMQ")) {
> if ($Rp == 5050) { dmq_handle_message(); exit; }
> else { drop; }
> }
> .
> .
> if(is_method("PUBLISH|SUBSCRIBE")) {
> if(!dmq_is_from_node()) {
> xnotice("");
> dmq_t_replicate("1");
> xnotice("BBB");
> }
>  }
>
>
>
> 2017/11/28 12:56:06.415601 192.168.8.213:5060 -> 192.168.8.213:5060
> PUBLISH sip:34200@siptest. SIP/2.0
> Via: SIP/2.0/UDP 192.168.8.213;branch=z9hG4bKc7a5.
> cee84051.0
> To: <sip:34200@siptest>
> From: <sip:34200@siptest.>;tag=ae81df16b5a52fc1f62f9b45f337e660-db10
> CSeq: 10 PUBLISH
> Call-ID: 4c8f9e6e799efcd7-57244@192.168.8.213
> Content-Length: 556
> User-Agent: kamailio (5.0.4 (x86_64/linux))
> Max-Forwards: 70
> Event: dialog
> Expires: 125
> Content-Type: application/dialog-info+xml
>
> 
>  state="full" entity="sip:34200@siptest.">
>call-id="898932197-5060...@bjc.bgi.d.db"
> direction="initiator">
> Trying
> 
>   sip:53003@siptest.t
>   
> 
> 
>   sip:34200@siptest
>   
> 
>   
> 
>
> --
> Aydar A. Kamalov
>



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


[SR-Users] dmq replicate

2017-11-28 Thread Aidar Kamalov
Hello,

I set up kamailio cluster. dmq_usrloc works fine, but PUSBLISH and
SUBSCRIBE replication not.
If I make a call to first node I've got many(hundreds) PUBLISH messages
from first node to first node and some messages (8 for example) to other
nodes.
And second xnotice in config not executes. And errors n log ERROR: 
[core/sr_module.c:1726]: get_int_fparam(): Unsupported param type for int
value: 32

How to replicate publish and subscribe, is it wrong way?


my confiig:
request_route {
if(is_method("KDMQ")) {
if ($Rp == 5050) { dmq_handle_message(); exit; }
else { drop; }
}
.
.
if(is_method("PUBLISH|SUBSCRIBE")) {
if(!dmq_is_from_node()) {
xnotice("");
dmq_t_replicate("1");
xnotice("BBB");
}
 }



2017/11/28 12:56:06.415601 192.168.8.213:5060 -> 192.168.8.213:5060
PUBLISH sip:34200@siptest. SIP/2.0
Via: SIP/2.0/UDP
192.168.8.213;branch=z9hG4bKc7a5.cee84051.0
To: 
From: ;tag=ae81df16b5a52fc1f62f9b45f337e660-db10
CSeq: 10 PUBLISH
Call-ID: 4c8f9e6e799efcd7-57244@192.168.8.213
Content-Length: 556
User-Agent: kamailio (5.0.4 (x86_64/linux))
Max-Forwards: 70
Event: dialog
Expires: 125
Content-Type: application/dialog-info+xml



  
Trying

  sip:53003@siptest.t
  


  sip:34200@siptest
  

  


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


Re: [SR-Users] Dmq usage

2017-11-20 Thread Aidar Kamalov
if I call dmq_handle_message() all kamailio will dead beacause of loop.


2017-11-20 14:08 GMT+03:00 José Seabra <joseseab...@gmail.com>:

> The 7 dmq messages that the node receives seems that are re-transmissions.
> I think that you must call the dmq_handle_message() function within your
> REDIS route in order to stop re-transmissions, but i'm not sure, make a
> test please.
>
> Regarding to that ERROR msg that you sent, it seems that your servers have
> network problems, because  if the DMQ server doesn't receives the 200OK to
> the DMQ Options the nodes will be removed from the list.
>
> BR
> José
>
>
> 2017-11-20 10:56 GMT+00:00 Aidar Kamalov <aidar.kama...@gmail.com>:
>
>> Redis replication is not about multi-master. All kamailio has same dmq
>> settings (except server_address). And I see that ERROR message not always
>> and not only to 192.168.150.225. And it is very strange that kamailio
>> receive 7 sip messages if only one sent.
>>
>>
>> So, this way to usage dmq right?
>> if(is_method("KDMQ")) {
>> if($rU == 'redis') {
>> route(REDIS);
>> } else {
>> dmq_handle_message();
>> }
>> }
>>
>> I'm no understand this in documentaion "Handles a DMQ message by passing
>> it to the appropriate local peer (module)." What is peer and how to handle
>> it. (in my case I use "redis" and  if($rU == 'redis') )
>>
>> 2017-11-20 13:41 GMT+03:00 José Seabra <joseseab...@gmail.com>:
>>
>>> You can use Redis replication for that propose(https://redis.io/topic
>>> s/replication).
>>>
>>> Anyway, regarding to the ERROR messages sent, seems that the
>>> 192.168.150.225:5060 is with troubles, check if the DMQ options are
>>> being transmitted between all nodes.
>>>
>>> BR
>>> José
>>>
>>> 2017-11-20 10:34 GMT+00:00 Aidar Kamalov <aidar.kama...@gmail.com>:
>>>
>>>> because (as I know) redis cluster sharding all data over all redis
>>>> node. by I need all data at all nodes.
>>>>
>>>> 2017-11-20 13:24 GMT+03:00 José Seabra <joseseab...@gmail.com>:
>>>>
>>>>> Hello,
>>>>> Why do you are using DMQ to replicate data across your redis servers
>>>>> since  redis has its own replication mechanisms?
>>>>>
>>>>> BR
>>>>> José
>>>>>
>>>>> 2017-11-20 10:12 GMT+00:00 Aidar Kamalov <aidar.kama...@gmail.com>:
>>>>>
>>>>>> Hello, I want to distribute some messages-actions for redis to my
>>>>>> kamailio servers.
>>>>>> I use this code:
>>>>>> For send:
>>>>>> dmq_bcast_message("redis", "set early:$fU", "text/plain");
>>>>>>
>>>>>> For recieve:
>>>>>> request_route {
>>>>>> xnotice("ROOT: $rm $rU [$ci]");
>>>>>> if(is_method("KDMQ")) {
>>>>>> if($rU == 'redis') {
>>>>>> route(REDIS);
>>>>>> } else {
>>>>>> dmq_handle_message();
>>>>>> }
>>>>>> }
>>>>>> ..
>>>>>> route[REDIS] {
>>>>>> xnotice("REDIS: $rb");
>>>>>> redis_cmd("redis", "$rb", "r");
>>>>>> return;
>>>>>> }
>>>>>>
>>>>>> When dmq_bcast_message starts - other node recieve 7 KDMQ sip
>>>>>> packets. And not always it executed.
>>>>>> Is it right way to use dmq?
>>>>>>
>>>>>> Dmq user locations are ok.
>>>>>>
>>>>>> ___
>>>>>> Kamailio (SER) - Users Mailing List
>>>>>> sr-users@lists.kamailio.org
>>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cumprimentos
>>>>> José Seabra
>>>>>
>>>>> ___
>>>>> Kamailio (SER) - Users Mailing List
>>>>> sr-users@lists.kamailio.org
>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Aydar A. Kamalov
>>>>
>>>> ___
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users@lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>
>>>
>>> --
>>> Cumprimentos
>>> José Seabra
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>>
>> --
>> Aydar A. Kamalov
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
> --
> Cumprimentos
> José Seabra
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>


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


Re: [SR-Users] Dmq usage

2017-11-20 Thread Aidar Kamalov
Redis replication is not about multi-master. All kamailio has same dmq
settings (except server_address). And I see that ERROR message not always
and not only to 192.168.150.225. And it is very strange that kamailio
receive 7 sip messages if only one sent.


So, this way to usage dmq right?
if(is_method("KDMQ")) {
if($rU == 'redis') {
route(REDIS);
} else {
dmq_handle_message();
}
}

I'm no understand this in documentaion "Handles a DMQ message by passing it
to the appropriate local peer (module)." What is peer and how to handle it.
(in my case I use "redis" and  if($rU == 'redis') )

2017-11-20 13:41 GMT+03:00 José Seabra <joseseab...@gmail.com>:

> You can use Redis replication for that propose(https://redis.io/
> topics/replication).
>
> Anyway, regarding to the ERROR messages sent, seems that the
> 192.168.150.225:5060 is with troubles, check if the DMQ options are being
> transmitted between all nodes.
>
> BR
> José
>
> 2017-11-20 10:34 GMT+00:00 Aidar Kamalov <aidar.kama...@gmail.com>:
>
>> because (as I know) redis cluster sharding all data over all redis node.
>> by I need all data at all nodes.
>>
>> 2017-11-20 13:24 GMT+03:00 José Seabra <joseseab...@gmail.com>:
>>
>>> Hello,
>>> Why do you are using DMQ to replicate data across your redis servers
>>> since  redis has its own replication mechanisms?
>>>
>>> BR
>>> José
>>>
>>> 2017-11-20 10:12 GMT+00:00 Aidar Kamalov <aidar.kama...@gmail.com>:
>>>
>>>> Hello, I want to distribute some messages-actions for redis to my
>>>> kamailio servers.
>>>> I use this code:
>>>> For send:
>>>> dmq_bcast_message("redis", "set early:$fU", "text/plain");
>>>>
>>>> For recieve:
>>>> request_route {
>>>> xnotice("ROOT: $rm $rU [$ci]");
>>>> if(is_method("KDMQ")) {
>>>> if($rU == 'redis') {
>>>> route(REDIS);
>>>> } else {
>>>> dmq_handle_message();
>>>> }
>>>> }
>>>> ..
>>>> route[REDIS] {
>>>> xnotice("REDIS: $rb");
>>>> redis_cmd("redis", "$rb", "r");
>>>> return;
>>>> }
>>>>
>>>> When dmq_bcast_message starts - other node recieve 7 KDMQ sip packets.
>>>> And not always it executed.
>>>> Is it right way to use dmq?
>>>>
>>>> Dmq user locations are ok.
>>>>
>>>> ___
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users@lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>
>>>
>>> --
>>> Cumprimentos
>>> José Seabra
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>>
>> --
>> Aydar A. Kamalov
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
> --
> Cumprimentos
> José Seabra
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>


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


Re: [SR-Users] Dmq usage

2017-11-20 Thread Aidar Kamalov
And also I can see that in my logs. But network is working ok.

Nov 20 10:14:04 sipchel /usr/sbin/kamailio[8362]: ERROR: dmq
[notification_peer.c:588]: notification_resp_callback_f(): deleting server
sip:192.168.150.225:5060 because of failed request
Nov 20 10:14:04 sipchel /usr/sbin/kamailio[8362]: ERROR: dmq
[notification_peer.c:590]: notification_resp_callback_f(): not deleting
notification_peer


2017-11-20 13:12 GMT+03:00 Aidar Kamalov <aidar.kama...@gmail.com>:

> Hello, I want to distribute some messages-actions for redis to my kamailio
> servers.
> I use this code:
> For send:
> dmq_bcast_message("redis", "set early:$fU", "text/plain");
>
> For recieve:
> request_route {
> xnotice("ROOT: $rm $rU [$ci]");
> if(is_method("KDMQ")) {
> if($rU == 'redis') {
> route(REDIS);
> } else {
> dmq_handle_message();
> }
> }
> ..
> route[REDIS] {
> xnotice("REDIS: $rb");
> redis_cmd("redis", "$rb", "r");
> return;
> }
>
> When dmq_bcast_message starts - other node recieve 7 KDMQ sip packets. And
> not always it executed.
> Is it right way to use dmq?
>
> Dmq user locations are ok.
>



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


[SR-Users] Dmq usage

2017-11-20 Thread Aidar Kamalov
Hello, I want to distribute some messages-actions for redis to my kamailio
servers.
I use this code:
For send:
dmq_bcast_message("redis", "set early:$fU", "text/plain");

For recieve:
request_route {
xnotice("ROOT: $rm $rU [$ci]");
if(is_method("KDMQ")) {
if($rU == 'redis') {
route(REDIS);
} else {
dmq_handle_message();
}
}
..
route[REDIS] {
xnotice("REDIS: $rb");
redis_cmd("redis", "$rb", "r");
return;
}

When dmq_bcast_message starts - other node recieve 7 KDMQ sip packets. And
not always it executed.
Is it right way to use dmq?

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


[SR-Users] kamailio jsonrpc client

2017-09-19 Thread Aidar Kamalov
Hello,

cannot get working rpc client n kamailio.

[root@sipchel kamailio]# grep 'json\|jansson' kamailio-default.cfg
loadmodule "jsonrpcs.so"
loadmodule "jansson.so"
loadmodule "janssonrpcc.so"
# jsonrpcs params -
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "transport", 3)
# jansson
modparam("janssonrpcc", "server",
"conn=user_db;addr=127.0.0.1;port=5060;priority=10;weight=10");



request_route {
...
janssonrpc_request("user_db", "core.version", '', "route=RESPONSE;retry=1");
...
}

event_route[xhttp:request] {
if ($hu =~ "^/jsonrpc") {
jsonrpc_dispatch();
} else {
xhttp_reply("200", "OK", "text/html",
"Wrong URL $hu");
}
return;
}


With this config i got error
Sep 19 08:52:15 sipchel /usr/sbin/kamailio[39891]: INFO: janssonrpcc
[janssonrpc_connect.c:294]: bev_connect(): Connecting to server
127.0.0.1:5060 for conn user_db.
Sep 19 08:52:15 sipchel /usr/sbin/kamailio[39891]: INFO: janssonrpcc
[janssonrpc_connect.c:277]: bev_connect_cb(): Connected to host
127.0.0.1:5060
...
Sep 19 08:52:20 sipchel /usr/sbin/kamailio[39891]: WARNING: janssonrpcc
[janssonrpc_request.c:242]: schedule_retry(): Number of retries exceeded.
Failing request.
Sep 19 08:52:20 sipchel /usr/sbin/kamailio[39891]: WARNING: janssonrpcc
[janssonrpc_io.c:218]: fail_request(): Request timeout:
#012{"id":3,"jsonrpc":"2.0","method":"core.version"}


But
[root@sipchel kamailio]# curl -s -H 'Content-Type: application/json'
--data-binary '{"jsonrpc":"2.0", "method": "core.version"}'
http://localhost:5060/jsonrpc
{
"jsonrpc": "2.0",
"result": "kamailio 5.0.3 (x86_64/linux) "
}


How to get working rpc client in kamailio? Is it possible to define url
for janssonrpcc module?


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


Re: [SR-Users] ringing calls dialogs

2017-09-18 Thread Aidar Kamalov
May be is it possible to use event route for dialog state change? I found
only on dialog start and end

2017-09-18 11:06 GMT+03:00 shubh diwase <shubh.diw...@gmail.com>:

> You can usee rr module and various presence modules for log enabling,it is
> written in the modules section
>
> On 14-Sep-2017 9:01 PM, "Aidar Kamalov" <aidar.kama...@gmail.com> wrote:
>
>> Hello,
>> is it possible from route get info about all calls in ringing state? (for
>> call pickup implementation)
>>
>> Is it better to do via dialogs or presence modules?
>>
>> --
>> Aydar A. Kamalov
>>
>> ___
>> 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
>
>


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


Re: [SR-Users] ringing calls dialogs

2017-09-18 Thread Aidar Kamalov
I can't see at these modules any function to get dialog list

2017-09-18 10:32 GMT+03:00 Daniel-Constantin Mierla <mico...@gmail.com>:

> Hello,
>
> you need dialog, presence_dialoginfo and pua_dialoginfo modules to
> implement call pickup feature.
>
> Cheers,
> Daniel
>
> On 14.09.17 17:30, Aidar Kamalov wrote:
>
> Hello,
> is it possible from route get info about all calls in ringing state? (for
> call pickup implementation)
>
> Is it better to do via dialogs or presence modules?
>
> --
> Aydar A. Kamalov
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>


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


[SR-Users] ringing calls dialogs

2017-09-14 Thread Aidar Kamalov
Hello,
is it possible from route get info about all calls in ringing state? (for
call pickup implementation)

Is it better to do via dialogs or presence modules?

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


[SR-Users] alias_db muliple usernames for alias

2017-09-07 Thread Aidar Kamalov
Hello,
I have
modparam("alias_db", "append_branches", 1)

and table dbaliases
+++-+--+-+
| id | alias_username | alias_domain| username | domain  |
+++-+--+-+
|  1 |    | sipchel | 34200| sipchel |
|  2 |    | sipchel | 34201| sipchel |
+++-+--+-+

If I call to  ringing only 34200, because first invite is right
(resolving to username contact), but branch inivite is wrong. Is it bug or
it is my my fault?

First:
INVITE sip:34200@172.16.3.7:5060 SIP/2.0
Via: SIP/2.0/UDP
192.168.10.54;branch=z9hG4bKa277.42eb85466191923b73c9234c5c342b67.0
Via: SIP/2.0/UDP 172.16.3.4:5060;branch=z9hG4bK-c5fef8cc
From: "" ;tag=1898fba2a5729040o0
To: 


Second:
INVITE sip:34201@sipchel SIP/2.0
Record-Route: 
Via: SIP/2.0/UDP
192.168.10.54;branch=z9hG4bKa277.42eb85466191923b73c9234c5c342b67.1
Via: SIP/2.0/UDP 172.16.3.4:5060;branch=z9hG4bK-c5fef8cc
From: "" ;tag=1898fba2a5729040o0
To: 


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


Re: [SR-Users] acc billsec

2017-08-10 Thread Aidar Kamalov
It seems that in kamailio 5.0.x field duration is billing time. Is it?

2017-08-10 14:24 GMT+03:00 ycaner :

> Hello,
> Dialog module can help you about it.It can generate CDR with billsec.
>
> http://kamailio.org/docs/modules/5.0.x/modules/dialog.html
>
>
>
> --
> View this message in context: http://sip-router.1086192.n5.
> nabble.com/acc-billsec-tp161050p161051.html
> Sent from the Users mailing list archive at Nabble.com.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>



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


[SR-Users] acc billsec

2017-08-10 Thread Aidar Kamalov
Hello,

is there any way to log in cdr duration and billsec?

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


[SR-Users] kamailio + dispatcher asterisks + pstn gateways

2017-08-08 Thread Aidar Kamalov
Hello,

Whats the best way to provide subject?
Now I have central kamailio server and (asterisk "media" servers + asterisk
pstn gateway in different cities).
Kamailio default config with some changes in route[LOCATION]
if (!lookup("location")) {
$var(rc) = $rc;
route(TOVOICEMAIL);

t_newtran();
switch ($var(rc)) {
case -1:
xwarn("Contact $rU not registered.
Forwarding call to dispatcher");
append_hf("X-External: true\r\n");
$rU = "00"+$rU;
break;
case -3:
send_reply("404", "Not Found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}
..
# when routing via usrloc, log the missed calls also
if (is_method("INVITE")) {
setflag(FLT_ACCMISSED);
}

if(!ds_is_from_list()) {
route(DISPATCH);
}
route(RELAY);

So all calls going to asterisk server. Not local calls with 00 prefix.
And asterisk context:
context kamailio {
_X. => {
Noop(CALL to kamailio user ${EXTEN});
Dial(SIP/${EXTEN}@${SIPDOMAIN},60,RTt);
Hangup;
}

_00X. => {
Noop(CALL to external user ${EXTEN});
Dial(SIP/PSTN-SERVER/${EXTEN:2},60,RTt);
Hangup;
}
}

Is it right way? Maybe any better approach? How to keep route logic at
kamailio, but use dispatcher asterisk to proccess the calls to pstn(all
endpoints at one city to pstn asterisk at this city. In others city there
are other pstn gateways)?
-- 
Aydar A. Kamalov
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] route[LOCATION] is it bug?

2017-08-03 Thread Aidar Kamalov
Hello, I 'm new in kamailio.

I have kamailio with dispatcher and two asterisks. Endpoints register to
kamailio. Calls beetwen endpoints going through dispatcher to asterisks.
Calls to other destination rejected by kamailio with 404.
But If i put  xlog("") or xwarn in route[LOCATION] in if
(!lookup("location")) block (default kamailio 5.0.2 config) calls to other
destination goes through dispatcher to asterisks. I cant't understand WHY?
:(
(sorry for my bad English)


route[LOCATION] {
#!ifdef WITH_SPEEDDIAL
# search for short dialing - 2-digit extension
if($rU=~"^[0-9][0-9]$") {
if(sd_lookup("speed_dial")) {
route(SIPOUT);
}
}
#!endif

#!ifdef WITH_ALIASDB
# search in DB-based aliases
if(alias_db_lookup("dbaliases")) {
route(SIPOUT);
}
#!endif
$avp(oexten) = $rU;

if (!lookup("location")) {
xwarn("method ($rm) r-uri ($ru)\n");   ##
HERE ##
$var(rc) = $rc;

route(TOVOICEMAIL);
t_newtran();
switch ($var(rc)) {
case -1:
case -3:
send_reply("404", "Not Found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}

# when routing via usrloc, log the missed calls also
if (is_method("INVITE")) {
setflag(FLT_ACCMISSED);
}

if(!ds_is_from_list()) {
route(DISPATCH);
}
route(RELAY);
exit;
}

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