Re: [SR-Users] t_relay dying ?

2017-12-21 Thread Sergey Safarov
Check that your installation have one NIC with only one default route on
host.
If not check that "mhomed=1" is enabled.

Sergey

пт, 22 дек. 2017 г. в 0:02, Jean Cérien :

>
> Hello
> I am using kamailio 5.0.2, on a debian 9 system.
>
> Everything was running fine, until one of our voip provider changed his
> switch. Our kamailio is relaying between several voip providers and several
> asterisk (only the signalisation, no rtp).
>
> When we get an invite from this new switch, we select an asterisk and
> relay it correctly to this box. However, the OK is relayed back. But when
> the voip providers sends an ACK for this OK, the t_relay function does not
> return at all, it just dies with no action and no error.
>
> Here is the snippet from route(relay)
>
> xlog("L_INFO","route(relay)  @@ $rm - Source: $si:$sp, fu:$fu,
> tu:$tu\n" );
> $var(restrelay)=t_relay();
> xlog("L_INFO","route(relay)  @@ $rm - t_relay result:
> $var(restrelay)" );
> if (!$var(restrelay)) {
>
> When processing the initial invite, I do get both INFO messages. When the
> ACK is processed, I only get one INFO message, and no ACK is relayed - so
> it seems execution dies in the t_relay
>
> What could be wrong ???
>
> J.
>
> Details of the ACK:
>
> ACK sip:dialednumber@kamailioIP:5060 SIP/2.0
> Via: SIP/2.0/UDP VOIPPROVIDERIP:5060;branch=z9hG4bKjq16fi00d85uee181ic0.1
> To: ;tag=as7f10ed48
> From:  >;tag=SD8u3ob01-7dd8efde-0002-00d5--
> Call-ID: SD8u3ob01-688d41f5e2164ceeafe76f40b82b3f97-v300g00030
> CSeq: 1 ACK
> Max-Forwards: 66
> Content-Length: 0
> Route:
> 
>
>
>
> (should you have enough width; the diagram will look ok)
>
>VOIP PROVIDER   KAMAILIO
>ASTERISK
>   21:38:54.685149   │ ──> │
>  │
> ▒   +0.000451   │  100 trying -- your call is │
>  │
> ▒ 21:38:54.685600   │ <── │
>  │
> ▒   +0.84   │ │INVITE (SDP)
>  │
> ▒ 21:38:54.685684   │ │
> ──> │
> ▒   +0.000831   │ │ 100 Trying
>   │
> ▒ 21:38:54.686515   │ │
> <── │
> ▒   +0.000471   │ │200 OK (SDP)
>  │
> ▒ 21:38:54.686986   │ │
> <── │
> ▒   +0.000394   │200 OK (SDP) │
>  │
> ▒ 21:38:54.687380   │ <── │
>  │
> ▒   +0.038694   │ ACK │
>  │
> ▒ 21:38:54.726074   │ ──> │
>  │
> ▒   +0.060155   │ │200 OK (SDP)
>  │
> ▒ 21:38:54.786229   │ │
> <<< │
> ▒   +0.000138   │200 OK (SDP) │
>  │
> ▒ 21:38:54.786367   │ <<< │
>  │
> ▒   +0.005721   │ ACK │
>  │
>
>
> ___
> 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


[SR-Users] t_relay dying ?

2017-12-21 Thread Jean Cérien
Hello
I am using kamailio 5.0.2, on a debian 9 system.

Everything was running fine, until one of our voip provider changed his
switch. Our kamailio is relaying between several voip providers and several
asterisk (only the signalisation, no rtp).

When we get an invite from this new switch, we select an asterisk and relay
it correctly to this box. However, the OK is relayed back. But when the
voip providers sends an ACK for this OK, the t_relay function does not
return at all, it just dies with no action and no error.

Here is the snippet from route(relay)

xlog("L_INFO","route(relay)  @@ $rm - Source: $si:$sp, fu:$fu,
tu:$tu\n" );
$var(restrelay)=t_relay();
xlog("L_INFO","route(relay)  @@ $rm - t_relay result:
$var(restrelay)" );
if (!$var(restrelay)) {

When processing the initial invite, I do get both INFO messages. When the
ACK is processed, I only get one INFO message, and no ACK is relayed - so
it seems execution dies in the t_relay

What could be wrong ???

J.

Details of the ACK:

ACK sip:dialednumber@kamailioIP:5060 SIP/2.0
Via: SIP/2.0/UDP VOIPPROVIDERIP:5060;branch=z9hG4bKjq16fi00d85uee181ic0.1
To: ;tag=as7f10ed48
From: ;tag=SD8u3ob01-7dd8efde-0002-00d5--
Call-ID: SD8u3ob01-688d41f5e2164ceeafe76f40b82b3f97-v300g00030
CSeq: 1 ACK
Max-Forwards: 66
Content-Length: 0
Route:




(should you have enough width; the diagram will look ok)

   VOIP PROVIDER   KAMAILIO
   ASTERISK
  21:38:54.685149   │ ──> │
 │
▒   +0.000451   │  100 trying -- your call is │
 │
▒ 21:38:54.685600   │ <── │
 │
▒   +0.84   │ │INVITE (SDP)
 │
▒ 21:38:54.685684   │ │
──> │
▒   +0.000831   │ │ 100 Trying
│
▒ 21:38:54.686515   │ │
<── │
▒   +0.000471   │ │200 OK (SDP)
 │
▒ 21:38:54.686986   │ │
<── │
▒   +0.000394   │200 OK (SDP) │
 │
▒ 21:38:54.687380   │ <── │
 │
▒   +0.038694   │ ACK │
 │
▒ 21:38:54.726074   │ ──> │
 │
▒   +0.060155   │ │200 OK (SDP)
 │
▒ 21:38:54.786229   │ │
<<< │
▒   +0.000138   │200 OK (SDP) │
 │
▒ 21:38:54.786367   │ <<< │
 │
▒   +0.005721   │ ACK │
 │
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] How to send "bye" to caller when callee abruptly terminates (Connection reset by peer)

2017-12-21 Thread Pranathi Venkatayogi
Hi,
  Currently when callee abruptly closes the connection (TCP RST), Kamailio does 
not send “BYE” to the caller. Caller is left to believe that he is talking to 
the callee.
  What is best way to solve this?

  I have attempted using tcpops module to track connection RSTs and then send 
$dlg_bye in event_route[tcp:reset] .
  In the event_route, I can access only these - $conid , $Ri , $Rp , $si , $sp 
and $proto variable and do not know how to get to the dlg this connection 
belongs.

  Questions: How do I load the dialog associated with this conid? Is there a 
way to enumerate all dialogs?

Thanks in advance,
Pranathi.


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


Re: [SR-Users] Dispatcher module OPTIONS and event routes: how are they handled by core?

2017-12-21 Thread George Diamantopoulos
Hello Daniel,

A URI param doesn't sound bad at all for this purpose, and works like a
charm! I believe the parameter never makes it to the receiving end when
using regular dispatcher functionality, as the R-URI is not rewritten and
only the $du variable is set with this URI, which never appears in the SIP
message anywhere, right? So there's some degree of elegance here as well
:-D.

Thanks again for the workaround, I've been working on this for a while...

Best regards,
George

On 20 December 2017 at 17:26, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> an workaround would be to add a custom parameter to the destination value,
> like sip:1.2.3.4:5060;sid=1. Unknown parameters should be ignored by the
> receiving party. Or if you have only two records with same address, add to
> one ";transport=udp".
>
> Of course, coding in C to make it easier in config would be the elegant
> solution.
>
> Cheers,
> Daniel
>
> On 20.12.17 15:32, George Diamantopoulos wrote:
>
> Hello Daniel,
>
> Thanks for the reply. Unfortunately I can't really use the database
> records to achieve what I want. The example in my previous message didn't
> show this, but I would like to be able to differentiate between the
> following:
>
> ++---+-+---+--+-
> +
> | id | setid | destination | flags | priority |
> attrs   |
> ++---+-+---+--+-
> +
> |  1 | 1 | sip:111.111.11.1:5060   | 8 |0 | socket=udp:
> 44.44.44.1:5060  |
> |  2 |10 | sip:111.111.11.1:5060   | 8 |0 | socket=udp:
> 55.55.55.1:5060  |
> ++---+-+---+--+-
> +
>
> In this case, how can I tell which destination went down? The URI is the
> same, but the sockets differ for each id.
>
> If only $ru is available in these event routes, I can't query the database
> because $ru matches both records. If I can't access the socket used with a
> PV, is there any way to have access to *either* the id *or* the setid for
> the destination for which the event was generated?
>
> Thanks!
>
> BR,
> George
>
> On 20 December 2017 at 10:57, Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> those event routes are executed with a so called faked request (a request
>> generated internally, unrelated to the OPTIONS request sent to the wire),
>> apart of request uri, the rest of values are not related to the dispatcher
>> records.
>>
>> To get access to other attributes of dispatcher records in a straight way
>> in the config, it would require C coding, Anyhow, even now using scripting,
>> you can try with sql queries to database or rpc commands execution via
>> jsonrpcs module and then parse the result using jansson module.
>>
>> Cheers,
>> Daniel
>>
>> On 18.12.17 13:33, George Diamantopoulos wrote:
>>
>> Hello all,
>>
>> I use the dispatcher module extensively for load balancing and fail-over.
>> My kamailio instance is multihomed, and I use the "socket" attribute to
>> determine which socket SIP messages should use for each dispatcher
>> destination, as such:
>>
>> ++---+-+---+--+-
>> +
>> | id | setid | destination | flags | priority |
>> attrs   |
>> ++---+-+---+--+-
>> +
>> |  1 | 0 | sip:192.168.0.1:5060| 8 |0 | socket=udp:
>> 10.10.10.1:5060  |
>> |  2 | 1 | sip:111.111.11.1:5060   | 8 |0 | socket=udp:
>> 44.44.44.1:5060  |
>> |  3 | 1 | sip:222.222.22.2:5060   | 8 |0 | socket=udp:
>> 55.55.55.1:5060  |
>> ++---+-+---+--+-
>> +
>>
>> The dispatcher module uses OPTIONS to probe each destination for
>> availability. When a destination goes down or up, the respective
>> event-route is executed.
>>
>> What I need to do is to be able to "capture" the sending socket used for
>> this probing when a destination becomes unavailable or available in the
>> event-routes. The $fs variable is set, but unfortunately its value does not
>> make sense. Here's an example route and the results that are printed:
>>
>> event_route[dispatcher:dst-down] {
>> xlog("L_ERR", "Destination down: $rm $ru ($du) $ds $fs $Ru
>> $T_req($fs) $T_req($Ru)\n");
>> }
>>
>> Now say destination with id = '2' goes down. This is what I get in the
>> logs for the event_route above:
>>
>> ERROR: 

Re: [SR-Users] strange --dialog in delete state is too old-- log line managing dialog hashes

2017-12-21 Thread Daniel-Constantin Mierla
Hello,

ok, good to know it got fixed.

Cheers,
Daniel


On 21.12.17 15:33, David Escartín wrote:
> hello Daniel
>
>
> sorry about the delay
>
> i applied these 2 patches and the logs disappeared
>
>
> thanks a lot
>
>
> best regards
>
>
> El 14/11/17 a las 08:38, Daniel-Constantin Mierla escribió:
>> Hello,
>>
>>
>> On 14.11.17 08:24, David Escartín wrote:
>>> hello DAniel
>>>
>>> are these the patches you refer to?
>>>
>>>
>>> a3d3ea837b0f4011a3ca0e51ad4a1516bb211299
>>> [5.0_produccion e577807] dialog: parse all headers before getting the
>>> message attributes for dialog
>> this is mainly for topos, but you can take it as well, because is safer
>> with it over all.
>>> 0725f750e1981be8e2058ce1a48e90eb7862e8bd
>>> [5.0_produccion 4ff26d1] dialog: set the end time stamp immediately
>>> after going into deleted state
>> this is the relevant one. There was another one to use a variable for
>> setting the timeout interval, but more for flexibility than fixing the
>> issue itself.
>>
>> Cheers,
>> Daniel
>>
>>> best regards
>>> david
>>>
>>>
>>>
>>> El 13/11/17 a las 09:42, Daniel-Constantin Mierla escribió:
 Hello,

 I pushed two patches to dialog module few days ago, can you try with
 that version (or with those patches backported to your version)?

 Cheers,
 Daniel

 On 09.11.17 18:50, David Escartín wrote:
> hello Daniel
>
> I might think they were not, at least i cannot see dialogs being
> created with the same id and entry hash values in the previous hours
> to the kamailio reset, but i'm not sure. I dont know if maybe they
> could be some "lost" dialogs with more than 2 hours lifetime for some
> strange reason, but i could not check the dailog profile list live
> because i got a "reply too big" output using the kamcmd rpc command.
> I guess i should increase  binrpc_max_body_size ?
>
> I can try to remove traffic from the server and see if after 2
> hours i
> have any remaining dialog. I don't think there would be any because i
> checked generally other times that the number of dialogs go to 0
> after
> a while (2 hours or so) when i remove traffic from a kamailio
> instance. But i can check it anyway.
>
> i will let you know
>
> best regards
> david
>
>
>
> El 08/11/17 a las 08:40, Daniel-Constantin Mierla escribió:
>> Hello,
>>
>>
>> On 08.11.17 07:23, David Escartín wrote:
>>> Hello Daniel
>>>
>>> sorry about that.
>> no worries, it was more for the future to keep a conversation in a
>> single place, if it is not some generic announcement or similar ...
>>> yes, if we make a restart, after a while (not fixed time some times
>>> minutes, some times 2 hours),  we start to see those types of
>>> messages
>> Do you know if all these dialogs were active at the last restart?
>> Or new
>> dialogs after restart expose the same issue?
>>
>> Cheers,
>> Daniel
>>
>>> i attach you the sip messages of the call of the logs in the first
>>> mail
>>> the INVITE receiver is the Kamailio instance.
>>>
>>> thanks a lot and sorry again about the 2 email accounts
>>> david
>>>
>>>
>>> El 07/11/17 a las 18:40, Daniel-Constantin Mierla escribió:
 Hello,

 first: no need to post on both sr-users and sr-dev, it makes it
 hard to
 follow up if people answer on different lists.

 If it is about a stable release, you can use the sr-users, if
 it is
 about devel version, you can use sr-dev. Of course, if it is a
 bug,
 you
 can open an issue on:

   - https://github.com/kamailio/kamailio/issues

 Now, back to the message itself -- have you done a recent restart
 before
 this situation is exposed? Do you capture the traffic in your
 network?
 If yes, can you extract the sip packets for one of these calls and
 send
 them over to me?

 Cheers,
 Daniel


 On 07.11.17 16:30, David Escartín wrote:
> hello all
>
> recently we are seeing some weird messages handling with
> dialogs in
> Kamailio version 5.0
> we sometimes are seeing messages like
> /usr/local/kamailio/sbin/kamailio[15372]: NOTICE: dialog
> [dlg_hash.c:249]: dlg_clean_run(): dialog in delete state is too
> old
> (0x7fa65445c850 ref 3)
> /usr/local/kamailio/sbin/kamailio[15372]: NOTICE: dialog
> [dlg_hash.c:235]: dlg_clean_run(): dialog in early state is
> too old
> (0x7fa652d57110 ref 1)
>
> we increased the debug description adding some lines to the
> dialog
> module code so we could track the calls of the calls that these
> messages belong to, and 

Re: [SR-Users] How to add new user to Kamailio using PHP shell_exec?

2017-12-21 Thread Daniel-Constantin Mierla


On 21.12.17 10:34, Daniel Tryba wrote:
> On Wed, Dec 20, 2017 at 04:45:07PM +0530, Arun NV wrote:
>> There is a requirement to add a new user to *Kamailio* programmatically
>> using *PHP*. I tried to add username and password to *subscriber* table
>> manually using *SQL* queries, but it won't works because *ha1* and
>> *ha1b* should
>> be added to the table. I don't know how Kamailio generate *ha1* and *ha1b*.
> ha1 and ha1b aren't needed. But you question has been asked in the past
> and even been answered:
> https://lists.kamailio.org/pipermail/sr-users/2010-May/063982.html
>
>
Siremis has the code to get ha1 and ha1b in PHP:

  -
https://github.com/asipto/siremis/blob/master/siremis/modules/sipadmin/sbs/authdb/do/SubscriberDO.php

The keys of recArr should be self explanatory, however, if the realm is
not the same as domain, then repalce the domain field with realm value.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


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


Re: [SR-Users] strange --dialog in delete state is too old-- log line managing dialog hashes

2017-12-21 Thread David Escartín

hello Daniel


sorry about the delay

i applied these 2 patches and the logs disappeared


thanks a lot


best regards


El 14/11/17 a las 08:38, Daniel-Constantin Mierla escribió:

Hello,


On 14.11.17 08:24, David Escartín wrote:

hello DAniel

are these the patches you refer to?


a3d3ea837b0f4011a3ca0e51ad4a1516bb211299
[5.0_produccion e577807] dialog: parse all headers before getting the
message attributes for dialog

this is mainly for topos, but you can take it as well, because is safer
with it over all.

0725f750e1981be8e2058ce1a48e90eb7862e8bd
[5.0_produccion 4ff26d1] dialog: set the end time stamp immediately
after going into deleted state

this is the relevant one. There was another one to use a variable for
setting the timeout interval, but more for flexibility than fixing the
issue itself.

Cheers,
Daniel


best regards
david



El 13/11/17 a las 09:42, Daniel-Constantin Mierla escribió:

Hello,

I pushed two patches to dialog module few days ago, can you try with
that version (or with those patches backported to your version)?

Cheers,
Daniel

On 09.11.17 18:50, David Escartín wrote:

hello Daniel

I might think they were not, at least i cannot see dialogs being
created with the same id and entry hash values in the previous hours
to the kamailio reset, but i'm not sure. I dont know if maybe they
could be some "lost" dialogs with more than 2 hours lifetime for some
strange reason, but i could not check the dailog profile list live
because i got a "reply too big" output using the kamcmd rpc command.
I guess i should increase  binrpc_max_body_size ?

I can try to remove traffic from the server and see if after 2 hours i
have any remaining dialog. I don't think there would be any because i
checked generally other times that the number of dialogs go to 0 after
a while (2 hours or so) when i remove traffic from a kamailio
instance. But i can check it anyway.

i will let you know

best regards
david



El 08/11/17 a las 08:40, Daniel-Constantin Mierla escribió:

Hello,


On 08.11.17 07:23, David Escartín wrote:

Hello Daniel

sorry about that.

no worries, it was more for the future to keep a conversation in a
single place, if it is not some generic announcement or similar ...

yes, if we make a restart, after a while (not fixed time some times
minutes, some times 2 hours),  we start to see those types of
messages

Do you know if all these dialogs were active at the last restart?
Or new
dialogs after restart expose the same issue?

Cheers,
Daniel


i attach you the sip messages of the call of the logs in the first
mail
the INVITE receiver is the Kamailio instance.

thanks a lot and sorry again about the 2 email accounts
david


El 07/11/17 a las 18:40, Daniel-Constantin Mierla escribió:

Hello,

first: no need to post on both sr-users and sr-dev, it makes it
hard to
follow up if people answer on different lists.

If it is about a stable release, you can use the sr-users, if it is
about devel version, you can use sr-dev. Of course, if it is a bug,
you
can open an issue on:

  - https://github.com/kamailio/kamailio/issues

Now, back to the message itself -- have you done a recent restart
before
this situation is exposed? Do you capture the traffic in your
network?
If yes, can you extract the sip packets for one of these calls and
send
them over to me?

Cheers,
Daniel


On 07.11.17 16:30, David Escartín wrote:

hello all

recently we are seeing some weird messages handling with dialogs in
Kamailio version 5.0
we sometimes are seeing messages like
/usr/local/kamailio/sbin/kamailio[15372]: NOTICE: dialog
[dlg_hash.c:249]: dlg_clean_run(): dialog in delete state is too
old
(0x7fa65445c850 ref 3)
/usr/local/kamailio/sbin/kamailio[15372]: NOTICE: dialog
[dlg_hash.c:235]: dlg_clean_run(): dialog in early state is too old
(0x7fa652d57110 ref 1)

we increased the debug description adding some lines to the dialog
module code so we could track the calls of the calls that these
messages belong to, and we could see that those messages
appeared in
calls just released at that moment, for example:

<134>Nov  4 11:21:38 localhost
/usr/local/kamailio/sbin/kamailio[4108]: INFO: mad-localhost-1 Call
97980 / Call-ID 1409565771_82382809@195.219.240.46: Creating dialog
[8043:21772] with hash id 21772 and hash entry 8043
<134>Nov  4 11:21:38 localhost
/usr/local/kamailio/sbin/kamailio[4106]: INFO: mad-localhost-1 Call
97980 / Call-ID 1409565771_82382809@195.219.240.46: Status 100,
6610
<134>Nov  4 11:21:39 localhost
/usr/local/kamailio/sbin/kamailio[4111]: INFO: mad-localhost-1 Call
97980 / Call-ID 1409565771_82382809@195.219.240.46: CANCEL
received in
A-Leg, relaying downstream
<134>Nov  4 11:21:39 localhost
/usr/local/kamailio/sbin/kamailio[4112]: INFO: mad-localhost-1 Call
97980 / Call-ID 1409565771_82382809@195.219.240.46: Status 487,
6610
<133>Nov  4 11:21:39 localhost
/usr/local/kamailio/sbin/kamailio[4139]: NOTICE: dialog
[dlg_hash.c:251]: dlg_clean_run(): dialog in delete state is too
old
(0x7fa0c02a6870 ref 3) 

Re: [SR-Users] How to add new user to Kamailio using PHP shell_exec?

2017-12-21 Thread Daniel Tryba
On Wed, Dec 20, 2017 at 04:45:07PM +0530, Arun NV wrote:
> There is a requirement to add a new user to *Kamailio* programmatically
> using *PHP*. I tried to add username and password to *subscriber* table
> manually using *SQL* queries, but it won't works because *ha1* and
> *ha1b* should
> be added to the table. I don't know how Kamailio generate *ha1* and *ha1b*.

ha1 and ha1b aren't needed. But you question has been asked in the past
and even been answered:
https://lists.kamailio.org/pipermail/sr-users/2010-May/063982.html

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


Re: [SR-Users] Kamailio-IMS VM image issue

2017-12-21 Thread ponnam.g...@wipro.com
Hi Franz,


This error is now resolved, we had to modify IP in DiameterPeerHss.xml after 
that error is not seen.

hss.sh script is running without any errors, could see following message


de.fhg.fokus.hss.main.TomcatServer - startTomcat WebConsole of FHoSS was 
started !


ICSCF is also working fine.

however still we are facing couple of issues

  1.  we are unable to access console (10.200..8.171:8080), not sure what could 
be the issue here.
  2.  could not start PCSCF , following are the error messages


 0(1337) ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver 
error: Access denied for user 'pcscf'@'pcscf.net1.test' (using password: YES)
 0(1337) ERROR:  [db.c:318]: db_do_init2(): could not add connection to 
the pool 0(1337) ERROR: ims_usrloc_pcscf [usrloc_db.c:79]: init_db(): unable to 
connect to the database
 0(1337) ERROR: ims_usrloc_pcscf [ul_mod.c:203]: mod_init(): Error initializing 
db connection
 0(1337) ERROR:  [sr_module.c:962]: init_mod(): Error while initializing 
module ims_usrloc_pcscf (/usr/local/lib64/kamailio/modules/ims_usrloc_pcscf.so)
ERROR: error while initializing modules




could you please help?



Regards,

Raghu





From: Ponnam Raghavender Goud (NEPC)
Sent: Wednesday, December 20, 2017 4:19:52 PM
To: Franz Edler; 'Kranti Kumar'; 'Kamailio (SER) - Users Mailing List'
Cc: 'raghavender goud'
Subject: Re: Kamailio-IMS VM image issue


HI Franz,


I have checked port status using following command and it returned no output


root@server:~# netstat -lptu | grep -i 8080
root@server:~# netstat -lptu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State   
PID/Program name
tcp0  0 *:sunrpc*:* LISTEN  
401/rpcbind
tcp0  0 *:55285 *:* LISTEN  
410/rpc.statd
tcp0  0 *:ssh   *:* LISTEN  
427/sshd
tcp0  0 localhost:smtp  *:* LISTEN  
1244/exim4
tcp0  0 localhost:6010  *:* LISTEN  
1453/1
tcp0  0 *:mysql *:* LISTEN  
891/mysqld
tcp6   0  0 [::]:sunrpc [::]:*  LISTEN  
401/rpcbind
tcp6   0  0 [::]:ssh[::]:*  LISTEN  
427/sshd
tcp6   0  0 ::1:smtp[::]:*  LISTEN  
1244/exim4
tcp6   0  0 ::1:6010[::]:*  LISTEN  
1453/1
tcp6   0  0 [::]:35432  [::]:*  LISTEN  
410/rpc.statd
udp0  0 *:1000  *:* 
401/rpcbind
udp0  0 localhost:1010  *:* 
410/rpc.statd
udp0  0 *:bootpc*:* 
368/dhclient
udp0  0 *:sunrpc*:* 
401/rpcbind
udp0  0 server.net1.test:ntp*:* 
946/ntpd
udp0  0 localhost:ntp   *:* 
946/ntpd
udp0  0 *:ntp   *:* 
946/ntpd
udp0  0 *:53944 *:* 
410/rpc.statd
udp0  0 *:32019 *:* 
368/dhclient
udp6   0  0 [::]:1000   [::]:*  
401/rpcbind
udp6   0  0 [::]:15924  [::]:*  
368/dhclient
udp6   0  0 [::]:sunrpc [::]:*  
401/rpcbind
udp6   0  0 fe80::f816:3eff:fe2:ntp [::]:*  
946/ntpd
udp6   0  0 ::1:ntp [::]:*  
946/ntpd
udp6   0  0 [::]:ntp[::]:*  
946/ntpd
udp6   0  0 [::]:44928  [::]:*  
410/rpc.statd





Regards,

Raghu


From: Franz Edler 
Sent: Wednesday, December 20, 2017 2:17:05 PM
To: Ponnam Raghavender Goud (NEPC); 'Kranti Kumar'; 'Kamailio (SER) - Users 
Mailing List'
Cc: 'raghavender goud'
Subject: AW: Kamailio-IMS VM image issue


** This mail has been sent from an external source. Treat hyperlinks and 
attachments in this email with caution**

But the error log „Cannot assign requested address:8080” says different.

There must be a process which already uses port 8080. Check with a proper Linux 
command.



Franz



Von: ponnam.g...@wipro.com [mailto:ponnam.g...@wipro.com]
Gesendet: Mittwoch, 20. Dezember 2017 08:51
An: 'Franz Edler' ; 'Kranti Kumar' 

[SR-Users] Cnxcc doesn't update amount values in redis

2017-12-21 Thread Donat Zenichev
Hi community.

Have a problem with cnxcc call monitoring.
__set_max_credit() allocates new call as expected:

"DEBUG: cnxcc [cnxcc_mod.c:444]: __dialog_created_callback(): Flag is not
set for this message. Ignoring
DEBUG: cnxcc [cnxcc_mod.c:1569]: __set_max_credit(): Setting up new call
for client [2], max-credit[0.10], cost-per-sec[0.01], initial-pulse
[6], final-pulse [6],
call-id[2f77fd103d0bfa28718d896876b37...@b2b.user.agent:50600]
DEBUG: cnxcc [cnxcc_mod.c:1470]: set_ctrl_flag(): Flag set!
DEBUG: cnxcc [cnxcc_redis.c:313]: redis_get_int(): Got INT value:
concurrent_calls=0i
DEBUG: cnxcc [cnxcc_redis.c:68]: redis_get_or_create_credit_data():
credit_data with ID=[2] DOES NOT exist in the cluster, creating it...
DEBUG: cnxcc [cnxcc_redis.c:92]: redis_insert_credit_data(): Inserting
credit_data_t using ID [2]
DEBUG: cnxcc [cnxcc_mod.c:1125]: __get_or_create_credit_data_entry():
Credit entry didn't exist. Allocated new entry [0x7f17668f6d70]
DEBUG: cnxcc [cnxcc_mod.c:1255]: __alloc_new_call_by_money(): New call
allocated for client [2]".

So that I can see values inside redis:
redis.callision.info:6389> HGETALL cnxcc:money:2
 1) "concurrent_calls"
 2) "0"
 3) "consumed_amount"
 4) "0.00"
 5) "ended_calls_consumed_amount"
 6) "0.00"
 7) "max_amount"
 8) "0.00"
 9) "number_of_calls"
10) "1"
11) "type"
12) "1"


But cnxcc doesn't update credit amount during the call.

modparam("debugger", "mod_level", "cnxcc=4") but there are no rows in
kamailio log like:

"DEBUG: cnxcc [cnxcc_check.c:94]: check_calls_by_money(): ec=0.00,
ca=0.60, ca2=0.60
DEBUG: cnxcc [cnxcc_check.c:107]: check_calls_by_money(): Client
[some_client] | Ended-Calls-Credit-Spent: 0.00  TotalCredit/MaxCredit:
0.60/3.00".

cnxcc parameters:
modparam("cnxcc", "dlg_flag", FLG_DLG)
modparam("cnxcc", "redis", "addr=redis.youwillnever.find;port=6389;db=0")
modparam("cnxcc", "credit_check_period", 1)

function that performs credit setup:
if
(!cnxcc_set_max_credit("$var(setid)","$var(credit)","$var(cost_per_sec)","$var(i_pulse)","$var(f_pulse)"))
{
xlog("L_WARN", "- cnxcc: $fU - Error setting up credit
control - R=$ru ID=$ci\n");
sl_send_reply("402", "Payment Required");
}




Why is it so? And as see, all values are set zero. Seems to be problem with
redis inserts.
Any ideas are highly appreciated. Thanks.





-- 
-- 
BR, Donat Zenichev
Wnet VoIP team
Tel Ukraine:  +380(44) 5-900-800
Tel USA: +164(67) 8-174-17
https://w-net.us/ 
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio-IMS VM image issue

2017-12-21 Thread ponnam.g...@wipro.com
HI Franz,


I have checked port status using following command and it returned no output


root@server:~# netstat -lptu | grep -i 8080
root@server:~# netstat -lptu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State   
PID/Program name
tcp0  0 *:sunrpc*:* LISTEN  
401/rpcbind
tcp0  0 *:55285 *:* LISTEN  
410/rpc.statd
tcp0  0 *:ssh   *:* LISTEN  
427/sshd
tcp0  0 localhost:smtp  *:* LISTEN  
1244/exim4
tcp0  0 localhost:6010  *:* LISTEN  
1453/1
tcp0  0 *:mysql *:* LISTEN  
891/mysqld
tcp6   0  0 [::]:sunrpc [::]:*  LISTEN  
401/rpcbind
tcp6   0  0 [::]:ssh[::]:*  LISTEN  
427/sshd
tcp6   0  0 ::1:smtp[::]:*  LISTEN  
1244/exim4
tcp6   0  0 ::1:6010[::]:*  LISTEN  
1453/1
tcp6   0  0 [::]:35432  [::]:*  LISTEN  
410/rpc.statd
udp0  0 *:1000  *:* 
401/rpcbind
udp0  0 localhost:1010  *:* 
410/rpc.statd
udp0  0 *:bootpc*:* 
368/dhclient
udp0  0 *:sunrpc*:* 
401/rpcbind
udp0  0 server.net1.test:ntp*:* 
946/ntpd
udp0  0 localhost:ntp   *:* 
946/ntpd
udp0  0 *:ntp   *:* 
946/ntpd
udp0  0 *:53944 *:* 
410/rpc.statd
udp0  0 *:32019 *:* 
368/dhclient
udp6   0  0 [::]:1000   [::]:*  
401/rpcbind
udp6   0  0 [::]:15924  [::]:*  
368/dhclient
udp6   0  0 [::]:sunrpc [::]:*  
401/rpcbind
udp6   0  0 fe80::f816:3eff:fe2:ntp [::]:*  
946/ntpd
udp6   0  0 ::1:ntp [::]:*  
946/ntpd
udp6   0  0 [::]:ntp[::]:*  
946/ntpd
udp6   0  0 [::]:44928  [::]:*  
410/rpc.statd





Regards,

Raghu


From: Franz Edler 
Sent: Wednesday, December 20, 2017 2:17:05 PM
To: Ponnam Raghavender Goud (NEPC); 'Kranti Kumar'; 'Kamailio (SER) - Users 
Mailing List'
Cc: 'raghavender goud'
Subject: AW: Kamailio-IMS VM image issue


** This mail has been sent from an external source. Treat hyperlinks and 
attachments in this email with caution**

But the error log „Cannot assign requested address:8080” says different.

There must be a process which already uses port 8080. Check with a proper Linux 
command.



Franz



Von: ponnam.g...@wipro.com [mailto:ponnam.g...@wipro.com]
Gesendet: Mittwoch, 20. Dezember 2017 08:51
An: 'Franz Edler' ; 'Kranti Kumar' 
; 'Kamailio (SER) - Users Mailing List' 

Cc: 'raghavender goud' 
Betreff: RE: Kamailio-IMS VM image issue



Hi Franz,



Thank you so much for the reply.



We have verified mysql db permissions, could not find issue with access 
permissions. Following is the output on console when we try to execute hss.sh 
script



root@server:~# ./hss.sh

Building Classpath

Classpath is 
lib/xml-apis.jar:lib/xercesImpl.jar:lib/xerces-2.4.0.jar:lib/xalan-2.4.0.jar:lib/tomcat-util.jar:lib/tomcat-http.jar:lib/tomcat-coyote.jar:lib/struts.jar:lib/servlets-default.jar:lib/servlet-api.jar:lib/naming-resources.jar:lib/naming-factory.jar:lib/mysql-connector-java-3.1.12-bin.jar:lib/mx4j-3.0.1.jar:lib/log4j.jar:lib/junit.jar:lib/junitee.jar:lib/jta.jar:lib/jsp-api.jar:lib/jmx.jar:lib/jdp.jar:lib/jasper-runtime.jar:lib/jasper-compiler-jdt.jar:lib/jasper-compiler.jar:lib/hibernate3.jar:lib/FHoSS.jar:lib/ehcache-1.1.jar:lib/dom4j-1.6.1.jar:lib/commons-validator.jar:lib/commons-modeler.jar:lib/commons-logging.jar:lib/commons-logging-1.0.4.jar:lib/commons-lang.jar:lib/commons-fileupload.jar:lib/commons-el.jar:lib/commons-digester.jar:lib/commons-collections-3.1.jar:lib/commons-beanutils.jar:lib/cglib-2.1.3.jar:lib/catalina-optional.jar:lib/catalina.jar:lib/c3p0-0.9.1.jar:lib/base64.jar:lib/asm.jar:lib/asm-attrs.jar:lib/antlr-2.7.6.jar::log4j.properties:..

2017-12-20 08:15:58,551 

[SR-Users] How to add new user to Kamailio using PHP shell_exec?

2017-12-21 Thread Arun NV
There is a requirement to add a new user to *Kamailio* programmatically
using *PHP*. I tried to add username and password to *subscriber* table
manually using *SQL* queries, but it won't works because *ha1* and
*ha1b* should
be added to the table. I don't know how Kamailio generate *ha1* and *ha1b*.
Following are the manually added entries using *kamctl* tool.

mysql> select * from subscriber limit 2;
++--+---+--+---+--+--+--+
| id | username | domain| password | email_address | ha1
   | ha1b | rpid |
++--+---+--+---+--+--+--+
|  9 | 1010101  | 10.101.101.10 | aswwwsdf |   |
a37d1785953310c206481ca1a33f16b6 | 7e981130f05a547a738d3c29031e89d0 |
NULL |
| 10 | 1010102  | 10.101.101.10 | 6ee8a72  |   |
6b574f9047206481ca1a33501d7dbdce | cd9a8b89d926f3cb1290311a8cb8a2a8 |
NULL |
++--+---+--+---+--+--+--+

Then I tried with *shell_exec* function in *PHP* to use *kamctl*
command(*kamctl
add username password*). but it will prompt for *Kamailio* read-write
user's password. So following command cannot add new users to Kamailio

$res = shell_exec("sudo kamctl add new_username new_password);

so, please suggest a way to add new user's to *Kamailio* programmatically.


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] R: 4.4.4 CPU 100%

2017-12-21 Thread Tomas Zanet
Hello, I found the issue which was due to a misconfiguration of kamalio.
I forgot to set open_files_limit value which was set to default values 1024, 
not enough for our installation.
Increasing it, now everything works fine.

Maybe this could help anyone who use TLS connections.

BR.

T.



Tomas Zanet
R Software designer
tza...@came.com
CAME S.p.A.

-Messaggio originale-
Da: sr-users [mailto:sr-users-boun...@lists.kamailio.org] Per conto di Tomas 
Zanet
Inviato: venerdì 15 dicembre 2017 15:11
A: Kamailio (SER) - Users Mailing List 
Oggetto: [SR-Users] 4.4.4 CPU 100%

Hi all, I’ve been using Kamailio 4.4.4 for 8 months without any problems but in 
recent days, I’m having some issues with our server and, when it happens, it 
cannot get new registrations.
Using top I saw a kamailio process is eating all CPU.

  PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND
 1556 kamailio  20   0 1010884  27624  24520 R  98.5  1.4 150:07.59 kamailio

I got backtrace attaching to Kamailio with gdb. Here is the backtrace:

#0  0x7fb996992d6d in accept () at ../sysdeps/unix/syscall-template.S:81
#1  0x005f3615 in handle_new_connect (si=0x7fb9960b4fa8) at 
tcp_main.c:3894
#2  0x005f7029 in handle_io (fm=0x7fb9961da520, ev=1, idx=-1) at 
tcp_main.c:4199
#3  0x005c68b2 in io_wait_loop_epoll (h=0xa1fdc0 , t=5, repeat=0) 
at io_wait.h:1065
#4  0x005fa04a in tcp_main_loop () at tcp_main.c:4490
#5  0x004b48ba in main_loop () at main.c:1712
#6  0x004bad12 in main (argc=13, argv=0x7ffd14247c18) at main.c:2631
(gdb) bt

At the moment I found the issue, there were 862 sip client registered correctly.
Our server is configured to use only TLS and mysql as backend.

/usr/local/sbin/kamailio -v
version: kamailio 4.4.4 (x86_64/linux) 852c47
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, 
USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, 
TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, 
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES 
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: 
poll, epoll_lt, epoll_et, sigio_rt, select.
id: 852c47
compiled on 15:56:18 Dec 15 2016 with gcc 4.8.4

Can anyone address me to find out why this happens?

Many thanks,
T.


Tomas Zanet
R Software designer
tza...@came.com
CAME S.p.A.

___
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