[asterisk-users] ARA: realtime: sip.conf: context

2013-12-03 Thread Brian LaVallee

The answer is probably no, but I would like someone else to confirm it.

When using The Asterisk RealTime Architecture, can context work in 
sip.conf like it does for extensions.conf ?


switch = Realtime/[context]@[family][/options]

More specific, is there a way to use a single table and limit the query 
results to a specific subset for sip.conf ?

I know this can be solved using VIEW in MySQL, but I want to avoid that.

WORKS: SELECT * FROM extensions.conf WHERE context = [context];
DOES NOT WORK: SELECT * from sip.conf WHERE context = [context];

Below, you can see how it works for extensions and does NOT work on the 
context field of the sippeers table, is there any field that can be used?



Sincerely,
Brian LaVallee


---===
;# extconfig.conf
;
[settings]
;
sippeers = mysql,database,sippeers
moresippeers = mysql,database,moresippeers
extensions = mysql,database,extensions
other = mysql,database,other
;
; end===---

---===
;# extensions.conf
;
[unique85]
;
switch = Realtime
; Equivalent to: SELECT * FROM database.extensions WHERE context = 
unique85;

; - uses current [this] context.
;
switch = Realtime/limited@extensions
; Equivalent to: SELECT * FROM database.extensions WHERE context = 
limited;

;
switch = Realtime/specific@other
; Equivalent to: SELECT * FROM database.other WHERE context = specific;
;
; end ===---

---===
;# sip.conf
;
[general]
;
switch = Realtime
; Equivalent to: SELECT * FROM database.sippeers;
;
switch = Realtime/anything@moresippeers
; Equivalent to: SELECT * FROM database.moresippeers;
; NOT EQUIVALENT TO: SELECT * FROM database.moresippeers WHERE context = 
anything;

;
; end ===---

-- 
_
-- 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

[asterisk-users] ARA : Realtime or not ?

2010-07-06 Thread Jonas Kellens

Hello list,

what is the use of realtime SIP peers when you always need to reload the 
sip configuration as if you were just putting your SIP peers in sip.conf ??


My SIP peers are now defined in a mysql-DB and when I add a mailbox in 
the field 'mailbox', the change is not active untill a do a sip reload 
or a module reload chan_sip.so.


Doing a sip reload or a module reload chan_sip.so makes that all the 
SIP peers need to re-register again to Asterisk so that they are 
'available' again.


So what is realtime about the ARA ??


Kind regards,

Jonas.
-- 
_
-- 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] ARA : Realtime or not ?

2010-07-06 Thread Ishfaq Malik

On 06/07/10 10:34, Jonas Kellens wrote:

Hello list,

what is the use of realtime SIP peers when you always need to reload 
the sip configuration as if you were just putting your SIP peers in 
sip.conf ??


My SIP peers are now defined in a mysql-DB and when I add a mailbox in 
the field 'mailbox', the change is not active untill a do a sip 
reload or a module reload chan_sip.so.


Doing a sip reload or a module reload chan_sip.so makes that all 
the SIP peers need to re-register again to Asterisk so that they are 
'available' again.


So what is realtime about the ARA ??


Kind regards,

Jonas.
If you are using RealTime and make any changes to a peer entry in your 
DB you need to prune the peer from the realtime cache using


sip prune realtime peer name

The peer will need to re register but only that one and it will pick up 
the updated settings from the DB


Ish
--
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062
-- 
_
-- 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] ARA : Realtime or not ?

2010-07-06 Thread Steve Howes
On 6 Jul 2010, at 10:34, Jonas Kellens wrote:
 what is the use of realtime SIP peers when you always need to reload the sip 
 configuration as if you were just putting your SIP peers in sip.conf ??

Did you enable caching by any chance?

S
-- 
_
-- 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] ARA : Realtime or not ?

2010-07-06 Thread Jonas Kellens

Hello,

this is my configuration :


;- REALTIME SUPPORT 


; For additional information on ARA, the Asterisk Realtime Architecture,
; please read realtime.txt and extconfig.txt in the /doc directory of the
; source code.
;
rtcachefriends=yes ; Cache realtime friends by adding them 
to the internal list
; just like friends added from the 
config file only on a

; as-needed basis? (yes|no)

;rtsavesysname=yes  ; Save systemname in realtime database 
at registration

; Default= no

;rtupdate=yes   ; Send registry updates to database 
using realtime? (yes|no)
; If set to yes, when a SIP UA 
registers successfully, the ip address,
; the origination port, the 
registration period, and the username of
; the UA will be set to database via 
realtime.
; If not present, defaults to 'yes'. 
Note: realtime peers will
; probably not function across reloads 
in the way that you expect, if

; you turn this option off.
;rtautoclear=yes; Auto-Expire friends created on the fly 
on the same schedule
; as if it had just registered? 
(yes|no|seconds)
; If set to yes, when the registration 
expires, the friend will
; vanish from the configuration until 
requested again. If set
; to an integer, friends expire within 
this number of seconds

; instead of the registration interval.

;ignoreregexpire=yes; Enabling this setting has two functions:
;
; For non-realtime peers, when their 
registration expires, the
; information will _not_ be removed 
from memory or the Asterisk database
; if you attempt to place a call to the 
peer, the existing information
; will be used in spite of it having 
expired

;
; For realtime peers, when the peer is 
retrieved from realtime storage,
; the registration information will be 
used regardless of whether
; it has expired or not; if it expires 
while the realtime peer
; is still in memory (due to caching or 
other reasons), the
; information will not be removed from 
realtime storage




Kind regards,

Jonas.



On 07/06/2010 11:56 AM, Steve Howes wrote:

Did you enable caching by any chance?

S
   
-- 
_
-- 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] ARA : Realtime or not ?

2010-07-06 Thread Jonas Kellens

On 07/06/2010 12:00 PM, Ishfaq Malik wrote:

On 06/07/10 10:34, Jonas Kellens wrote:

Hello list,

what is the use of realtime SIP peers when you always need to reload 
the sip configuration as if you were just putting your SIP peers in 
sip.conf ??


My SIP peers are now defined in a mysql-DB and when I add a mailbox 
in the field 'mailbox', the change is not active untill a do a sip 
reload or a module reload chan_sip.so.


Doing a sip reload or a module reload chan_sip.so makes that all 
the SIP peers need to re-register again to Asterisk so that they are 
'available' again.


So what is realtime about the ARA ??


Kind regards,

Jonas.
If you are using RealTime and make any changes to a peer entry in your 
DB you need to prune the peer from the realtime cache using


sip prune realtime peer name

The peer will need to re register but only that one and it will pick 
up the updated settings from the DB


Ish
--
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062



OK, that's when changing peer-attributes.

What can I do when adding new peers to the database ??


Kind regards,

Jonas.

-- 
_
-- 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] ARA : Realtime or not ?

2010-07-06 Thread Ishfaq Malik

On 06/07/10 11:26, Jonas Kellens wrote:

On 07/06/2010 12:00 PM, Ishfaq Malik wrote:

On 06/07/10 10:34, Jonas Kellens wrote:

Hello list,

what is the use of realtime SIP peers when you always need to reload 
the sip configuration as if you were just putting your SIP peers in 
sip.conf ??


My SIP peers are now defined in a mysql-DB and when I add a mailbox 
in the field 'mailbox', the change is not active untill a do a sip 
reload or a module reload chan_sip.so.


Doing a sip reload or a module reload chan_sip.so makes that all 
the SIP peers need to re-register again to Asterisk so that they are 
'available' again.


So what is realtime about the ARA ??


Kind regards,

Jonas.
If you are using RealTime and make any changes to a peer entry in 
your DB you need to prune the peer from the realtime cache using


sip prune realtime peer name

The peer will need to re register but only that one and it will pick 
up the updated settings from the DB


Ish
--
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062



OK, that's when changing peer-attributes.

What can I do when adding new peers to the database ??


Kind regards,

Jonas.

You don't need to do anything when adding new peers to the database, 
when the peer first tries to register the config will be taken from the 
DB and put into the realtime cache. You can see the exact config of any 
peer in the cache by doing the following in the console


sip show peer peer name

Seeing that might help, I know it did for me.

Ish
--
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062
-- 
_
-- 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