Re: [SR-Users] cfg_lock_helper(): lock set not initialized

2018-11-07 Thread Daniel-Constantin Mierla
Hello,

if you use lock/unlock functions inside kamailio.cfg, you have to set
lock_set_size parameter for cfgutils module.

Cheers,
Daniel


On 07.11.18 23:45, Kjeld Flarup wrote:
> Hi
>
> What does this error actually mean? I get it with 5.1.4
>
> Nov  6 13:27:02 scantronpbx /usr/sbin/kamailio[2149]: ERROR: cfgutils
> [cfgutils.c:708]: cfg_lock_helper(): lock set not initialized (attempt
> to do op: 1 on: u1)
>
>

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- 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] Custom authentication

2018-11-07 Thread Alex Balashov
Hi João,

It is certainly possible. Specifically, you can use values stored in
pseudovariables for authentication challenges instead of going to the
standard authentication database backing. Have a look at the pv_*
functions in the `auth` module, e.g.

https://kamailio.org/docs/modules/5.1.x/modules/auth.html#auth.f.pv_auth_check

Naturally, the values in these variables can be sourced from anywhere,
including an API call to a web server. You can make that call using the
`http_client` or `http_async_client` modules, for instance. You can even
parse a JSON result using the `jansson` module.

-- Alex

On Thu, Nov 08, 2018 at 03:04:44AM -0200, João Sávio wrote:

> Hello!
> 
> I was reading the documentation of Kamailio, And, although there are some
> authentication modules, I couldn't find a way to implement a custom
> authentication for SIP Register. Something that allows me, for example, to
> call a web server and returns if the user is authenticated, or the user
> data.
> 
> Am I missing anything? Do you know if it's possible to do this using
> another way?
> 
> Thanks
> João

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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


[SR-Users] Custom authentication

2018-11-07 Thread João Sávio
Hello!

I was reading the documentation of Kamailio, And, although there are some
authentication modules, I couldn't find a way to implement a custom
authentication for SIP Register. Something that allows me, for example, to
call a web server and returns if the user is authenticated, or the user
data.

Am I missing anything? Do you know if it's possible to do this using
another way?

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


[SR-Users] cfg_lock_helper(): lock set not initialized

2018-11-07 Thread Kjeld Flarup

Hi

What does this error actually mean? I get it with 5.1.4

Nov  6 13:27:02 scantronpbx /usr/sbin/kamailio[2149]: ERROR: cfgutils 
[cfgutils.c:708]: cfg_lock_helper(): lock set not initialized (attempt 
to do op: 1 on: u1)



--
 Med Liberalistiske Hilsner --
   Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
   Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
   Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk


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


Re: [SR-Users] Phone does not set "Expire-header" but "Contact expire", immediately expires

2018-11-07 Thread Kevin Olbrich
For anyone interested:
server_header="Server: Mitel Border GW"

This effectively forges the header to the one from the firmware.
There are many other:
Aastra 800
OpenCom
Aastra 400
MiVoice Office 400
Aastra MX-ONE
Forum 5
Telepo
Mitel-5000-ICP
Mitel Border GW
Mitel-3300-ICP

Source:
- binwalk -e 6930.st
- jffs2-root/fs_1/bin/linemgrSip will be of interest

security through obscurity

Kevin

Am Mi., 7. Nov. 2018 um 15:06 Uhr schrieb Kevin Olbrich :

> Hi!
>
> I have found the problem. It is indeed desired behaviour!
> Current FW is 5.1.0. I have now browsed the realease notes from latest to
> oldest and release 5.0.0 (first for Mitel 6900 series) states, that this
> phone only works, if registered to Mitel call servers.
> This remark is only listet there and in no other location. Seems like all
> who buy this phone are currently out of luck.
> The phone does not detect a Mitel call server and throws an internal 606
> and disables the line until reboot.
> Source: Page 14 of Mitel 6800/6900 Series SIP Phones 5.0.0 Release Notes
>
> I never had such a case, where a vendor locks his phone to it's own
> platform. In particular does not communicate this change.
>
> Thanks for your help while debugging this. I have learned a lot during
> debug.
>
> Kind regards
> Kevin
>
>
> Am Di., 6. Nov. 2018 um 23:30 Uhr schrieb Sergiu Pojoga  >:
>
>> Hardly a guess, just experience, lol
>>
>> You're welcome.
>>
>> On Tue, Nov 6, 2018 at 5:24 PM Kevin Olbrich  wrote:
>>
>>> Am Di., 6. Nov. 2018 um 23:09 Uhr schrieb Sergiu Pojoga <
>>> pojo...@gmail.com>:
>>>
 I would assume the phone sends multiple REGISTER requests with same
 CallID, one or more of which has an expire=0, as a NAT traversal technique
 trying to discover its public IP at first. May be it doesn't do it very
 well.

>>>
>>> I have checked again and indeed, correct guess!
>>>
>>>


>>> Since you are using Kamailio for auth/usrloc, sending its REGISTER with
 expire=0 would indicate that the Kamailio contact has expired (probably
 after such a request was received from the phone). Try checking it with
 'kamctl ul show'

>>>
>>> Correct as well, endpoint is not listed there.
>>>
>>> I will check if I can get debug from the phone.
>>>
>>> Thank you very much!
>>>
>>> Kevin
>>>
>>>
 On Tue, Nov 6, 2018 at 4:57 PM Henning Westerholt 
 wrote:

> Am Dienstag, 6. November 2018, 22:50:54 CET schrieb Kevin Olbrich:
> > Am Di., 6. Nov. 2018 um 22:40 Uhr schrieb Sergiu Pojoga <
> pojo...@gmail.com>:
> > > It's not clear what kamailio/asterisk integration method you are
> using.
> > > Looking at the 2 provided messages - the 2nd one is not a relay of
> the 1st
> > > one.
> >
> > I might have matched the wrong transaction. I use HEP/HOMER to
> observe
> > communication and Kamailio starts a new flow (=Call-Id) to asterisk
> (this
> > message is no coming from the phone).
> >
> > > handle authentication/usrloc in Kamailio?
> > > or
> > > using PATH extension?
> >
> > I do auth + usrloc in Kamailio, no PATH.
> >
> > Maybe the Kamailio debug would lead me to the problem but verbose
> level 3
> > has too much info.
>
> Hi Kevin,
>
> you could control the time when the specific not-working phone send a
> REGISTER. Then you can enable the debugging for a few seconds during
> this
> time, and then deactivate it again. This should work even on a
> production
> server. Debugging it on a test server is of course an even better way.
>
> Best regards,
>
> Henning
>
> --
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://skalatan.de/services
> Kamailio security assessment - https://skalatan.de/de/assessment
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
 ___
 Kamailio (SER) - Users Mailing List
 sr-users@lists.kamailio.org
 https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

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


Re: [SR-Users] Phone does not set "Expire-header" but "Contact expire", immediately expires

2018-11-07 Thread Kevin Olbrich
Hi!

I have found the problem. It is indeed desired behaviour!
Current FW is 5.1.0. I have now browsed the realease notes from latest to
oldest and release 5.0.0 (first for Mitel 6900 series) states, that this
phone only works, if registered to Mitel call servers.
This remark is only listet there and in no other location. Seems like all
who buy this phone are currently out of luck.
The phone does not detect a Mitel call server and throws an internal 606
and disables the line until reboot.
Source: Page 14 of Mitel 6800/6900 Series SIP Phones 5.0.0 Release Notes

I never had such a case, where a vendor locks his phone to it's own
platform. In particular does not communicate this change.

Thanks for your help while debugging this. I have learned a lot during
debug.

Kind regards
Kevin


Am Di., 6. Nov. 2018 um 23:30 Uhr schrieb Sergiu Pojoga :

> Hardly a guess, just experience, lol
>
> You're welcome.
>
> On Tue, Nov 6, 2018 at 5:24 PM Kevin Olbrich  wrote:
>
>> Am Di., 6. Nov. 2018 um 23:09 Uhr schrieb Sergiu Pojoga <
>> pojo...@gmail.com>:
>>
>>> I would assume the phone sends multiple REGISTER requests with same
>>> CallID, one or more of which has an expire=0, as a NAT traversal technique
>>> trying to discover its public IP at first. May be it doesn't do it very
>>> well.
>>>
>>
>> I have checked again and indeed, correct guess!
>>
>>
>>>
>>>
>> Since you are using Kamailio for auth/usrloc, sending its REGISTER with
>>> expire=0 would indicate that the Kamailio contact has expired (probably
>>> after such a request was received from the phone). Try checking it with
>>> 'kamctl ul show'
>>>
>>
>> Correct as well, endpoint is not listed there.
>>
>> I will check if I can get debug from the phone.
>>
>> Thank you very much!
>>
>> Kevin
>>
>>
>>> On Tue, Nov 6, 2018 at 4:57 PM Henning Westerholt 
>>> wrote:
>>>
 Am Dienstag, 6. November 2018, 22:50:54 CET schrieb Kevin Olbrich:
 > Am Di., 6. Nov. 2018 um 22:40 Uhr schrieb Sergiu Pojoga <
 pojo...@gmail.com>:
 > > It's not clear what kamailio/asterisk integration method you are
 using.
 > > Looking at the 2 provided messages - the 2nd one is not a relay of
 the 1st
 > > one.
 >
 > I might have matched the wrong transaction. I use HEP/HOMER to observe
 > communication and Kamailio starts a new flow (=Call-Id) to asterisk
 (this
 > message is no coming from the phone).
 >
 > > handle authentication/usrloc in Kamailio?
 > > or
 > > using PATH extension?
 >
 > I do auth + usrloc in Kamailio, no PATH.
 >
 > Maybe the Kamailio debug would lead me to the problem but verbose
 level 3
 > has too much info.

 Hi Kevin,

 you could control the time when the specific not-working phone send a
 REGISTER. Then you can enable the debugging for a few seconds during
 this
 time, and then deactivate it again. This should work even on a
 production
 server. Debugging it on a test server is of course an even better way.

 Best regards,

 Henning

 --
 Henning Westerholt - https://skalatan.de/blog/
 Kamailio services - https://skalatan.de/services
 Kamailio security assessment - https://skalatan.de/de/assessment

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

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


Re: [SR-Users] failure route is not executed when suspended invite is cancelled

2018-11-07 Thread Daniel-Constantin Mierla
Hello,


On 07.11.18 06:46, Koray Vatansever wrote:
> Hi all,
>
> I'm trying to upgrade kamailio from 4.2.7 to 5.1.5 and I realized that
> when CANCEL is received for a suspended INVITE, failure route is not
> executed in release 5.1.5. 
> In 4.2.7 failure route is executed for this scenario.
>
> Is this the expected behaviour or am I missing something?
failure_route should be executed. Can you reproduce with debug=3 and
send all the logs related to this call, from receiving the INVITE till
the CANCEL is processed?

Cheers,
Daniel

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


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