[SR-Users] jsonrpcs - safest way to get data

2020-10-05 Thread Ilie Soltanici
Hello,

I'm trying to periodically get all registered contacts from the Kamailio
memory in the json format.
JSONRPCS module have 3 different types of transport to get this data. I
just wonder what will be the safest transport for the Kamailio to get all
this data? Because all this data it's not so important, I want to gather it
without affecting the main process or with the minimal effect on the
Kamailio SIP Processing module.

1. The HTTP transport - very useful, working async, but because it depends
on the xhttp module - which works synchronously I'm afraid that for big
data with contacts this type of transport can affect the kamailio
performance.

2. FIFO - this transport also is very fast, working locally - but it's
synchronous, I'm not sure how it will affect Kamailio SIP Processing when
the local database will have few millions of users registered.

3. DGRAM - also seems to be very fast, working locally or remotely through
the UDP protocol, but again it's synchronous and I'm not sure that this
transport is returning any output for the request, I tried - but didn't get
back anything, while for changing something it worked fine. Maybe it was a
misconfiguration in my config file.

What would be your recommendation for this case?

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


Re: [SR-Users] Drop calls with response 200 without previous 180/183 reponses

2020-10-05 Thread Julien Chavanton
You could use an htable and wait for the ACK to dlg_bye the caller.

Or you could try rewriting the response and sending dlg_bye to the callee,
just seems less predictable in terms of what can happen.


On Mon, Oct 5, 2020 at 2:47 PM Julien Chavanton 
wrote:

> Indeed, the call must be disconnected properly.
> I would not rewrite the code unless absolutely necessary to avoid edge
> cases.
> Kamailio can do some in the middle UAC tasks, in this case maybe you could
> look at :
> dialog module dlg_bye(side)
>
> On Mon, Oct 5, 2020 at 6:05 AM Valter Nogueira 
> wrote:
>
>> Thank you people. It seems an easy approach using htable.
>>
>> I was wondering that this is not compliant with RFC 3261, since a proxy
>> should not change sip responses.
>>
>> In fact not only I should change the sip response but I should send a BYE
>> on behalf of the UAC. It seems like a B2BUA
>>
>>
>> Em sáb, 3 de out de 2020 12:45, David Villasmil <
>> david.villasmil.w...@gmail.com> escreveu:
>>
>>> Kamailio is so cool, you could even do it without the dialog module. You
>>> could simply use a hash table (htable module) and when/if a 183/180 is
>>> received store the callid in the table (with an expiration). Anytime a 200
>>> is received check the table (it’s in memory, so really fast), if not found,
>>> reject.
>>> Super simple.
>>>
>>>
>>> On Sat, 3 Oct 2020 at 13:51, Valentin Christoph <
>>> christoph.valen...@kontron.com> wrote:
>>>














 I am not quite sure, but I would try to store a long-term flag with the
 help of the dialog module.











 [...]The dialog module provides dialog awareness for the Kamailio
 proxy. It's functionality is to keep track of the current dialogs, to offer
 information about them (e.g. how many dialogs are active), and to manage
 various characteristics of dialogs. The module

 exports several functions that can be used directly from the
 configuration route script as well as functions for the RPC interface. 
 [...]

















 [...]10.6. $dlg_var(key)







 This is a read/write variable that can be used to store custom values
 assigned with a dialog (e.g. the URI of a billing-server, an assigned
 emergency-server). This pseudo-variable will be available only for
 subsequential requests after doing loose_route().



 Note: You will receive "NULL", if there is no dialog for this
 request.[...]









 Hint: ACK is a subsequential request













 Anyway, I am wondering if your approach would be compliant to RFC 3261.













 KR















 --


 *Von:* sr-users  im Auftrag von
 Valter Nogueira 


 *Gesendet:* Freitag, 2. Oktober 2020 17:01


 *An:* Kamailio (SER) - Users Mailing List 


 *Betreff:* [SR-Users] Drop calls with response 200 without previous
 180/183 reponses
















 I would like to use Kamailio to drop every call that is answered with
 no previous 180 / 183 responses or with 180 / 183 responses with no media
 attached (no SDP?).







 Is it possible? How could I accomplish this?







 Thanks,







 Valter




























 ___

 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
>>>
>> ___
>> 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] SIP client - Linphone

2020-10-05 Thread Pavithra Mohanraja
Hi Aymeric,
Thanks for your reply. Yes, as you said I get the below warning when I
start Linphone. But the port is actually not used by any other application.
And one more thing is,  I see this error only in case of enabling TCP
transport and not in UDP. So does that mean, linphone works only with UDP
transport?
*Warning: Could not start tcp transport on port 4060, maybe this port is
already used.*

On Mon, Oct 5, 2020 at 8:08 PM Aymeric Moizard  wrote:

> Hi,
>
> I'm answering as the author of libosip & libeXosip ;)
>
> Linphone, in your case is based on eXosip.
> Linphone removed eXosip2 years ago and thus, you use
> a very old linphone and very old eXosip2 version..
>
>
> Anyway, whatever versions of eXosip2, it needs to be used that way:
>
> ctx = eXosip_malloc
> 
> ();
> if (ctx==NULL)
> return -1;
> i=eXosip_init
> 
> (ctx);
> if (i!=0)
> return -1;
>
> i = eXosip_listen_addr
> 
> (ctx, IPPROTO_UDP, NULL, port, AF_INET, 0);
> if (i!=0)
> {
> eXosip_quit
> 
> (ctx);
> fprintf (stderr, "could not initialize transport layer\n");
> return -1;
> }
>
> If eXosip_listen_addr
> 
>  is
> failing nothing can be done with eXosip2, and " create transport layer
> first" logs
> will happen for some API which can't be used in that state.
>
> http://www.antisip.com/doc/exosip2/group__howto__initialize.html
>
> If the socket can't be created, the above API will fail. So a usual
> scenario is to have the port already used.
>
> A simple way is to choose another port when this is happening and I guess
> this old version of linphone wasn't
> doing that:
>
> i = eXosip_listen_addr
> 
> (ctx, IPPROTO_UDP, NULL, port, AF_INET, 0);
> if (i!=0)
> i = eXosip_listen_addr
> 
> (ctx, IPPROTO_UDP, NULL, 0, AF_INET, 0);
> if (i!=0)
> {
> eXosip_quit
> 
> (ctx);
> fprintf (stderr, "could not initialize transport layer\n");
> return -1;
> }
>
> Regards
> Aymeric
>
>
> Le lun. 5 oct. 2020 à 12:28, David Villasmil <
> david.villasmil.w...@gmail.com> a écrit :
>
>> Not an expert here. But many moons ago, I was playing with pjsip and got
>> the same. You must create the socket first, make sure the ip assigned is
>> correct.
>>
>> On Mon, 5 Oct 2020 at 06:47, Pavithra Mohanraja 
>> wrote:
>>
>>> Hi Jan,
>>> Sorry for the delayed response. I guess the issue is because of UDP
>>> transport, which my kamailio is not accepting. Because  the same scenario
>>> is reproduced when I change my pjsip configurations to udp instead of tcp.
>>> But linphone gives me the following error if I tried to connect using tcp.
>>>
>>>
>>> *ortp-error-wrong state: create transport layer firstortp-error-wrong
>>> state: create transport layer firstortp-error-eXosip: missing via header*
>>> Am I missing something really important? Please let me know. Thanks in
>>> advance.
>>>
>>> On Wed, Sep 30, 2020 at 5:33 PM Jan Rozhon  wrote:
>>>










 Hmm, nothing obviously wrong. Is there anything in Kamailio's

 logs? Are you sure REGISTER reaches kamailio? Can you run tcpdump

 or even better sngrep on kamailio server?


 Regards, Jan









 On 30. 09. 20 13:28, Pavithra Mohanraja

 wrote:








 Hi Jan,


 I have also tried as u suggested with reg_proxy only with

 sip server name, could not obtain any positive changes. I have

 also attached the debug logs, please have a look and suggest

 for any changes. Thanks in advance.









 On Wed, Sep 30, 2020 at 4:42

 PM Jan Rozhon  wrote:





>
>
>
> Sorry, I am not that good in linphone configuration file
>
> so I may be wrong, but it seems to me that reg_proxy
>
> should only contain uri of the server, not the user part.
>
> Moreover, I have definitely more options there but not
>
> using it as an IMS.
>
>
> Mine is a bit more wordy:
>
>
> [proxy_3]
>
>
> reg_proxy=
>
>
> reg_identity=sip:420123456...@sip.server.here
>
>
> realm=sip.linphone.org
>
>
> 

Re: [SR-Users] SIP client - Linphone

2020-10-05 Thread Aymeric Moizard
Hi,

I'm answering as the author of libosip & libeXosip ;)

Linphone, in your case is based on eXosip.
Linphone removed eXosip2 years ago and thus, you use
a very old linphone and very old eXosip2 version..


Anyway, whatever versions of eXosip2, it needs to be used that way:

ctx = eXosip_malloc

();
if (ctx==NULL)
return -1;
i=eXosip_init

(ctx);
if (i!=0)
return -1;

i = eXosip_listen_addr

(ctx, IPPROTO_UDP, NULL, port, AF_INET, 0);
if (i!=0)
{
eXosip_quit

(ctx);
fprintf (stderr, "could not initialize transport layer\n");
return -1;
}

If eXosip_listen_addr

is
failing nothing can be done with eXosip2, and " create transport layer
first" logs
will happen for some API which can't be used in that state.

http://www.antisip.com/doc/exosip2/group__howto__initialize.html

If the socket can't be created, the above API will fail. So a usual
scenario is to have the port already used.

A simple way is to choose another port when this is happening and I guess
this old version of linphone wasn't
doing that:

i = eXosip_listen_addr

(ctx, IPPROTO_UDP, NULL, port, AF_INET, 0);
if (i!=0)
i = eXosip_listen_addr

(ctx, IPPROTO_UDP, NULL, 0, AF_INET, 0);
if (i!=0)
{
eXosip_quit

(ctx);
fprintf (stderr, "could not initialize transport layer\n");
return -1;
}

Regards
Aymeric


Le lun. 5 oct. 2020 à 12:28, David Villasmil 
a écrit :

> Not an expert here. But many moons ago, I was playing with pjsip and got
> the same. You must create the socket first, make sure the ip assigned is
> correct.
>
> On Mon, 5 Oct 2020 at 06:47, Pavithra Mohanraja 
> wrote:
>
>> Hi Jan,
>> Sorry for the delayed response. I guess the issue is because of UDP
>> transport, which my kamailio is not accepting. Because  the same scenario
>> is reproduced when I change my pjsip configurations to udp instead of tcp.
>> But linphone gives me the following error if I tried to connect using tcp.
>>
>>
>> *ortp-error-wrong state: create transport layer firstortp-error-wrong
>> state: create transport layer firstortp-error-eXosip: missing via header*
>> Am I missing something really important? Please let me know. Thanks in
>> advance.
>>
>> On Wed, Sep 30, 2020 at 5:33 PM Jan Rozhon  wrote:
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hmm, nothing obviously wrong. Is there anything in Kamailio's
>>>
>>> logs? Are you sure REGISTER reaches kamailio? Can you run tcpdump
>>>
>>> or even better sngrep on kamailio server?
>>>
>>>
>>> Regards, Jan
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 30. 09. 20 13:28, Pavithra Mohanraja
>>>
>>> wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hi Jan,
>>>
>>>
>>> I have also tried as u suggested with reg_proxy only with
>>>
>>> sip server name, could not obtain any positive changes. I have
>>>
>>> also attached the debug logs, please have a look and suggest
>>>
>>> for any changes. Thanks in advance.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Sep 30, 2020 at 4:42
>>>
>>> PM Jan Rozhon  wrote:
>>>
>>>
>>>
>>>
>>>



 Sorry, I am not that good in linphone configuration file

 so I may be wrong, but it seems to me that reg_proxy

 should only contain uri of the server, not the user part.

 Moreover, I have definitely more options there but not

 using it as an IMS.


 Mine is a bit more wordy:


 [proxy_3]


 reg_proxy=


 reg_identity=sip:420123456...@sip.server.here


 realm=sip.linphone.org


 contact_parameters=message-expires=604800


 quality_reporting_collector=
 sip:voip-metr...@sip.linphone.org;transport=tls


 quality_reporting_enabled=1


 quality_reporting_interval=180


 reg_expires=600


 reg_sendregister=1


 publish=1


 avpf=-1


 avpf_rr_interval=1


 dial_escape_plus=0


 privacy=32768


 push_notification_allowed=0


 idkey=proxy_config_voVF8eoXq46cJLs


 publish_expires=600


 nat_policy_ref=bUwFfNPHt40-miQ


 Could you send the REGISTER message not being accepted?


 Regards, Jan




 On 30. 09. 20 12:54, 

Re: [SR-Users] Drop calls with response 200 without previous 180/183 reponses

2020-10-05 Thread Valter Nogueira
Thank you people. It seems an easy approach using htable.

I was wondering that this is not compliant with RFC 3261, since a proxy
should not change sip responses.

In fact not only I should change the sip response but I should send a BYE
on behalf of the UAC. It seems like a B2BUA


Em sáb, 3 de out de 2020 12:45, David Villasmil <
david.villasmil.w...@gmail.com> escreveu:

> Kamailio is so cool, you could even do it without the dialog module. You
> could simply use a hash table (htable module) and when/if a 183/180 is
> received store the callid in the table (with an expiration). Anytime a 200
> is received check the table (it’s in memory, so really fast), if not found,
> reject.
> Super simple.
>
>
> On Sat, 3 Oct 2020 at 13:51, Valentin Christoph <
> christoph.valen...@kontron.com> wrote:
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I am not quite sure, but I would try to store a long-term flag with the
>> help of the dialog module.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> [...]The dialog module provides dialog awareness for the Kamailio proxy.
>> It's functionality is to keep track of the current dialogs, to offer
>> information about them (e.g. how many dialogs are active), and to manage
>> various characteristics of dialogs. The module
>>
>> exports several functions that can be used directly from the
>> configuration route script as well as functions for the RPC interface. [...]
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> [...]10.6. $dlg_var(key)
>>
>>
>>
>>
>>
>>
>>
>> This is a read/write variable that can be used to store custom values
>> assigned with a dialog (e.g. the URI of a billing-server, an assigned
>> emergency-server). This pseudo-variable will be available only for
>> subsequential requests after doing loose_route().
>>
>>
>>
>> Note: You will receive "NULL", if there is no dialog for this
>> request.[...]
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hint: ACK is a subsequential request
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Anyway, I am wondering if your approach would be compliant to RFC 3261.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> KR
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>>
>> *Von:* sr-users  im Auftrag von
>> Valter Nogueira 
>>
>>
>> *Gesendet:* Freitag, 2. Oktober 2020 17:01
>>
>>
>> *An:* Kamailio (SER) - Users Mailing List 
>>
>>
>> *Betreff:* [SR-Users] Drop calls with response 200 without previous
>> 180/183 reponses
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I would like to use Kamailio to drop every call that is answered with no
>> previous 180 / 183 responses or with 180 / 183 responses with no media
>> attached (no SDP?).
>>
>>
>>
>>
>>
>>
>>
>> Is it possible? How could I accomplish this?
>>
>>
>>
>>
>>
>>
>>
>> Thanks,
>>
>>
>>
>>
>>
>>
>>
>> Valter
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>>
>> 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
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] SIP message generator for Kamailio

2020-10-05 Thread Aymeric Moizard
Hi!

Thanks for your interest in sip_reg and sip_monitor!

sip_reg.c is a very old tool in libeXosip. It's runs as a daemon, in
background so..., to REGISTER a Contact header.
This Contact header can be a long term static URI, or anything to test.
It will reject any incoming call.
It will log into syslog so you may keep an eye on it and may be monitor
connection with a service.
sip_reg.c is working, but I'm not using it and it may be uncomplete for
some task.

sip_monitor is a very new version of sip_reg. It's a tool, not running in
the background with the goal
of reporting in syslog proper logs on success or failure to connect on a
service. I'm using it to monitor
a kamailo service.

In order to use one or the other, you need to install openssl + openssl-dev
and libc-ares-dev + libc-ares-dev (https://c-ares.haxx.se/)

$> git clone https://git.savannah.gnu.org/git/osip.git
$> cd osip
$> ./autogen.sh
$> ./configure
$> make
$> make install

$> git clone https://git.savannah.nongnu.org/git/exosip.git
$> cd osip
$> ./autogen.sh
$> ./configure
$> make
$> make install

To make sure you correctly have compiled eXosip with the dependancies,
check in exosip-config.h if it contains
 #define HAVE_ARES_H 1
and
 #define HAVE_OPENSSL_SSL_H 1

Then, you can run sip_monitor. You get in syslog various information,
including error or duration of the test:

$> /usr/local/bin/sip_monitor -r sip:antisip.com -u sip:te...@antisip.com
-U test1 -P THISISTHEPASSWORD -t TLS -s --outbound ""
sip_monitor[6439]: sip_monitor (5.1.3) up and running [testing on [TLS]
REGISTER [sip:antisip.com] From: [sip:te...@antisip.com] Username:
[test1:*] Route: []
sip_monitor[6439]: [count=1] socket [sip.antisip.com] [sock=11] [pos=0]
connected
sip_monitor[6439]: [count=2] socket [sip.antisip.com] [sock=11] [pos=0]
connected (ssl in progress)
sip_monitor[6439]: [count=1] [ssl connect] succeeded [TLSv1.2]
sip_monitor[6439]: [TLS][duration:0,091s] REGISTER [401][Unauthorized]
sip_monitor[6439]: REGISTRATION REPORT:[SUCCESS] [TLS][duration:0,115s]
REGISTER [200][OK]

WRONG PASSWORD:

$> /usr/local/bin/sip_monitor -r sip:sip4.antisip.com -u
sip:te...@sip.antisip.com -U test1 -P THISISNOTTHEPASSWORD -t TLS -s
--outbound ""
sip_monitor[6357]: sip_monitor (5.1.3) up and running [testing on [TLS]
REGISTER [sip:antisip.com] From: [sip:te...@antisip.com] Username:
[test1:*] Route: []
sip_monitor[6357]: [count=1] socket [sip.antisip.com] [sock=11] [pos=0]
connected
sip_monitor[6357]: [count=2] socket [sip.antisip.com] [sock=11] [pos=0]
connected (ssl in progress)
sip_monitor[6357]: [count=1] [ssl connect] succeeded [TLSv1.2]
sip_monitor[6357]: [TLS][duration:0,092s] REGISTER [401][Unauthorized]
sip_monitor[6357]: REGISTRATION REPORT:[FAILURE] [TLS][duration:0,116s]
REGISTER [403][Wrong Password] err=Wrong Password


WRONG CERTIFICATE VALIDATION: (Wrong SNI : FQDN is wrong)

$> /usr/local/bin/sip_monitor -r sip:sip4.antisip.com -u
sip:te...@sip.antisip.com -U test1 -P THISISTHEPASSWORD -t TLS -s
--outbound ""
sip_monitor[6496]: sip_monitor (5.1.3) up and running [testing on [TLS]
REGISTER [sip:antisip.com] From: [sip:te...@antisip.com] Username:
[test1:*] Route: []
sip_monitor[6496]: [count=1] socket [sip4.antisip.com] [sock=11] [pos=0]
connected
sip_monitor[6496]: [count=1] socket [sip4.antisip.com] [sock=11] [pos=0]
connected (ssl in progress)
sip_monitor[6496]: [count=1] [TLS] invalid  depth[0] [/CN=antisip.com]
[62:Hostname mismatch]
sip_monitor[6496]: [count=1] [ssl connect] error
sip_monitor[6496]: REGISTRATION REPORT:[FAILURE] [TLS][duration:1,391s]
REGISTER [408][   ] err=[TLS] invalid  depth[0] [/CN=antisip.com]
[62:Hostname mismatch]

"-v 6" option can be used to debug more. And other parameters for Contact,
etc... By default, it's only fetching Contact.

About sip_reg.c: There is less options in general, but more option for
Contact header manipulation

$> sip_reg -d -r sip:sip.antisip.com -u sip:te...@sip.antisip.com -U test1
-P THISISTHEPASSWORD -t TCP -s -e 180 -m

WIth "-d", it runs in foreground on console. Without "-d", it will fork and
run for ever in background (if started correctly)

Unfortunatly, it do not provide much info in the syslog. Only this kind:
Oct  5 13:59:49 antisip sip_reg[8245]: sip_reg (5.1.3) up and running
[testing on [TCP] REGISTER [sip:sip.antisip.com] Expires [180] From: [
sip:te...@sip.antisip.com] Username: [test1:*]]
Oct  5 13:59:49 antisip sip_reg[8245]: local port: 5060
Oct  5 13:59:49 antisip sip_reg[8245]: automasquerade enabled
Oct  5 13:59:50 antisip sip_reg[8245]: registrered successfully
Oct  5 13:59:50 antisip sip_reg[8245]: registrered successfully
Oct  5 13:59:50 antisip sip_reg[8245]: registrered successfully


Regards,
Aymeric

Le lun. 5 oct. 2020 à 13:30, Arsen Semenov  a écrit :

> Hi Aymeric,
>
> Can you please send a link to git repo with this tool?
>
>
> Thanks
>
> On Sat, Oct 3, 2020 at 9:05 PM Aymeric Moizard  wrote:
>
>> Hi,
>>
>> In libeXosip, latest release or git, I have made 

Re: [SR-Users] SIP message generator for Kamailio

2020-10-05 Thread Arsen Semenov
Hi Aymeric,

Can you please send a link to git repo with this tool?


Thanks

On Sat, Oct 3, 2020 at 9:05 PM Aymeric Moizard  wrote:

> Hi,
>
> In libeXosip, latest release or git, I have made a new tool named
> "sip_monitor".
>
> The dependencies are libosip and c-ares.
>
> The tool can build many REGISTER for any protocol (UDP, TCP, TLS) with
> many variant of request-uri, from and contact or TLS certificate.
>
> It could be extended for more options.
>
> The latest git has also a new outbound proxy setting to have a different
> request-uri.
>
> Aymeric
>
> Le sam. 3 oct. 2020 à 17:30, luke devon  a écrit :
>
>> Hi Team,
>>
>> May I check with you, Is there a SIP message generator available for the
>> Kamailio? I want to test my setup using some test SIP messages.
>>
>> Many Thanks
>> Luke.
>> ___
>> 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
>


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


Re: [SR-Users] xcap_client: storage of document in local DB

2020-10-05 Thread Valentin Christoph
Hi Daniel,

Just for clarification. This case is about data from non-kamailio xcap server 
to be handled in a self-written Kamailio module (Railway specific 
functionality) during call setup, where we would appreciate the module-API 
services of the xcap_client module.

Currently discussing it internally, eventually we might implement get_elem 
method of xcap_client module (just sending GET request and forwarding the body 
of the response via the API to the Railway specific module).

KR

Von: Daniel-Constantin Mierla 
Gesendet: Samstag, 3. Oktober 2020 19:45
An: Kamailio (SER) - Users Mailing List ; Valentin 
Christoph 
Cc: Onic Roman ; Friedrich Peter 

Betreff: Re: [SR-Users] xcap_client: storage of document in local DB


Hello,



afaik, xcap_client only fetches the xcap documents from a remote xcap server 
via http/https, it doesn't do anything else. The fetched xcap document is used 
by presence modules for watchers management and persentity rules.



On the other hand, xcap_server does the management of xcap documents pushed by 
the clients, storing/deleting/updating them in database. You do not need 
xcap_client module if you use the integrated xcap server implemented in the 
xcap_server module, the presence modules bind directly to xcap_server 
internally.



Cheers,
Daniel


On 03.10.20 14:36, Valentin Christoph wrote:
Hi all,

Does anybody know, when the xcap_client deletes a registered document from the 
database? Is it possible to deregister a document?

Are you sure, the documented get_elem API function is actually implemented?

All the best
Christoph



___

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] SIP message generator for Kamailio

2020-10-05 Thread Daniel-Constantin Mierla
Hello,

thanks for this info, knowing more testing tools is useful. I noticed a
second tool coming with libeXosip, namely sip_reg. The help message
seems to be similar with sip_monitor, what is the difference between the
two?

Cheers,
Daniel

On 03.10.20 18:04, Aymeric Moizard wrote:
> Hi,
>
> In libeXosip, latest release or git, I have made a new tool named
> "sip_monitor".
>
> The dependencies are libosip and c-ares.
>
> The tool can build many REGISTER for any protocol (UDP, TCP, TLS) with
> many variant of request-uri, from and contact or TLS certificate.
>
> It could be extended for more options.
>
> The latest git has also a new outbound proxy setting to have a
> different request-uri.
>
> Aymeric
>
> Le sam. 3 oct. 2020 à 17:30, luke devon  > a écrit :
>
> Hi Team, 
>
> May I check with you, Is there a SIP message generator available
> for the Kamailio? I want to test my setup using some test SIP
> messages.
>
> Many Thanks
> Luke. 
> ___
> 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] SIP client - Linphone

2020-10-05 Thread David Villasmil
Not an expert here. But many moons ago, I was playing with pjsip and got
the same. You must create the socket first, make sure the ip assigned is
correct.

On Mon, 5 Oct 2020 at 06:47, Pavithra Mohanraja 
wrote:

> Hi Jan,
> Sorry for the delayed response. I guess the issue is because of UDP
> transport, which my kamailio is not accepting. Because  the same scenario
> is reproduced when I change my pjsip configurations to udp instead of tcp.
> But linphone gives me the following error if I tried to connect using tcp.
>
>
> *ortp-error-wrong state: create transport layer firstortp-error-wrong
> state: create transport layer firstortp-error-eXosip: missing via header*
> Am I missing something really important? Please let me know. Thanks in
> advance.
>
> On Wed, Sep 30, 2020 at 5:33 PM Jan Rozhon  wrote:
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hmm, nothing obviously wrong. Is there anything in Kamailio's
>>
>> logs? Are you sure REGISTER reaches kamailio? Can you run tcpdump
>>
>> or even better sngrep on kamailio server?
>>
>>
>> Regards, Jan
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On 30. 09. 20 13:28, Pavithra Mohanraja
>>
>> wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>> Hi Jan,
>>
>>
>> I have also tried as u suggested with reg_proxy only with
>>
>> sip server name, could not obtain any positive changes. I have
>>
>> also attached the debug logs, please have a look and suggest
>>
>> for any changes. Thanks in advance.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Sep 30, 2020 at 4:42
>>
>> PM Jan Rozhon  wrote:
>>
>>
>>
>>
>>
>>>
>>>
>>>
>>> Sorry, I am not that good in linphone configuration file
>>>
>>> so I may be wrong, but it seems to me that reg_proxy
>>>
>>> should only contain uri of the server, not the user part.
>>>
>>> Moreover, I have definitely more options there but not
>>>
>>> using it as an IMS.
>>>
>>>
>>> Mine is a bit more wordy:
>>>
>>>
>>> [proxy_3]
>>>
>>>
>>> reg_proxy=
>>>
>>>
>>> reg_identity=sip:420123456...@sip.server.here
>>>
>>>
>>> realm=sip.linphone.org
>>>
>>>
>>> contact_parameters=message-expires=604800
>>>
>>>
>>> quality_reporting_collector=
>>> sip:voip-metr...@sip.linphone.org;transport=tls
>>>
>>>
>>> quality_reporting_enabled=1
>>>
>>>
>>> quality_reporting_interval=180
>>>
>>>
>>> reg_expires=600
>>>
>>>
>>> reg_sendregister=1
>>>
>>>
>>> publish=1
>>>
>>>
>>> avpf=-1
>>>
>>>
>>> avpf_rr_interval=1
>>>
>>>
>>> dial_escape_plus=0
>>>
>>>
>>> privacy=32768
>>>
>>>
>>> push_notification_allowed=0
>>>
>>>
>>> idkey=proxy_config_voVF8eoXq46cJLs
>>>
>>>
>>> publish_expires=600
>>>
>>>
>>> nat_policy_ref=bUwFfNPHt40-miQ
>>>
>>>
>>> Could you send the REGISTER message not being accepted?
>>>
>>>
>>> Regards, Jan
>>>
>>>
>>>
>>>
>>> On 30. 09. 20 12:54, Pavithra Mohanraja wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hi Jan,
>>>
>>>
>>> I'm trying to connect linphone to my kamailio ims.
>>>
>>> Only register request is sent from Linphone and no
>>>
>>> acknowledgement  is received. I'm attaching you my
>>>
>>> linphonerc file. Please advise if any correction is
>>>
>>> required in the configuration.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Sep 30, 2020
>>>
>>> at 3:50 PM Jan Rozhon 
>>>
>>> wrote:
>>>
>>>
>>>
>>>
>>>



 Hey, I have no problems with linphone (desktop

 and mobile).


 Could you be more specific on what you set up

 and/or what the communication looks like when

 using linphone?


 Regards, Jan




 Dne 30.09.2020 v 11:55 Pavithra Mohanraja

 napsal(a):






 Hi,


 I am a newbie to sipclient Linphone. I know

 this issue is not related with kamailio.Yet If

 anybody have tried it before , kindly provide

 me with some links or procedures to be

 followed for call registration and

 connectivity with kamailio since in my case,

 request is going but response is not coming

 back resulting in timeout issue.







 This happens only in linphone.If i do the

 samething in PJSIP/zoiper, call

 registration and call establishment happens

 perfectly fine.







 Kindly 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
>>>

Re: [SR-Users] Dialog and DMQ on restart

2020-10-05 Thread Björn Klasen

Hi Henning,

I can't see any differences. When I'm waiting some time f.ex. 30 seconds 
between stop and start, everything work. In debug log only the senden 
host is skipped, as expected.


What is also strange is, that if I kill Kamailio with kill -9  
Kamailio is restarting immediately and all dialogs are also restored.


BR,
Björn

Am 03.10.20 um 20:04 schrieb Henning Westerholt:

Hello Björn,

do you can observe any difference (e.g. with dmq.list_nodes, or on the network) 
in the two working/non-working cases?

Cheers,

Henning


--
Björn Klasen, Specialist
TNG Stadtnetz GmbH, Network Management (VoIP)
Projensdorfer Straße 324
24106 Kiel
Germany

T +49 431/ 530530
F +49 431/ 7097-555
mailto: bkla...@tng.de
http://www.tng.de

Register: Amtsgericht Kiel HRB 6002 KI
Executive board (Geschäftsführung): Dr.-Ing. Volkmar Hausberg,
Sven Schade, Carsten Tolkmit, Dr. Sven Willert
Tax-Id (Steuernr.): 2029047020, VAT-Id (USt-Id): DE225201428


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


Re: [SR-Users] Logging problem

2020-10-05 Thread Jan Rozhon
Hello,

database would be perfect, but the file is ok as well.

Right now, I have accounting in syslog only and I think this is because
they are just transaction logs, ie.

acc_log_request(): ACC: transaction answered:
timestamp=1601877602;method=BYE


I got also some missed calls, but no answered ones.


Thank you, Regards, Jan

On 05. 10. 20 11:09, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> do you want dialog-based cdrs to both database and syslog? Or just to
> database, but you get them in syslog only?
>
> Cheers,
> Daniel
>
> On 04.10.20 11:08, Jan Rozhon wrote:
>>
>> Guys thank you, by trial and error, I got the solution to logging to
>> syslog. On this one particular machine, I also have to add the
>> following line BEFORE the actual definition of local7 output:
>>
>> /etc/rsyslog.conf
>> local7.none /var/log/syslog
>>
>> So I guess, this is not related to kamailio, rather it has something
>> to do with particular rsyslog/systemd version.
>>
>> Where I am stuck, however, is the CDR logging. I went through the acc
>> module documentation and see no reason why it is not logging to
>> database or ignores cdr_facility.
>>
>> My tip is, I am missing something with the flags, but cant find out
>> what it is. That would explain acc messages in syslog (only
>> transaction-based) and empty cdr.log/acc_cdrs table for dialog-based
>> cdrs. In case of default kamailio.cfg (with the dialog module loaded
>> and acc module settings as previously mentioned), do I need to set
>> any special flags to get dialog-based cdrs?
>>
>> Thank you, once again. Regards, Jan
>>
>>
>> Dne 03.10.2020 v 22:31 Joel Serrano napsal(a):
>>> Make sure it’s not systemd who is logging there and not kamailio...
>>>
>>>
>>> On Sat, Oct 3, 2020 at 10:19 Henning Westerholt >> > wrote:
>>>
>>> Hello,
>>>
>>>
>>>
>>> Strange problem. If you tried the obvious stuff already (like
>>> rebooting etc..) I would try with "logger" to reproduce the
>>> problem, to see if its something related to kamailio or the
>>> logging system/machine.
>>>
>>>
>>>
>>> Cheers,
>>>
>>>
>>>
>>> Henning
>>>
>>>
>>>
>>> -- 
>>>
>>> Henning Westerholt – https://skalatan.de/blog/
>>>
>>> Kamailio services – https://gilawa.com
>>>
>>>
>>>
>>> -Original Message-
>>>
>>> From: sr-users >> > On Behalf Of Jan
>>> Rozhon
>>>
>>> Sent: Wednesday, September 30, 2020 9:35 AM
>>>
>>> To: sr-users@lists.kamailio.org 
>>>
>>> Subject: [SR-Users] Logging problem
>>>
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> sorry for quite stupid and newbie questions, but I am out of ideas.
>>>
>>>
>>>
>>> 1. On one of my Debian 10 servers I am unable to stop logging
>>> kamailio messages to /var/log/syslog. It is funny, because I
>>> have 3 more servers where it works but on this one, it doesnt
>>> and no matter what I try it still keeps sending logs to syslog
>>> (and to the file configured).
>>>
>>>
>>>
>>> My related configs:
>>>
>>>
>>>
>>> /etc/kamailio/kamailio.cfg
>>>
>>>
>>>
>>> log_stderror=no
>>>
>>> log_facility=LOG_LOCAL7
>>>
>>>
>>>
>>>
>>>
>>> /etc/rsyslog.conf
>>>
>>>
>>>
>>> local6.*    /var/log/kamailio/cdr.log
>>>
>>> local7.*    /var/log/kamailio/kamailio.log
>>>
>>>
>>>
>>>
>>>
>>> /etc/rsyslog.d/kamailio.conf
>>>
>>>
>>>
>>> if $programname contains 'kamailio' then
>>> /var/log/kamailio/kamailio.log & stop
>>>
>>>
>>>
>>>
>>>
>>> /etc/systemd/system/multi-user.target.wants/kamailio.service
>>>
>>>
>>>
>>> SyslogIdentifier=kamailio
>>>
>>>
>>>
>>>
>>>
>>> 2. It is probably related to 1. I am unable to get the CDRs
>>> logged to anything else but /var/log/syslog. I tried database
>>> (nothing) and setting cdr_facility and again nothing. It just
>>> keeps sending everything to /var/log/syslog.
>>>
>>>
>>>
>>> Related configs:
>>>
>>>
>>>
>>> modparam("acc", "cdr_enable", 1)
>>>
>>> modparam("acc", "cdrs_table", "acc_cdrs") modparam("acc",
>>> "cdr_facility", "LOG_LOCAL6")
>>>
>>>
>>>
>>>
>>>
>>> Example output in syslog file:
>>>
>>>
>>>
>>> Sep 30 09:21:41 sip2 /usr/sbin/kamailio[1151]: NOTICE: {2 21
>>> INVITE ZPZI7Hqytw} acc [acc.c:279]: acc_log_request(): ACC: call
>>> missed:
>>>
>>> 
>>> timestamp=1601450501;method=INVITE;from_tag=1GH5hGQxN;to_tag=QwcYFet;call_id=ZPZI7Hqytw;code=486;reason=Busy
>>>
>>> here;src_user=X;
>>>
>>>
>>>
>>>
>>>
>>> Is there something trivial I am missing?
>>>
>>>
>>>
>>>
>>>
>>> Thank you. Regards, Jan
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ___
>>>
>>> Kamailio (SER) - Users Mailing List
>>>
>>> sr-users@lists.kamailio.org 
>>>
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>> 

Re: [SR-Users] Logging problem

2020-10-05 Thread Daniel-Constantin Mierla
Hello,

do you want dialog-based cdrs to both database and syslog? Or just to
database, but you get them in syslog only?

Cheers,
Daniel

On 04.10.20 11:08, Jan Rozhon wrote:
>
> Guys thank you, by trial and error, I got the solution to logging to
> syslog. On this one particular machine, I also have to add the
> following line BEFORE the actual definition of local7 output:
>
> /etc/rsyslog.conf
> local7.none /var/log/syslog
>
> So I guess, this is not related to kamailio, rather it has something
> to do with particular rsyslog/systemd version.
>
> Where I am stuck, however, is the CDR logging. I went through the acc
> module documentation and see no reason why it is not logging to
> database or ignores cdr_facility.
>
> My tip is, I am missing something with the flags, but cant find out
> what it is. That would explain acc messages in syslog (only
> transaction-based) and empty cdr.log/acc_cdrs table for dialog-based
> cdrs. In case of default kamailio.cfg (with the dialog module loaded
> and acc module settings as previously mentioned), do I need to set any
> special flags to get dialog-based cdrs?
>
> Thank you, once again. Regards, Jan
>
>
> Dne 03.10.2020 v 22:31 Joel Serrano napsal(a):
>> Make sure it’s not systemd who is logging there and not kamailio...
>>
>>
>> On Sat, Oct 3, 2020 at 10:19 Henning Westerholt > > wrote:
>>
>> Hello,
>>
>>
>>
>> Strange problem. If you tried the obvious stuff already (like
>> rebooting etc..) I would try with "logger" to reproduce the
>> problem, to see if its something related to kamailio or the
>> logging system/machine.
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> -- 
>>
>> Henning Westerholt – https://skalatan.de/blog/
>> 
>>
>> Kamailio services – https://gilawa.com 
>>
>>
>>
>> -Original Message-
>>
>> From: sr-users > > On Behalf Of Jan Rozhon
>>
>> Sent: Wednesday, September 30, 2020 9:35 AM
>>
>> To: sr-users@lists.kamailio.org 
>>
>> Subject: [SR-Users] Logging problem
>>
>>
>>
>> Hi,
>>
>>
>>
>> sorry for quite stupid and newbie questions, but I am out of ideas.
>>
>>
>>
>> 1. On one of my Debian 10 servers I am unable to stop logging
>> kamailio messages to /var/log/syslog. It is funny, because I have
>> 3 more servers where it works but on this one, it doesnt and no
>> matter what I try it still keeps sending logs to syslog (and to
>> the file configured).
>>
>>
>>
>> My related configs:
>>
>>
>>
>> /etc/kamailio/kamailio.cfg
>>
>>
>>
>> log_stderror=no
>>
>> log_facility=LOG_LOCAL7
>>
>>
>>
>>
>>
>> /etc/rsyslog.conf
>>
>>
>>
>> local6.*    /var/log/kamailio/cdr.log
>>
>> local7.*    /var/log/kamailio/kamailio.log
>>
>>
>>
>>
>>
>> /etc/rsyslog.d/kamailio.conf
>>
>>
>>
>> if $programname contains 'kamailio' then
>> /var/log/kamailio/kamailio.log & stop
>>
>>
>>
>>
>>
>> /etc/systemd/system/multi-user.target.wants/kamailio.service
>>
>>
>>
>> SyslogIdentifier=kamailio
>>
>>
>>
>>
>>
>> 2. It is probably related to 1. I am unable to get the CDRs
>> logged to anything else but /var/log/syslog. I tried database
>> (nothing) and setting cdr_facility and again nothing. It just
>> keeps sending everything to /var/log/syslog.
>>
>>
>>
>> Related configs:
>>
>>
>>
>> modparam("acc", "cdr_enable", 1)
>>
>> modparam("acc", "cdrs_table", "acc_cdrs") modparam("acc",
>> "cdr_facility", "LOG_LOCAL6")
>>
>>
>>
>>
>>
>> Example output in syslog file:
>>
>>
>>
>> Sep 30 09:21:41 sip2 /usr/sbin/kamailio[1151]: NOTICE: {2 21
>> INVITE ZPZI7Hqytw} acc [acc.c:279]: acc_log_request(): ACC: call
>> missed:
>>
>> 
>> timestamp=1601450501;method=INVITE;from_tag=1GH5hGQxN;to_tag=QwcYFet;call_id=ZPZI7Hqytw;code=486;reason=Busy
>>
>> here;src_user=X;
>>
>>
>>
>>
>>
>> Is there something trivial I am missing?
>>
>>
>>
>>
>>
>> Thank you. Regards, Jan
>>
>>
>>
>>
>>
>>
>>
>> ___
>>
>> 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

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