Re: [asterisk-users] Asterisk not honoring astetcdir

2014-08-10 Thread Joshua Colp

D'Arcy J.M. Cain wrote:

Running 11.10.2 on NetBSD 6.1.4 but I observed this on 11.11.0 as
well.  I have a directory which, through a combination of NULL mount
and UNION mount contains everything in the installed config
directory /usr/pkg/etc/asterisk except for my modified versions of
those files.  Basically I mount_null /usr/pkg/etc/asterisk
on /usr/local/etc/asterisk and then mount_union my SVN directory with
my modified versions over that.

I then call asterisk with -C /usr/local/etc/asterisk.conf which
contains the following:

[directories](!)
astetcdir =  /usr/local/etc/asterisk
etc...


Remove (!) from the name. That marks it as a template. Unless you remove 
it it won't be used.


--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com  www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk not honoring astetcdir

2014-08-10 Thread D'Arcy J.M. Cain
On Sun, 10 Aug 2014 07:57:31 -0300
Joshua Colp jc...@digium.com wrote:
  [directories](!)
  astetcdir =  /usr/local/etc/asterisk
  etc...
 
 Remove (!) from the name. That marks it as a template. Unless you
 remove it it won't be used.

Of course.  Thanks.  The odd thing is that that comes from the
distribution.  Any idea where that template is meant to be used?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk not honoring astetcdir

2014-08-10 Thread Joshua Colp

D'Arcy J.M. Cain wrote:

On Sun, 10 Aug 2014 07:57:31 -0300
Joshua Colpjc...@digium.com  wrote:

[directories](!)
astetcdir =   /usr/local/etc/asterisk
etc...

Remove (!) from the name. That marks it as a template. Unless you
remove it it won't be used.


Of course.  Thanks.  The odd thing is that that comes from the
distribution.  Any idea where that template is meant to be used?


It's not as far as I know. It's just being used as a method so the 
values there don't overrule the compiled-in values.


--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com  www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk not honoring astetcdir

2014-08-10 Thread D'Arcy J.M. Cain
On Sun, 10 Aug 2014 09:56:48 -0300
Joshua Colp jc...@digium.com wrote:
  Of course.  Thanks.  The odd thing is that that comes from the
  distribution.  Any idea where that template is meant to be used?
 
 It's not as far as I know. It's just being used as a method so the 
 values there don't overrule the compiled-in values.

Which, it seems to me, is exactly what one would want.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk not honoring astetcdir

2014-08-10 Thread Joshua Colp



D'Arcy J.M. Cain wrote:

On Sun, 10 Aug 2014 09:56:48 -0300
Joshua Colpjc...@digium.com  wrote:

Of course.  Thanks.  The odd thing is that that comes from the
distribution.  Any idea where that template is meant to be used?

It's not as far as I know. It's just being used as a method so the
values there don't overrule the compiled-in values.


Which, it seems to me, is exactly what one would want.


If you set them, yes. That file has default values though which would 
currently overrule the compiled in values. One option would be to just 
comment out all of them and remove the template value in the sample 
config. Nobody has proposed any changes relating to it though.


--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com  www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk not honoring astetcdir

2014-08-10 Thread D'Arcy J.M. Cain
On Sun, 10 Aug 2014 10:52:46 -0300
Joshua Colp jc...@digium.com wrote:
 If you set them, yes. That file has default values though which would 
 currently overrule the compiled in values. One option would be to
 just comment out all of them and remove the template value in the
 sample config. Nobody has proposed any changes relating to it though.

Another option would be to generate the file at build time using the
compiled in values.  I would still comment them as you suggest though.
That's usual practice in these sorts of config files.  Why parse a line
just to set what's already the default?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Rejecting secure audio stream without encryption details - when using ws clients and Kamailio integration

2014-08-10 Thread Olli Heiskanen
Hi,

Thanks Daniel for your reply.

Sorry for having been a bit obscure, it is my intention to have all clients
able to call each other, regardless of which ua client software they use. I
think I've realized what's going on. My goal is to use rtpengine to bridge
between rtp profiles when they are different. But according to sip.js
instruction, I set up my clients in a way that Asterisk took the place of
rtpengine and changed the rtp profiles along the way based on the realtime
table values. That got me confused but now I know at least what the problem
is so I can fix it. This setup works in a way that I can make calls between
websocket and sip clients, but the problem with it is that I need different
values in the realtime table, according to which rtp profile the client
uses.

Doing this I made a wrong turn in my project, I'll need to have universal
setup for each peer so the user can use a websocket client or a sip client
to register and use an account. I'll still need to figure out which
settings to use and which not to use, so the rtp gets handled by rtpengine,
not Asterisk. But that's a question for the Asterisk list.



The problem about Asterisk setting the rtp profile as UDP/TLS/RTP/SAVPF was
fixed using a peer setting in the realtime table, now Asterisk accepts
RTP/SAVPF I can have calls flowing as soon as I can get rtpengine to
cooperate with me.

I wonder, is there UDP/TLS/RTP/SAVPF handling in rtpengine/kamailio? I may
have to add some kind of handling to this if I have to revert back to my
previous settings.

cheers,
Olli


2014-08-05 16:49 GMT+03:00 Daniel-Constantin Mierla mico...@gmail.com:


 On 01/08/14 10:56, Olli Heiskanen wrote:

 Hi,

 I got ahead with my setup, this post helped me much:
 http://forums.digium.com/viewtopic.php?f=1t=90167sid=
 66fdf8cc4be5d955ba584e989a23442f

 At least the avpf setting had to be removed from sip.conf and put in the
 realtime db table, defined per client. I left the encryption setting in
 sip.conf. I had some problems calling from SIP client to another, then had
 to define avpf=no for those clients. Personally I don't like to use
 different settings to different clients, is there a way around this?

 With this setup I can make calls between SIP clients but not ws clients.
 My client (now I use sip.js) fails to parse the sdp - including the
 apparently correct rtp profile UDP/TLS/RTP/SAVPF - and sends back 488,
 which makes the call fail. I'd like to hear opinions from you guys which
 would be the correct place to handle this? My setup has Asterisk Kamailio
 realtime integration, and I use dispatcher in Kamailio to route calls to
 Asterisk. Kamailio sounds like the logical place, but I'd rather find a way
 to not change the rtp profile along the way, at least until the clients can
 support that one.

 To understand properly, you don't want to use rtpenging for
 srtp(webrtc)-rtp(classic sip) gatewaying?

 If yes, maybe you can partition the users (classic-sip and webrtc-sip),
 then use two asterisk instances with routing via kamailio.

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
 Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] DB_DELETE

2014-08-10 Thread Matthew Jordan
On Sat, Aug 9, 2014 at 6:14 PM, Joseph Towery tech...@bellsouth.net wrote:
 Thanks so much.  I should have figured that one out, but references online
 didn't show the Set command.  Spent 2 hours I will never get back.


Which online references?

If it is on the Asterisk wiki, we'll try to get the documentation fixed.

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com  http://asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat deepaksingh.ra...@gmail.com
wrote:

 Hi,

 I modified the query in res/res_config_odbc.c.
 Original:  SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'
 Modified: SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s'

 I rebuilt the code and installed Asterisk again. Now static realtime is
 working. Should I file a bug report?


 On Mon, Aug 11, 2014 at 2:37 AM, Deepak Rawat deepaksingh.ra...@gmail.com
  wrote:

 Hi,

 I am using Asterisk 12.4 static realtime. I am storing agents.conf
 related data in MS SQL Server 2012 database. But I keep getting *'LENGTH'
 is not a recognized built-in function name* error message. I debugged
 and found that it's due to the changes done in this ticket:
 https://issues.asterisk.org/jira/browse/ASTERISK-23582. As there is no
 LENGTH function in MS SQL Server, therefore, I am getting this error. Is
 this error due to some config issue at my end?

 Thank you,
 Deepak



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Matthew Jordan
On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat
deepaksingh.ra...@gmail.com wrote:



 On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat deepaksingh.ra...@gmail.com
 wrote:

 Hi,

 I modified the query in res/res_config_odbc.c.
 Original:  SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'
 Modified: SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s'

 I rebuilt the code and installed Asterisk again. Now static realtime is
 working. Should I file a bug report?


You're more than welcome to; at the same time, the number of people
using MS SQL Server with Asterisk is not tremendously high - at least
when compared with the alternatives. Unfortunately, this is one place
where making things compatible is problematic: MySQL and PostgreSQL
(which are far more likely to be used with Asterisk) along with Oracle
use LENGTH, not LEN.

Your solution, as it is currently, wouldn't be acceptable, as it would
cause far more problems than it would solve. About the only way I
could see solving this would be to make it configurable some place.

Given the relatively few number of people who use MS SQL Server, I
wouldn't expect this issue to receive a lot of attention without a
patch.

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com  http://asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
Thank you for the response Matthew. It makes perfect sense to cater to the
majority of databases. The changes I did are custom to our setup so we can
use Asterisk 12.4 with MS SQL Server 2012. I wanted to document this error
so anyone else facing it could resolve it. Like we have backslash_is_escape
setting in res_odbc.conf maybe we can provide a database_name setting and
drive the query using this setting. If I get time, I will submit a patch
for review.

On Mon, Aug 11, 2014 at 8:01 AM, Matthew Jordan mjor...@digium.com wrote:

 On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat
 deepaksingh.ra...@gmail.com wrote:
 
 
 
  On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat 
 deepaksingh.ra...@gmail.com
  wrote:
 
  Hi,
 
  I modified the query in res/res_config_odbc.c.
  Original:  SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'
  Modified: SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s'
 
  I rebuilt the code and installed Asterisk again. Now static realtime is
  working. Should I file a bug report?
 

 You're more than welcome to; at the same time, the number of people
 using MS SQL Server with Asterisk is not tremendously high - at least
 when compared with the alternatives. Unfortunately, this is one place
 where making things compatible is problematic: MySQL and PostgreSQL
 (which are far more likely to be used with Asterisk) along with Oracle
 use LENGTH, not LEN.

 Your solution, as it is currently, wouldn't be acceptable, as it would
 cause far more problems than it would solve. About the only way I
 could see solving this would be to make it configurable some place.

 Given the relatively few number of people who use MS SQL Server, I
 wouldn't expect this issue to receive a lot of attention without a
 patch.

 --
 Matthew Jordan
 Digium, Inc. | Engineering Manager
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 Check us out at: http://digium.com  http://asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Brian LaVallee


On 8/11/14, 11:31, Matthew Jordan wrote:

On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat
deepaksingh.ra...@gmail.com wrote:



On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat deepaksingh.ra...@gmail.com
wrote:

Hi,

I modified the query in res/res_config_odbc.c.
Original:  SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'
Modified: SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s'

I rebuilt the code and installed Asterisk again. Now static realtime is
working. Should I file a bug report?


You're more than welcome to; at the same time, the number of people
using MS SQL Server with Asterisk is not tremendously high - at least
when compared with the alternatives. Unfortunately, this is one place
where making things compatible is problematic: MySQL and PostgreSQL
(which are far more likely to be used with Asterisk) along with Oracle
use LENGTH, not LEN.


Another option, just add LENGTH as a user-defined function to MS SQL.

||-- Something like this...|
CREATE FUNCTION LENGTH (@input)
||BEGIN
   RETURN ( LEN(@input) )
END|




Your solution, as it is currently, wouldn't be acceptable, as it would
cause far more problems than it would solve. About the only way I
could see solving this would be to make it configurable some place.

Given the relatively few number of people who use MS SQL Server, I
wouldn't expect this issue to receive a lot of attention without a
patch.






--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
I tried that but for some reason couldn't get it working. My custom
function was getting created in dbo and the asterisk kept throwing error.
Maybe some mistake on my part. I will try it again.


On Mon, Aug 11, 2014 at 10:44 AM, Brian LaVallee b.laval...@globaltank.jp
wrote:


 On 8/11/14, 11:31, Matthew Jordan wrote:

 On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat
 deepaksingh.ra...@gmail.com wrote:



 On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat 
 deepaksingh.ra...@gmail.com
 wrote:

 Hi,

 I modified the query in res/res_config_odbc.c.
 Original:  SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'
 Modified: SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s'

 I rebuilt the code and installed Asterisk again. Now static realtime is
 working. Should I file a bug report?

  You're more than welcome to; at the same time, the number of people
 using MS SQL Server with Asterisk is not tremendously high - at least
 when compared with the alternatives. Unfortunately, this is one place
 where making things compatible is problematic: MySQL and PostgreSQL
 (which are far more likely to be used with Asterisk) along with Oracle
 use LENGTH, not LEN.


 Another option, just add LENGTH as a user-defined function to MS SQL.

 ||-- Something like this...|
 CREATE FUNCTION LENGTH (@input)
 ||BEGIN
RETURN ( LEN(@input) )
 END|




 Your solution, as it is currently, wouldn't be acceptable, as it would
 cause far more problems than it would solve. About the only way I
 could see solving this would be to make it configurable some place.

 Given the relatively few number of people who use MS SQL Server, I
 wouldn't expect this issue to receive a lot of attention without a
 patch.





 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users