Foniva Contact Center Software
Asterisk Experts Support

“sip show peers” for asterisk realtime

You may have notice that even if your sip peers is connected, when you run sip show peers, no see nobody.

To see it, just enable in sip.conf (section general)

rtcachefriends=yes

asterisk 1.4 vs 1.6 (PBX Core)

On our weekly topic, we will today discuss what is the difference between asterisk 1.4 and 1.6 and what you should be aware of if you want to upgrade.

So, if you need to upgrade from 1.4 to 1.6, int the pbx core :

* The ‘languageprefix’ option in asterisk.conf is now deprecated, and
the default sound file layout for non-English sounds is the ‘new
style’ layout introduced in Asterisk 1.4 (and used by the automatic
sound file installer in the Makefile).

* The ast_expr2 stuff has been modified to handle floating-point numbers.
Numbers of the format D.D are now acceptable input for the expr parser,
Where D is a string of base-10 digits. All math is now done in “long double”,
if it is available on your compiler/architecture. This was half-way between
a bug-fix (because the MATH func returns fp by default), and an enhancement.
Also, for those counting on, or needing, integer operations, a series of
‘functions’ were also added to the expr language, to allow several styles
of rounding/truncation, along with a set of common floating point operations,
like sin, cos, tan, log, pow, etc. The ability to call external functions
like CDR(), etc. was also added, without having to use the ${…} notation.

* The delimiter passed to applications has been changed to the comma (’,'), as
that is what people are used to using within extensions.conf.  If you are
using realtime extensions, you will need to translate your existing dialplan
to use this separator.  To use a literal comma, you need merely to escape it
with a backslash (’\').  Another possible side effect is that you may need to
remove the obscene level of backslashing that was necessary for the dialplan
to work correctly in 1.4 and previous versions.  This should make writing
dialplans less painful in the future, albeit with the pain of a one-time
conversion.  If you would like to avoid this conversion immediately, set
pbx_realtime=1.4 in the [compat] section of asterisk.conf.  After
transitioning, set pbx_realtime=1.6 in the same section.

* For the same purpose as above, you may set res_agi=1.4 in the [compat]
section of asterisk.conf to continue to use the ‘|’ delimiter in the EXEC
arguments of AGI applications.  After converting to use the ‘,’ delimiter,
change this option to res_agi=1.6.

* The logger.conf option ‘rotatetimestamp’ has been deprecated in favor of
‘rotatestrategy’.  This new option supports a ‘rotate’ strategy that more
closely mimics the system logger in terms of file rotation.

* The concise versions of various CLI commands are now deprecated. We recommend
using the manager interface (AMI) for application integration with Asterisk.

asterisk billing : Insert account code in call detail records (CDR)

So, in asterisk, you already have your CDR in a file or in a database.

Now, you have customers with different customer id or account code and you want to have a way to know which call belong to which customer.

You can set a channel CDR account field. At the end of the call,  when the cdr will be post in your file or database, the accountcode field will be fill.

To do so, call the following in your dialplan or agi script

exten => 1,n,Set(CDR(accountcode)=XXXXX)

Where XXXXX  should be replace by the customer account code.

You can then join that information to the one you already have in your client table or crm


Our sponsors


Asterisk Experts Support