Re: [SR-Users] evapi_async + python3 KEMI

2019-03-05 Thread Daniel-Constantin Mierla
Hello,

better use KSR.tm.t_newtran() instead of KSR.tmx.t_suspend() and then
KSR.evapi.async_relay(...)

It should also work only with:

if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label_n)")))

See:

  * https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#t_name

Using $T(id_label_n) forces to create the transaction, if it doesn't exist.

Cheers,
Daniel

On 04.03.19 17:21, Alexandru Covalschi wrote:
> UPD:
> Such construction seems to work
>         if KSR.tmx.t_suspend():
>             KSR.evapi.relay(str(KSR.pv.get("$T(id_label)")));
> However I'm wondering if there could be any issues using it like that?
> I know that evapi.relay is non-blocking, however - are all variables
> accessible in that way?
>
> I'm using 5.2 from debian:stretch stable repo in a docker container.
> 
> Regards,
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +380 97 24 75445
>
>> 4 марта 2019 г., в 16:30, Alexandru Covalschi <568...@gmail.com
>> > написал(а):
>>
>> Hello list,
>>
>> I'm trying to use async evapi with app_python3 KEMI, but I don't know
>> how to get t_suspend variables. 
>> What am I doing is connecting to evapi via telnet and making a call,
>> which successfully reaches that point:
>>         if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label)"))):
>>             KSR.xlog.xinfo("processing suspended in transaction [" +
>> str(KSR.pv.get("$T(id_index)")) + ":" +
>> str(KSR.pv.get("$T(id_label)")) +"]\n");
>>
>> I have the id_label in the log, but in telnet I have None. 
>> How can I get transaction index and label transferred using python3
>> KEMI? 
>> Shall I use KSR.x.modf (in that case I'm losing almost all KEMI
>> benefits)?..
>>
>> 
>> Regards,
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +380 97 24 75445
>>
>
>
> ___
> 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
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

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


Re: [SR-Users] evapi_async + python3 KEMI

2019-03-05 Thread Alexandru Covalschi
Thanks!


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +380 97 24 75445

> 5 марта 2019 г., в 9:00, Daniel-Constantin Mierla  
> написал(а):
> 
> Hello,
> 
> better use KSR.tm.t_newtran() instead of KSR.tmx.t_suspend() and then 
> KSR.evapi.async_relay(...)
> 
> It should also work only with:
> 
> if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label_n)")))
> 
> See:
> 
>   * https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#t_name 
> 
> Using $T(id_label_n) forces to create the transaction, if it doesn't exist.
> 
> Cheers,
> Daniel
> 
> On 04.03.19 17:21, Alexandru Covalschi wrote:
>> UPD:
>> Such construction seems to work
>> if KSR.tmx.t_suspend():
>> KSR.evapi.relay(str(KSR.pv.get("$T(id_label)")));
>> However I'm wondering if there could be any issues using it like that? I 
>> know that evapi.relay is non-blocking, however - are all variables 
>> accessible in that way?
>> 
>> I'm using 5.2 from debian:stretch stable repo in a docker container.
>> 
>> Regards,
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +380 97 24 75445
>> 
>>> 4 марта 2019 г., в 16:30, Alexandru Covalschi <568...@gmail.com 
>>> > написал(а):
>>> 
>>> Hello list,
>>> 
>>> I'm trying to use async evapi with app_python3 KEMI, but I don't know how 
>>> to get t_suspend variables. 
>>> What am I doing is connecting to evapi via telnet and making a call, which 
>>> successfully reaches that point:
>>> if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label)"))):
>>> KSR.xlog.xinfo("processing suspended in transaction [" + 
>>> str(KSR.pv.get("$T(id_index)")) + ":" + str(KSR.pv.get("$T(id_label)")) 
>>> +"]\n");
>>> 
>>> I have the id_label in the log, but in telnet I have None. 
>>> How can I get transaction index and label transferred using python3 KEMI? 
>>> Shall I use KSR.x.modf (in that case I'm losing almost all KEMI benefits)?..
>>> 
>>> 
>>> Regards,
>>> Alexandru Covalschi
>>> VoIP Engineer and System Administrator
>>> tel: +380 97 24 75445
>>> 
>> 
>> 
>> 
>> ___
>> 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 
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com 
> 
> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
> www.asipto.com 
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] it's auth module send clear text password?

2019-03-05 Thread PICCORO McKAY Lenz
thanks for aswer Federico, another, if the communication beetween asterisk
and kamailio are using public ip, that password are easyl hackaeable?


i read rfc2617 but does are not clear respect security and seems SIP is not
an easy protocol to secure due relationship beetween both are trusted or
something similar?

El mar., 5 de mar. de 2019 a la(s) 03:08, Federico Cabiddu (
federico.cabi...@gmail.com) escribió:

> Hi,
> auth module implement digest authentication (rfc2617) so passwords are not
> sent in clear from the client to kamailio.
>
> Federico
>
> On Tue, Mar 5, 2019 at 7:07 AM PICCORO McKAY Lenz 
> wrote:
>
>> if kamailio doe snot use TLS all the mechanish in atuh module are send
>> the pasword nude to the network?
>>
>> Lenz McKAY Gerardo (PICCORO)
>> http://qgqlochekone.blogspot.com
>> ___
>> 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] it's auth module send clear text password?

2019-03-05 Thread Giovanni Maruzzelli
On Tue, Mar 5, 2019 at 1:12 PM PICCORO McKAY Lenz 
wrote:

> thanks for aswer Federico, another, if the communication beetween asterisk
> and kamailio are using public ip, that password are easyl hackaeable?
>
>
yes, they are hackable, exactly like HTTP passwords. Easily, that depends
who the hackers are.

Actually, the method used for password exchange is exactly the same as in
http (nonce + md5).

If you use long enough passwords, is probably almost ok, if you can cope
with the breach that can happen (eg: limit the expenses toward your ITSP
gateway, with a cap, or prepaid).

If you are thinking about privacy, then password are completely useless
with "normal" SIP: both signaling (who you call) and media (the sound of
the conversation) are in clear, and can be listened by anyone (no password
needed).

For real security (and privacy, etc) go for TLS and SRTP (ZRTP being the
uber good).

-giovanni



>
> i read rfc2617 but does are not clear respect security and seems SIP is
> not an easy protocol to secure due relationship beetween both are trusted
> or something similar?
>
> El mar., 5 de mar. de 2019 a la(s) 03:08, Federico Cabiddu (
> federico.cabi...@gmail.com) escribió:
>
>> Hi,
>> auth module implement digest authentication (rfc2617) so passwords are
>> not sent in clear from the client to kamailio.
>>
>> Federico
>>
>> On Tue, Mar 5, 2019 at 7:07 AM PICCORO McKAY Lenz 
>> wrote:
>>
>>> if kamailio doe snot use TLS all the mechanish in atuh module are send
>>> the pasword nude to the network?
>>>
>>> Lenz McKAY Gerardo (PICCORO)
>>> http://qgqlochekone.blogspot.com
>>> ___
>>> 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
>


-- 
Sincerely,

Giovanni Maruzzelli
OpenTelecom.IT
cell: +39 347 266 56 18
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamctl / kamcmd

2019-03-05 Thread Daniel W. Graham
Version 5.1.7

I saw a post talking about the grant issues on database creation, using an 
existing database in this case.

-dan

On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla 
mailto:mico...@gmail.com>> wrote:


What version of kamailio are you using? Iirc, there were some updates to kamctl 
or kamdbctl related to latest mysql version, but if I am not wrong, they were 
about granting access, not executing queries.

Cheers,
Daniel

On 05.03.19 05:54, Daniel W. Graham wrote:
Are there any known compatibility issues with kamctl and mysql 8.0.x?

Getting access denied when executing kamctl command. Kamcmd just hangs when 
executed.

Kamctlrc is setup proper and connection can be made direct from shell to 
database using the same credentials.

-dan



___
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
Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] it's auth module send clear text password?

2019-03-05 Thread PICCORO McKAY Lenz
El mar., 5 de mar. de 2019 a la(s) 09:33, Giovanni Maruzzelli (@
gmail.com) escribió:

> On Tue, Mar 5, 2019 at 1:12 PM PICCORO McKAY Lenz 
> wrote:
>
>> thanks for aswer Federico, another, if the communication beetween
>> asterisk and kamailio are using public ip, that password are easyl
>> hackaeable?
>>
> yes, they are hackable, exactly like HTTP passwords. Easily, that depends
> who the hackers are.
>

umm like that so then sound and any other stream beetween two right?


> For real security (and privacy, etc) go for TLS and SRTP (ZRTP being the
> uber good).
>
TLS implementation are knowed, but some documentations and ruting examples
for SRTP case?

very very thanks Giovanni Maruzzelli


>
> -giovanni
>
>
>
>>
>> i read rfc2617 but does are not clear respect security and seems SIP is
>> not an easy protocol to secure due relationship beetween both are trusted
>> or something similar?
>>
>> El mar., 5 de mar. de 2019 a la(s) 03:08, Federico Cabiddu (
>> federico.cabi...@gmail.com) escribió:
>>
>>> Hi,
>>> auth module implement digest authentication (rfc2617) so passwords are
>>> not sent in clear from the client to kamailio.
>>>
>>> Federico
>>>
>>> On Tue, Mar 5, 2019 at 7:07 AM PICCORO McKAY Lenz <
>>> mckaygerh...@gmail.com> wrote:
>>>
 if kamailio doe snot use TLS all the mechanish in atuh module are send
 the pasword nude to the network?

 Lenz McKAY Gerardo (PICCORO)
 http://qgqlochekone.blogspot.com
 ___
 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
>>
>
>
> --
> Sincerely,
>
> Giovanni Maruzzelli
> OpenTelecom.IT
> cell: +39 347 266 56 18
>
> ___
> 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] Kamctl / kamcmd

2019-03-05 Thread Daniel-Constantin Mierla
Then run with -x as suggested in another response on the mailing list,
maybe you can get some hints there. Otherwise, kamctl is just using
mysql tool for sending commands, is not implementing any mysql client
itself.

kamcmd doesn't do anything with mysql, it is just a binrpc client
interacting with ctl module in kamailio.

Cheers,
Daniel

On 05.03.19 15:15, Daniel W. Graham wrote:
> Version 5.1.7
>
> I saw a post talking about the grant issues on database creation,
> using an existing database in this case.
>
> -dan
>
> On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
>> What version of kamailio are you using? Iirc, there were some updates
>> to kamctl or kamdbctl related to latest mysql version, but if I am
>> not wrong, they were about granting access, not executing queries.
>>
>> Cheers,
>> Daniel
>>
>> On 05.03.19 05:54, Daniel W. Graham wrote:
>>>
>>> Are there any known compatibility issues with kamctl and mysql 8.0.x?
>>>
>>>  
>>>
>>> Getting access denied when executing kamctl command. Kamcmd just
>>> hangs when executed.
>>>
>>>  
>>>
>>> Kamctlrc is setup proper and connection can be made direct from
>>> shell to database using the same credentials.
>>>
>>>  
>>>
>>> -dan
>>>
>>>
>>> ___
>>> 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
>> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
>> www.asipto.com

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

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


[SR-Users] Selects and KEMI

2019-03-05 Thread Alexandru Covalschi
Is there any way to use selects in KEMI? I understand it's syntax sugar, but 
maybe there's a workaround.


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +380 97 24 75445

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


Re: [SR-Users] Kamctl / kamcmd

2019-03-05 Thread Daniel W. Graham
-x didnt yield anything.

I checked the source of kamctl -

$MYSQL $2 -h $DBHOST -u $DBRWUSER "-p$DBRWPW" $DBNAME

The issue is due to special characters in the password being interpreted by the 
shell due to the double quotes around "-p$DBRWPW".

-dan

From: Daniel-Constantin Mierla 
Sent: Tuesday, March 5, 2019 10:07 AM
To: Daniel W. Graham 
Cc: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Kamctl / kamcmd


Then run with -x as suggested in another response on the mailing list, maybe 
you can get some hints there. Otherwise, kamctl is just using mysql tool for 
sending commands, is not implementing any mysql client itself.

kamcmd doesn't do anything with mysql, it is just a binrpc client interacting 
with ctl module in kamailio.

Cheers,
Daniel
On 05.03.19 15:15, Daniel W. Graham wrote:
Version 5.1.7

I saw a post talking about the grant issues on database creation, using an 
existing database in this case.

-dan
On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla 
mailto:mico...@gmail.com>> wrote:

What version of kamailio are you using? Iirc, there were some updates to kamctl 
or kamdbctl related to latest mysql version, but if I am not wrong, they were 
about granting access, not executing queries.

Cheers,
Daniel
On 05.03.19 05:54, Daniel W. Graham wrote:
Are there any known compatibility issues with kamctl and mysql 8.0.x?

Getting access denied when executing kamctl command. Kamcmd just hangs when 
executed.

Kamctlrc is setup proper and connection can be made direct from shell to 
database using the same credentials.

-dan



___

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

--

Daniel-Constantin Mierla -- www.asipto.com

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamctl / kamcmd

2019-03-05 Thread Daniel W. Graham
Got a little ahead of myself, not an issue with the quotes, those have to be 
there obviously. Appears to be an issue with the way the password is presented 
though, still digging.

-dan

From: sr-users  On Behalf Of Daniel W. 
Graham
Sent: Tuesday, March 5, 2019 11:36 AM
To: mico...@gmail.com
Cc: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Kamctl / kamcmd

-x didnt yield anything.

I checked the source of kamctl -

$MYSQL $2 -h $DBHOST -u $DBRWUSER "-p$DBRWPW" $DBNAME

The issue is due to special characters in the password being interpreted by the 
shell due to the double quotes around "-p$DBRWPW".

-dan

From: Daniel-Constantin Mierla mailto:mico...@gmail.com>>
Sent: Tuesday, March 5, 2019 10:07 AM
To: Daniel W. Graham mailto:d...@cmsinter.net>>
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd


Then run with -x as suggested in another response on the mailing list, maybe 
you can get some hints there. Otherwise, kamctl is just using mysql tool for 
sending commands, is not implementing any mysql client itself.

kamcmd doesn't do anything with mysql, it is just a binrpc client interacting 
with ctl module in kamailio.

Cheers,
Daniel
On 05.03.19 15:15, Daniel W. Graham wrote:
Version 5.1.7

I saw a post talking about the grant issues on database creation, using an 
existing database in this case.

-dan
On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla 
mailto:mico...@gmail.com>> wrote:

What version of kamailio are you using? Iirc, there were some updates to kamctl 
or kamdbctl related to latest mysql version, but if I am not wrong, they were 
about granting access, not executing queries.

Cheers,
Daniel
On 05.03.19 05:54, Daniel W. Graham wrote:
Are there any known compatibility issues with kamctl and mysql 8.0.x?

Getting access denied when executing kamctl command. Kamcmd just hangs when 
executed.

Kamctlrc is setup proper and connection can be made direct from shell to 
database using the same credentials.

-dan


___

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

--

Daniel-Constantin Mierla -- www.asipto.com

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamctl / kamcmd

2019-03-05 Thread Daniel W. Graham
Changing double quotes to single quotes around passwords in kamctlrc fixed the 
issue with kamctl.

-dan

From: sr-users  On Behalf Of Daniel W. 
Graham
Sent: Tuesday, March 5, 2019 11:44 AM
To: Kamailio (SER) - Users Mailing List ; 
mico...@gmail.com
Subject: Re: [SR-Users] Kamctl / kamcmd

Got a little ahead of myself, not an issue with the quotes, those have to be 
there obviously. Appears to be an issue with the way the password is presented 
though, still digging.

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 5, 2019 11:36 AM
To: mico...@gmail.com
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd

-x didnt yield anything.

I checked the source of kamctl -

$MYSQL $2 -h $DBHOST -u $DBRWUSER "-p$DBRWPW" $DBNAME

The issue is due to special characters in the password being interpreted by the 
shell due to the double quotes around "-p$DBRWPW".

-dan

From: Daniel-Constantin Mierla mailto:mico...@gmail.com>>
Sent: Tuesday, March 5, 2019 10:07 AM
To: Daniel W. Graham mailto:d...@cmsinter.net>>
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd


Then run with -x as suggested in another response on the mailing list, maybe 
you can get some hints there. Otherwise, kamctl is just using mysql tool for 
sending commands, is not implementing any mysql client itself.

kamcmd doesn't do anything with mysql, it is just a binrpc client interacting 
with ctl module in kamailio.

Cheers,
Daniel
On 05.03.19 15:15, Daniel W. Graham wrote:
Version 5.1.7

I saw a post talking about the grant issues on database creation, using an 
existing database in this case.

-dan
On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla 
mailto:mico...@gmail.com>> wrote:

What version of kamailio are you using? Iirc, there were some updates to kamctl 
or kamdbctl related to latest mysql version, but if I am not wrong, they were 
about granting access, not executing queries.

Cheers,
Daniel
On 05.03.19 05:54, Daniel W. Graham wrote:
Are there any known compatibility issues with kamctl and mysql 8.0.x?

Getting access denied when executing kamctl command. Kamcmd just hangs when 
executed.

Kamctlrc is setup proper and connection can be made direct from shell to 
database using the same credentials.

-dan


___

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

--

Daniel-Constantin Mierla -- www.asipto.com

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamctl / kamcmd

2019-03-05 Thread Sergey Safarov
Single quotes not allow to resolve variables.

Could you test notation "${MY_VAR_NAME}" instead of "$MY_VAR_NAME"

Sergey

вт, 5 мар. 2019 г. в 20:17, Daniel W. Graham :

> Changing double quotes to single quotes around passwords in kamctlrc fixed
> the issue with kamctl.
>
>
>
> -dan
>
>
>
> *From:* sr-users  *On Behalf Of *Daniel
> W. Graham
> *Sent:* Tuesday, March 5, 2019 11:44 AM
> *To:* Kamailio (SER) - Users Mailing List ;
> mico...@gmail.com
> *Subject:* Re: [SR-Users] Kamctl / kamcmd
>
>
>
> Got a little ahead of myself, not an issue with the quotes, those have to
> be there obviously. Appears to be an issue with the way the password is
> presented though, still digging.
>
>
>
> -dan
>
>
>
> *From:* sr-users  *On Behalf Of *Daniel
> W. Graham
> *Sent:* Tuesday, March 5, 2019 11:36 AM
> *To:* mico...@gmail.com
> *Cc:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Kamctl / kamcmd
>
>
>
> -x didnt yield anything.
>
>
>
> I checked the source of kamctl -
>
>
>
> $MYSQL $2 -h $DBHOST -u $DBRWUSER "-p$DBRWPW" $DBNAME
>
>
>
> The issue is due to special characters in the password being interpreted
> by the shell due to the double quotes around "-p$DBRWPW".
>
>
>
> -dan
>
>
>
> *From:* Daniel-Constantin Mierla 
> *Sent:* Tuesday, March 5, 2019 10:07 AM
> *To:* Daniel W. Graham 
> *Cc:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Kamctl / kamcmd
>
>
>
> Then run with -x as suggested in another response on the mailing list,
> maybe you can get some hints there. Otherwise, kamctl is just using mysql
> tool for sending commands, is not implementing any mysql client itself.
>
> kamcmd doesn't do anything with mysql, it is just a binrpc client
> interacting with ctl module in kamailio.
>
> Cheers,
> Daniel
>
> On 05.03.19 15:15, Daniel W. Graham wrote:
>
> Version 5.1.7
>
>
>
> I saw a post talking about the grant issues on database creation, using an
> existing database in this case.
>
>
>
> -dan
>
> On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla 
> wrote:
>
> What version of kamailio are you using? Iirc, there were some updates to
> kamctl or kamdbctl related to latest mysql version, but if I am not wrong,
> they were about granting access, not executing queries.
>
> Cheers,
> Daniel
>
> On 05.03.19 05:54, Daniel W. Graham wrote:
>
> Are there any known compatibility issues with kamctl and mysql 8.0.x?
>
>
>
> Getting access denied when executing kamctl command. Kamcmd just hangs
> when executed.
>
>
>
> Kamctlrc is setup proper and connection can be made direct from shell to
> database using the same credentials.
>
>
>
> -dan
>
>
>
> ___
>
> 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
>
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>
> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
> www.asipto.com
>
> --
>
> Daniel-Constantin Mierla -- www.asipto.com
>
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>
> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
> www.asipto.com
>
> ___
> 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] Kamctl / kamcmd

2019-03-05 Thread Daniel W. Graham
In this case its ok since it’s the source of the password:

From default kamctlrc -

## password for database read/write user
DBRWPW="kamailiorw"

## password for database read only user
DBROPW="kamailioro"

-dan

From: sr-users  On Behalf Of Sergey Safarov
Sent: Tuesday, March 5, 2019 12:20 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Kamctl / kamcmd

Single quotes not allow to resolve variables.

Could you test notation "${MY_VAR_NAME}" instead of "$MY_VAR_NAME"

Sergey

вт, 5 мар. 2019 г. в 20:17, Daniel W. Graham 
mailto:d...@cmsinter.net>>:
Changing double quotes to single quotes around passwords in kamctlrc fixed the 
issue with kamctl.

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 5, 2019 11:44 AM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>; 
mico...@gmail.com
Subject: Re: [SR-Users] Kamctl / kamcmd

Got a little ahead of myself, not an issue with the quotes, those have to be 
there obviously. Appears to be an issue with the way the password is presented 
though, still digging.

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 5, 2019 11:36 AM
To: mico...@gmail.com
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd

-x didnt yield anything.

I checked the source of kamctl -

$MYSQL $2 -h $DBHOST -u $DBRWUSER "-p$DBRWPW" $DBNAME

The issue is due to special characters in the password being interpreted by the 
shell due to the double quotes around "-p$DBRWPW".

-dan

From: Daniel-Constantin Mierla mailto:mico...@gmail.com>>
Sent: Tuesday, March 5, 2019 10:07 AM
To: Daniel W. Graham mailto:d...@cmsinter.net>>
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd


Then run with -x as suggested in another response on the mailing list, maybe 
you can get some hints there. Otherwise, kamctl is just using mysql tool for 
sending commands, is not implementing any mysql client itself.

kamcmd doesn't do anything with mysql, it is just a binrpc client interacting 
with ctl module in kamailio.

Cheers,
Daniel
On 05.03.19 15:15, Daniel W. Graham wrote:
Version 5.1.7

I saw a post talking about the grant issues on database creation, using an 
existing database in this case.

-dan
On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla 
mailto:mico...@gmail.com>> wrote:

What version of kamailio are you using? Iirc, there were some updates to kamctl 
or kamdbctl related to latest mysql version, but if I am not wrong, they were 
about granting access, not executing queries.

Cheers,
Daniel
On 05.03.19 05:54, Daniel W. Graham wrote:
Are there any known compatibility issues with kamctl and mysql 8.0.x?

Getting access denied when executing kamctl command. Kamcmd just hangs when 
executed.

Kamctlrc is setup proper and connection can be made direct from shell to 
database using the same credentials.

-dan


___

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

--

Daniel-Constantin Mierla -- www.asipto.com

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com
___
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] Kamctl / kamcmd

2019-03-05 Thread Daniel W. Graham
Any ideas on the kamcmd issue? Executing any kamcmd command hangs with no 
output.

-dan

From: sr-users  On Behalf Of Daniel W. 
Graham
Sent: Tuesday, March 5, 2019 12:26 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Kamctl / kamcmd

In this case its ok since it’s the source of the password:

From default kamctlrc -

## password for database read/write user
DBRWPW="kamailiorw"

## password for database read only user
DBROPW="kamailioro"

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Sergey Safarov
Sent: Tuesday, March 5, 2019 12:20 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd

Single quotes not allow to resolve variables.

Could you test notation "${MY_VAR_NAME}" instead of "$MY_VAR_NAME"

Sergey

вт, 5 мар. 2019 г. в 20:17, Daniel W. Graham 
mailto:d...@cmsinter.net>>:
Changing double quotes to single quotes around passwords in kamctlrc fixed the 
issue with kamctl.

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 5, 2019 11:44 AM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>; 
mico...@gmail.com
Subject: Re: [SR-Users] Kamctl / kamcmd

Got a little ahead of myself, not an issue with the quotes, those have to be 
there obviously. Appears to be an issue with the way the password is presented 
though, still digging.

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 5, 2019 11:36 AM
To: mico...@gmail.com
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd

-x didnt yield anything.

I checked the source of kamctl -

$MYSQL $2 -h $DBHOST -u $DBRWUSER "-p$DBRWPW" $DBNAME

The issue is due to special characters in the password being interpreted by the 
shell due to the double quotes around "-p$DBRWPW".

-dan

From: Daniel-Constantin Mierla mailto:mico...@gmail.com>>
Sent: Tuesday, March 5, 2019 10:07 AM
To: Daniel W. Graham mailto:d...@cmsinter.net>>
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd


Then run with -x as suggested in another response on the mailing list, maybe 
you can get some hints there. Otherwise, kamctl is just using mysql tool for 
sending commands, is not implementing any mysql client itself.

kamcmd doesn't do anything with mysql, it is just a binrpc client interacting 
with ctl module in kamailio.

Cheers,
Daniel
On 05.03.19 15:15, Daniel W. Graham wrote:
Version 5.1.7

I saw a post talking about the grant issues on database creation, using an 
existing database in this case.

-dan
On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla 
mailto:mico...@gmail.com>> wrote:

What version of kamailio are you using? Iirc, there were some updates to kamctl 
or kamdbctl related to latest mysql version, but if I am not wrong, they were 
about granting access, not executing queries.

Cheers,
Daniel
On 05.03.19 05:54, Daniel W. Graham wrote:
Are there any known compatibility issues with kamctl and mysql 8.0.x?

Getting access denied when executing kamctl command. Kamcmd just hangs when 
executed.

Kamctlrc is setup proper and connection can be made direct from shell to 
database using the same credentials.

-dan


___

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

--

Daniel-Constantin Mierla -- www.asipto.com

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com
___
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] Kamctl / kamcmd

2019-03-05 Thread Daniel W. Graham
This has something to do with TLS config.

If tls settings are removed/disabled in kamailio config file, kamcmd works 
normal. I havent identified the issue any further.

-dan

From: sr-users  On Behalf Of Daniel W. 
Graham
Sent: Tuesday, March 5, 2019 1:19 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Kamctl / kamcmd

Any ideas on the kamcmd issue? Executing any kamcmd command hangs with no 
output.

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 5, 2019 12:26 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd

In this case its ok since it’s the source of the password:

From default kamctlrc -

## password for database read/write user
DBRWPW="kamailiorw"

## password for database read only user
DBROPW="kamailioro"

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Sergey Safarov
Sent: Tuesday, March 5, 2019 12:20 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd

Single quotes not allow to resolve variables.

Could you test notation "${MY_VAR_NAME}" instead of "$MY_VAR_NAME"

Sergey

вт, 5 мар. 2019 г. в 20:17, Daniel W. Graham 
mailto:d...@cmsinter.net>>:
Changing double quotes to single quotes around passwords in kamctlrc fixed the 
issue with kamctl.

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 5, 2019 11:44 AM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>; 
mico...@gmail.com
Subject: Re: [SR-Users] Kamctl / kamcmd

Got a little ahead of myself, not an issue with the quotes, those have to be 
there obviously. Appears to be an issue with the way the password is presented 
though, still digging.

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 5, 2019 11:36 AM
To: mico...@gmail.com
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd

-x didnt yield anything.

I checked the source of kamctl -

$MYSQL $2 -h $DBHOST -u $DBRWUSER "-p$DBRWPW" $DBNAME

The issue is due to special characters in the password being interpreted by the 
shell due to the double quotes around "-p$DBRWPW".

-dan

From: Daniel-Constantin Mierla mailto:mico...@gmail.com>>
Sent: Tuesday, March 5, 2019 10:07 AM
To: Daniel W. Graham mailto:d...@cmsinter.net>>
Cc: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Kamctl / kamcmd


Then run with -x as suggested in another response on the mailing list, maybe 
you can get some hints there. Otherwise, kamctl is just using mysql tool for 
sending commands, is not implementing any mysql client itself.

kamcmd doesn't do anything with mysql, it is just a binrpc client interacting 
with ctl module in kamailio.

Cheers,
Daniel
On 05.03.19 15:15, Daniel W. Graham wrote:
Version 5.1.7

I saw a post talking about the grant issues on database creation, using an 
existing database in this case.

-dan
On Mar 5, 2019, at 2:53 AM, Daniel-Constantin Mierla 
mailto:mico...@gmail.com>> wrote:

What version of kamailio are you using? Iirc, there were some updates to kamctl 
or kamdbctl related to latest mysql version, but if I am not wrong, they were 
about granting access, not executing queries.

Cheers,
Daniel
On 05.03.19 05:54, Daniel W. Graham wrote:
Are there any known compatibility issues with kamctl and mysql 8.0.x?

Getting access denied when executing kamctl command. Kamcmd just hangs when 
executed.

Kamctlrc is setup proper and connection can be made direct from shell to 
database using the same credentials.

-dan


___

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

--

Daniel-Constantin Mierla -- www.asipto.com

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

Kamailio World Conference - May 6-8, 2019 -- 
www.kamailioworld.com

Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com
___
Kamailio (SER) - Users Mailing Li

Re: [SR-Users] Disable Dispatcher GW from DB

2019-03-05 Thread Patrick Wakano
Thanks Dmitri!
It worked like a charm!
Cheers,
Patrick Wakano

On Tue, 5 Mar. 2019, 18:42 Dmitri Savolainen,  wrote:

> hi Patrick
> You may set flag=4 in "dispatcher" table for appropriate GW
>
> On Tue, 5 Mar 2019 at 04:57, Patrick Wakano  wrote:
>
>> Hello list,
>> Hope you are all doing well!
>>
>> I am looking for a way to disable a Dispatcher GW from the DB. I know I
>> can disable it using the "kamcmd dispatcher.set_state d ..."command, but in
>> case I do a reload or restart after that, the disabled GW will be back as
>> active.
>> Of course I could also delete the GW from DB, but for CDR purposes I want
>> to keep the entry but mark as permanently disabled, so Kamailio won't try
>> to use it nor ping it anymore. Does anyone how can I do that in the DB? I
>> am looking for the exact same behavior the "kamcmd dispatcher.set_state d"
>> does but from some change in the DB.
>>
>> Thanks,
>> Kind regards,
>> Patrick Wakano
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
> Savolainen Dmitri
> ___
> 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] ACKs + BYEs coming from the wrong interface/ip

2019-03-05 Thread Boden Garman
Hello list! 

I am trying to troubleshoot an issue we are having where we sometimes see an 
ACK in response to a 200 OK (SDP) come from the a different IP address to the 
rest of dialogue. The client ignore the traffic from the different IP and the 
call set up fails.

Kamailio is multihomed on two IPs and this client is registered with the first 
IP address. 

I have done some searching on this and seen a few others with the issue, it 
seems like it's the ACK in the loose_route() section of WITHINDLG in the 
default kamailio.cfg file. I tried the force_send_socket solution one other 
person suggested but this caused issues with other kinds of dialogues, perhaps 
I did it incorrectly?

Thanks for your time
Boden


Here is my attempt to solve the issue and config snippets 

mhomed=1

# - rr params -
# set next param to 1 to add value to ;lr param (helps with some UAs)
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 1)

# Handle requests within SIP dialogs
route[WITHINDLG] {
if (!has_totag()) return;

# sequential request within a dialog should
# take the path determined by record-routing
if (loose_route()) {
route(DLGURI);

# this is the attempt to use the right IP
if ($(route_uri{uri.host}) == VRRP_IP) {
force_send_socket(VRRP_IP);
} else if ($(route_uri{uri.host}) == KAM01_IP) {
 force_send_socket(KAM01_IP);
}

if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction 
fails
} else if (is_method("ACK")) {
# ACK is forwarded statelessly
route(NATMANAGE);
} else if (is_method("NOTIFY")) {
# Add Record-Route for in-dialog NOTIFY as per RFC 6665.
record_route();
}

route(RELAY);
exit;
}

if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}

if (is_method("ACK")) {
if (t_check_trans()) {
# no loose-route, but stateful ACK;
# must be an ACK after a 487
# or e.g. 404 from upstream server
route(RELAY);
exit;
} else {
# ACK without matching transaction ... ignore and 
discard
exit;
}
}
sl_send_reply("404", "Not here");
exit;
}

For example (please excuse formatting) 


xxx.xx.xxx.97:5060xxx.xx.xxx.96:5060   
yyy.yyy.102.96:58308   xxx.xx.xxx.27:5060
  --w-  --w-  
--w-  --w-
   xINVITE (SDP) x 
x x 
   x --> x 
x x 
   x  100 trying -- your call is x 
x x 
   x <-- x 
x x 
   x xINVITE (SDP) 
x x 
   x x --> 
x x 
   x x 100 Trying  
x x 
   x x <-- 
x x 
   x x 180 Ringing 
x x 
   x x <-- 
x x 
   x 180 Ringing x 
x x 
   x <-- x 
x x 
   x x200 OK (SDP) 
x x 
   x x <-- 
x x 
   x   

[SR-Users] Kamailio not recognizing SIP requests

2019-03-05 Thread Sergio Charrua
Hi all!

got a Kamailio doing load balancing to multiple Asterisk boxes. Kamailio is
connected to a carrier's SIP trunk, and distributes calls to Asterisk.

Receiving calls from carrier's SIP trunk works perfectly: kamailio will use
dispatcher module to distribute calls between Asterisk boxes. No problems!

Kamailio is also connected to the WWW, receiving calls from any authorized
IP (whitelisted in Firewall).
The problem is that if I get a call from the WWW and a from whitelisted IP,
kamailio does not detect any INVITE (note that the IP address is not
registered).

here is the SIP Request (IPs are obfuscated)

INVITE sip:+351234567890@10.19.139.66 SIP/2.0
Record-Route: 
CSeq: 1 INVITE
From: ;tag=11592086_6772d868_135fa74b-2c83-4d5f-9882-4125b131c703
To: 
Max-Forwards: 65
P-Asserted-Identity: "+3519" 
Date: Tue, 05 Mar 2019 15:55:24 GMT
Min-SE: 120
Call-ID: 799ee9a8cd02e066e2811d8052759715@0.0.0.0
Via: SIP/2.0/UDP 11.22.33.44:5060;branch=z9hG4bK6b36.f67ca7e4.0
Via: SIP/2.0/UDP 222.33.44.55:5060
;branch=z9hG4bK135fa74b-2c83-4d5f-9882-4125b131c703_6772d868_106-113479085018764135
Contact: "+3519" 
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE
User-Agent: SomeSIPGateway
Content-Type: application/sdp
X-SIPGW-CallSid: CA6a5691a75bb7b915c09c7931e253f542
Content-Length: 262

v=0
o=root 1219665045 1219665045 IN IP4 55.66.77.88
s=SomeSIPGateway
c=IN IP4 55.66.77.88
t=0 0
m=audio 14326 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


SIP Messages using SNGrep:

   11.22.33.44:5060 10.19.139.66:5060
 --+-  --+-
 15:55:25.980727   |INVITE (SDP) |
   +0.596007   | --> |
 15:55:26.576734   |INVITE (SDP) |
   +1.003393   | >>> |
 15:55:27.580127   |INVITE (SDP) |
   +1.978513   | >>> |
 15:55:29.558640   |INVITE (SDP) |
   | >>> |


I've checked that Kamailio is listennig to all interfaces (OK) and to port
5060 (OK).
As we can see above, SNGrep shows the incoming message to Kamailio
(10.19.139.66) but it gets stuck there as there are no other messages.
Kamailio.log doesn't show anything too, just like if the request (INVITE)
is not recognizes a a SIP message.

all other use cases work fine :
- from SIP Carrier's trunk OK
- from registered SIP user OK
- from registered SIP Trunk ok

only from a not registered SIP trunk I get this behaviour


Any clue?



Thanks in advance,

*Sérgio *
www.voip.pt
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users