[asterisk-users] Comparison of PJSIP and SIP in Asterisk database
Matthew Jordan
mjordan at digium.com
Tue Mar 6 17:11:58 CST 2018
On Tue, Mar 6, 2018 at 2:43 AM, Olivier <oza.4h07 at gmail.com> wrote:
> Hello,
>
> I'm currently trying to configure a passive Asterisk instance that must
> backup an active Asterisk instance.
> Each instance is connected this way:
> PSTN <---> Gateway <-- SIP --> Asterisk <-- SIP --> endpoints or IPBXs
>
> Most endpoints connect through registration.
>
> With chan_sip, Asterisk saved registration data in its database with lines
> such as:
> /SIP/Registry/spa3102 : 192.168.64.207:5060:
> 3600:7013:sip:spa3102 at 192.168.64.207:5060
>
> Reading such lines in active instance and copying them back in passive
> instance, I think you had a mean to have a passive instance ready to treat
> calls coming from PSTN as soon as it would become active (I never
> experimented with this).
>
> Now, with PJSIP, Asterisk saves registration data with lines such as :
> /registrar/contact/foobar: {"via_addr": ... }
>
>
>
> Have you tried to copy such registration data from one instance to an
> aother one ?
> What happened then ?
>
> Best regards
>
>
Well.......
First, you should probably just use a database that is not running on the
same instance as Asterisk. You're assuming that when Asterisk dies on an
instance that it's only Asterisk that is having a problem - in more
critical failures, the AstDB (SQLite3) is going to be long gone as well. In
less critical (but still severe) failures, Asterisk will probably just be
restarted via safe_asterisk or something similar. With an external database
such as MySQL/PostreSQL, you can have one instance of Asterisk store the
registration information in the database (using Sorcery/realtime), and, if
it dies, have a spare start up and use the same database for its backing
storage. It will pick up the registration information, endpoint objects,
etc.
That being said: yes, if you can find a way to get that JSON blob from one
AstDB into another - and yes, there are ways that are sneaky but mostly
involve shenanigans and/or custom code - than a second instance of Asterisk
will understand and read that JSON just fine. Assuming it was told to get
that information from its AstDB via Sorcery as well.
--
Matthew Jordan
Digium, Inc. | CTO
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180306/3c51b7e1/attachment.html>
More information about the asterisk-users
mailing list