Re: [asterisk-users] Question on WebRTC configuration

2018-12-07 Thread Kevin Harwell
On Fri, Dec 7, 2018 at 9:11 AM Dan Cropp  wrote:

> In the asterisk wiki instructions for Configuring Asterisk for WebRTC
> clients…
>
>
>
>
> https://wiki.asterisk.org/wiki/display/AST/Configuring+Asterisk+for+WebRTC+Clients
>
>
>
> “To communicate with websocket clients, Asterisk uses its built-in HTTP
> daemon.  Configure */etc/asterisk/http.conf* as follows:
>
>
>
> [general]
>
> enabled=yes
>
> bindaddr=0.0.0.0
>
> bindport=8088
>
> tlsenable=yes
>
> tlsbindaddr=0.0.0.0:8089
>
> tlscertfile=
>
> tlsprivatekey=
>
> tlscafile=”
>
>
>
> What is the tlscafile setting?
>
>
>
> When I look at the http.conf samples it doesn’t mention the tlscafile
> setting.
>
> I see there is a tlscafile setting in sip.conf, but I don’t find this
> anywhere else.
>
>
>
> Is the wiki web page mistaken or is this an actual http.conf setting that
> is undocumented?
>

The page is mistaken. It should not be there. the 'tlscafile' option is not
supported by the Asterisk http server. I've removed it from the wiki.
Thanks for catching that!


>
>
> Have a great day!
>

You too!


> Dan
> --
>

-- 
Kevin Harwell
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: https://digium.com & https://asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread hw

On 12/07/2018 03:08 PM, Joshua C. Colp wrote:

On Fri, Dec 7, 2018, at 9:54 AM, hw wrote:

On 12/07/2018 02:25 PM, Joshua C. Colp wrote:

On Fri, Dec 7, 2018, at 9:19 AM, hw wrote:


Hi,

is cdr logging using odbc buggy?  I'im only getting an error
"cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR failed.".

Connecting with isql to the datasource given in cdr_odbc.conf works just
fine, and using the database for sippeers also works.


This message is output when the "dsn" value provided in cdr_odbc.conf does not 
match a dsn/class (context name) configured in res_odbc.conf

You should confirm they match and if still encountering a problem then provide 
the configuration.



Thanks, it's working now.  I've been using the name of the data source
rather than the name of the section.  It doesn't make any sense to call
it data source name (dsn) at places where the name of a section is expected.


The cdr_odbc module originates from 15 years ago, so it's unsurprising.


Is it not being used much?



It also doesn't make sense that the section name in res_odbc.conf should
be relevant here.  Resources (res) would be configuration information
--- the tables for this are created with alembic --- while logging
information is something else --- and the tables for it are not created
with alembic.


The resource module implements the interface to ODBC and provides/manages the 
connections. Other modules are consumers of it and thus reference it.


Then why doesn't alembic create the tables for logging as well as the 
ones for configuration information?



This could use a lot of cleanup and (or at least) much better documentation.


If you'd like to contribute documentation improvements they follow the same 
process as everything[1]. If there's wiki pages that could use improvement just 
leave a comment and after a few you'll be granted access to edit things.

[1] https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process


I would have improved a wiki page yesterday if there had been a way to 
do that.  Maybe if there were parts of the wiki for users to easily make 
comments, more users would contribute.  Who has the time and is willing 
to go through a lengthy contribution process which involves consulting 
lawyers to figure out if it is advisable to sign the license agreement 
after verifying if the agreement is even applicable in your country? 
Finding lawyers knowledgable in international copyright laws is a task 
in itself, and they're probably rather expensive ...  After that, you 
need to address privacy concerns that could be involved as well ...


I'm certainly not going to give my full name and address etc. just to 
improve a wiki page.  It's useless anyway because there's no way to 
verify if the information is true.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] how to use a database

2018-12-07 Thread Administrator TOOTAI

Le 07/12/2018 à 15:56, hw a écrit :

On 12/07/2018 03:36 PM, Administrator TOOTAI wrote:

Le 07/12/2018 à 14:32, hw a écrit :

[...]


Queues seem to be the only way to have several phones ring at once, 
or are there other ways?


Dial(SIP/Phone1&SIP/Phone2&...&SIP/Phonex,,)



Good to know, thanks!


What are the entries needed in the queue_members table when using odbc? 
Alembic made the primary key so that each queue can only have one entry 
(What is an interface here?), and there's probably a reason for that. 
How do you enter several members for a queue?  Asterisk seems to either 
rather crash than to create a queue, or to do nothing.


Why you don't just add members dynamically in a queu using 
AddQueueMember/RemoveQueueMember or even with pause/unpause members ?


BTW the above dial string has nothing to do with queue, it just a cmd 
that rings all phones at once.


--
Daniel

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] Question on WebRTC configuration

2018-12-07 Thread Dan Cropp
In the asterisk wiki instructions for Configuring Asterisk for WebRTC clients...

https://wiki.asterisk.org/wiki/display/AST/Configuring+Asterisk+for+WebRTC+Clients

"To communicate with websocket clients, Asterisk uses its built-in HTTP daemon. 
 Configure /etc/asterisk/http.conf as follows:

[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=
tlsprivatekey=
tlscafile="

What is the tlscafile setting?

When I look at the http.conf samples it doesn't mention the tlscafile setting.
I see there is a tlscafile setting in sip.conf, but I don't find this anywhere 
else.

Is the wiki web page mistaken or is this an actual http.conf setting that is 
undocumented?

Have a great day!
Dan
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] how to use a database

2018-12-07 Thread hw

On 12/07/2018 03:36 PM, Administrator TOOTAI wrote:

Le 07/12/2018 à 14:32, hw a écrit :

[...]


Queues seem to be the only way to have several phones ring at once, or 
are there other ways?


Dial(SIP/Phone1&SIP/Phone2&...&SIP/Phonex,,)



Good to know, thanks!


What are the entries needed in the queue_members table when using odbc? 
Alembic made the primary key so that each queue can only have one entry 
(What is an interface here?), and there's probably a reason for that. 
How do you enter several members for a queue?  Asterisk seems to either 
rather crash than to create a queue, or to do nothing.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] how to use a database

2018-12-07 Thread hw

On 12/07/2018 02:45 PM, Marcelo Terres wrote:

https://wiki.asterisk.org/wiki/display/AST/Managing+Realtime+Databases+with+Alembic


alembic did not create any tables for logging.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] how to use a database

2018-12-07 Thread Administrator TOOTAI

Le 07/12/2018 à 14:32, hw a écrit :

[...]


Queues seem to be the only way to have several phones ring at once, or 
are there other ways?


Dial(SIP/Phone1&SIP/Phone2&...&SIP/Phonex,,)

--
Daniel

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread Joshua C. Colp
On Fri, Dec 7, 2018, at 9:54 AM, hw wrote:
> On 12/07/2018 02:25 PM, Joshua C. Colp wrote:
> > On Fri, Dec 7, 2018, at 9:19 AM, hw wrote:
> >>
> >> Hi,
> >>
> >> is cdr logging using odbc buggy?  I'im only getting an error
> >> "cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR 
> >> failed.".
> >>
> >> Connecting with isql to the datasource given in cdr_odbc.conf works just
> >> fine, and using the database for sippeers also works.
> > 
> > This message is output when the "dsn" value provided in cdr_odbc.conf does 
> > not match a dsn/class (context name) configured in res_odbc.conf
> > 
> > You should confirm they match and if still encountering a problem then 
> > provide the configuration.
> > 
> 
> Thanks, it's working now.  I've been using the name of the data source 
> rather than the name of the section.  It doesn't make any sense to call 
> it data source name (dsn) at places where the name of a section is expected.

The cdr_odbc module originates from 15 years ago, so it's unsurprising.

> 
> It also doesn't make sense that the section name in res_odbc.conf should 
> be relevant here.  Resources (res) would be configuration information 
> --- the tables for this are created with alembic --- while logging 
> information is something else --- and the tables for it are not created 
> with alembic.

The resource module implements the interface to ODBC and provides/manages the 
connections. Other modules are consumers of it and thus reference it.
 
> 
> This could use a lot of cleanup and (or at least) much better documentation.

If you'd like to contribute documentation improvements they follow the same 
process as everything[1]. If there's wiki pages that could use improvement just 
leave a comment and after a few you'll be granted access to edit things.

[1] https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process

-- 
Joshua C. Colp
Digium - A Sangoma Company | 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread hw

On 12/07/2018 02:25 PM, Joshua C. Colp wrote:

On Fri, Dec 7, 2018, at 9:19 AM, hw wrote:


Hi,

is cdr logging using odbc buggy?  I'im only getting an error
"cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR failed.".

Connecting with isql to the datasource given in cdr_odbc.conf works just
fine, and using the database for sippeers also works.


This message is output when the "dsn" value provided in cdr_odbc.conf does not 
match a dsn/class (context name) configured in res_odbc.conf

You should confirm they match and if still encountering a problem then provide 
the configuration.



Thanks, it's working now.  I've been using the name of the data source 
rather than the name of the section.  It doesn't make any sense to call 
it data source name (dsn) at places where the name of a section is expected.


It also doesn't make sense that the section name in res_odbc.conf should 
be relevant here.  Resources (res) would be configuration information 
--- the tables for this are created with alembic --- while logging 
information is something else --- and the tables for it are not created 
with alembic.



This could use a lot of cleanup and (or at least) much better documentation.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] how to use a database

2018-12-07 Thread Marcelo Terres
https://wiki.asterisk.org/wiki/display/AST/Managing+Realtime+Databases+with+Alembic

Marcelo H. Terres 
IM: mhter...@jabber.mundoopensource.com.br
https://www.mundoopensource.com.br
https://twitter.com/mhterres
https://linkedin.com/in/marceloterres
On Fri, 7 Dec 2018 at 13:34, hw  wrote:
>
> On 12/06/2018 10:26 PM, Marcelo Terres wrote:
> > The Asterisk source has a tool to create the db
>
> Which one is that?
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] how to use a database

2018-12-07 Thread hw

On 12/06/2018 10:26 PM, Marcelo Terres wrote:

The Asterisk source has a tool to create the db


Which one is that?


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] how to use a database

2018-12-07 Thread hw

On 12/06/2018 08:43 PM, Antony Stone wrote:

On Thursday 06 December 2018 at 17:49:25, hw wrote:

How dynamic are changes made in the database?


If by "dynamic" you mean "quickly used" then the answer is "immediately".


There's a note in some configuration file saying that dynamic extensions
are deprecated and suggesting to use func_odbc instead.  This func_odbc
seems to be the most awkward way anyone could think of for this, though.


I use func_odbc in plenty of situations, but I'm not familiar with it being
recommended for managing queues.


Did I say anything about using it for queues?

Queues seem to be the only way to have several phones ring at once, or 
are there other ways?



Without seeing the "note in some configuration file" that you refer to, though,
I don't know what to say about this.


It says


"However, 

; note that using dynamic realtime extensions is not recommended anymore 
as a
; best practice; instead, you should consider writing a static dialplan 
with

; proper data abstraction via a tool like func_odbc."


in extconfig.conf.


For example, if I want to have an extension 'foobar' and want to ring
different devices depending on some factors (like time of day, for
example), can I modify the entry in the database for the device to ring
from 'bar' to 'baz', and baz will ring instead of bar from thereon?


Yes.


And IIUC the extension would use something like
'Dial(SIP/ODBC_PICK_USER(...))' after defining a query for my
..._PICK_USER function in func_odbc.conf to return what to dial
depending on the argument(s) supplied?


No comment; I don't use this feature myself.


Which feature?


How do I make asterisk reload func_odbc.conf?  Or is that not needed?


Not needed.  The whole point of configs in database tables is that they take
effect immediately without having to tell Asterisk to reload anything.


good


We did start off just talking about getting queue_log into a database table,
though.


That's why I changed the subject.  Now I started with CDR logging to the 
database because queue logging seems to be even more difficult, and it's 
not working because asterisk says "cdr_odbc.c:174 odbc_log: Unable to 
retrieve database handle.  CDR failed." while I can connect to the 
datasource given in cdr_odbc.conf with isql just fine.  I made another 
post about that, though.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread Joshua C. Colp
On Fri, Dec 7, 2018, at 9:19 AM, hw wrote:
> 
> Hi,
> 
> is cdr logging using odbc buggy?  I'im only getting an error 
> "cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR failed.".
> 
> Connecting with isql to the datasource given in cdr_odbc.conf works just 
> fine, and using the database for sippeers also works.

This message is output when the "dsn" value provided in cdr_odbc.conf does not 
match a dsn/class (context name) configured in res_odbc.conf

You should confirm they match and if still encountering a problem then provide 
the configuration.

-- 
Joshua C. Colp
Digium - A Sangoma Company | 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread hw


Hi,

is cdr logging using odbc buggy?  I'im only getting an error 
"cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR failed.".


Connecting with isql to the datasource given in cdr_odbc.conf works just 
fine, and using the database for sippeers also works.


The documentation[1] is confusing because it says freeTDS is required 
and that you must not use multiple database connectors and remains 
entirely unclear about whether odbc works at all for this and doesn't 
say what to do when you use odbc for sippeers and want to log CDRs in 
your database.



[1]: https://wiki.asterisk.org/wiki/display/AST/MSSQL+CDR+Backend

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Need for more hangup reasons in ARI?

2018-12-07 Thread Joshua C. Colp
On Thu, Dec 6, 2018, at 1:37 PM, Sebastian Damm wrote:
> Hi,
> 
> On Thu, Dec 6, 2018 at 2:44 PM Joshua C. Colp  wrote:
> > Nope. No specific reason. The ones there are what most people would use, 
> > and what those not as familiar with telephony would understand.
> 
> Thanks for the quick response. I have submitted a patch for adding
> more hangup reasons.
> 
> BTW: Is there a way to have them documented on the Wiki page instead
> of having to dig into the source code? I'd be happy to help.

The wiki documentation is derived from the Swagger JSON itself if I recall, so 
it would need to be documented there somehow and then extracted as part of that 
process. I don't have much experience with the documentation stuff itself 
outside of that, so I don't know anything further.

-- 
Joshua C. Colp
Digium - A Sangoma Company | 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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