- Makes the structures handling external AGI commands a bit more thread-safe
- Makes AGI transparently work with both live and hungup channels
- DeadAGI is hence no longer necessary and is deprecated
- CLI bug fixes
- Commands will refuse to run if the channel is dead and the command is nonsensical
for dead channels.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76707 f38db490-d61c-443f-a65b-d21fe96a405b
using old methods of parsing arguments to using the standard macros. However, the big
change is that the really old way of specifying application and arguments separated by
a comma will no longer work (e.g. NoOp,foo|bar). Instead, the way that has been
recommended since long before 1.0 will become the only method available (e.g. NoOp(foo,bar).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76703 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r76654 | file | 2007-07-23 15:29:48 -0300 (Mon, 23 Jul 2007) | 12 lines
Merged revisions 76653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r76653 | file | 2007-07-23 15:28:13 -0300 (Mon, 23 Jul 2007) | 4 lines
(closes issue #5866)
Reported by: tyler
Do not force channel format changes when a generator is present. The generator may have changed the formats itself and changing them back would cause issues.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76655 f38db490-d61c-443f-a65b-d21fe96a405b
does not use DTMF BEGIN frames.
1.4 seems correct (it does not have the two fields).
However, as this bug shows, the current way of creating the sip_tech
replica is too error-prone, one can easily forget to update one of
the two entries. Perhaps it would be better to create sip_tech_info
expliclty at module load, by doing
sip_tech_info = sip_tech;
sip_tech_info.send_digit_begin = NULL
(in this case, this is something applicable to 1.4 as well).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76564 f38db490-d61c-443f-a65b-d21fe96a405b
Reported by: snuffy
Patches:
doxygen-updates.diff uploaded by snuffy (license 35)
Another big batch of doxygen documentation updates
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76559 f38db490-d61c-443f-a65b-d21fe96a405b
Reported by: bbryant
Patches:
20070720__core_debug_by_file.patch uploaded by bbryant (license 36)
(with some modifications by me)
Tested by: russell, bbryant
This set of changes introduces the ability to set the core debug or verbose
levels on a per-file basis. Interestingly enough, in 1.4, you have the ability
to set core debug for a single file, but that functionality was accidentally
lost in the conversion of the CLI commands to the new format.
This patch improves upon what was in 1.4 by letting you set it for more than 1
file, and by also supporting verbose.
*** Janitor Project ***
This patch also introduces a new macro, ast_verb(), which is similar
to ast_debug(). Setting the per file verbose value only works for messages that
use this macro. Converting existing uses of ast_verbose() can be done like:
if (option_debug > 2)
ast_verbose(VERBOSE_PREFIX_3 "Something useful\n");
...
ast_verb(3, "Something useful\n");
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76555 f38db490-d61c-443f-a65b-d21fe96a405b
between integers and strings using a single translation table,
and use them in a few places instead of ad-hoc routines
that duplicate the table.
On passing, note that REFER_CONFIRMED is never used, and add a
few comments.
Nothing to backport here.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76547 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r76485 | russell | 2007-07-23 07:25:01 -0500 (Mon, 23 Jul 2007) | 6 lines
Use a signed integer for storing the number of bytes in the packet read from
the network. Using an unsigned value here made it impossible to handle an
error returned from recvfrom(). Furthermore, in the case that recvfrom()
did return an error, this would cause a crash due to a heap overflow.
(closes issue #10265, reported by and fix suggested by timrobbins)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76486 f38db490-d61c-443f-a65b-d21fe96a405b
handling of the sip_register structures.
This commit only changes comments and whitespace.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76467 f38db490-d61c-443f-a65b-d21fe96a405b
foo = sip_destroy(foo);
and reduce the chance of bugs due to dangling pointers.
Also remove a duplicate prototype for the function.
nothing to backport.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76392 f38db490-d61c-443f-a65b-d21fe96a405b
responses, so that there is a common exit point.
Mark two places where probably we could return -1 instead of 0 to report
an error to the caller.
(change triggered by investigations on how the 'SIP_PKT_IGNORE' field was used).
nothing to backport from this commit
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76371 f38db490-d61c-443f-a65b-d21fe96a405b
individual variables. Apart from SIP_PKT_IGNORE which was used
a zillion times, the other two are used seldom.
On passing:
- move the arrays to the end of struct sip_request, so a (small)
buffer overflow is less likely to overwrite the other fields;
- note that the 'ignore' argument to handle_invite_replaces() is not
used and should be removed (will be done in a separate commit).
Nothing to backport in this change.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76365 f38db490-d61c-443f-a65b-d21fe96a405b
variables and not flags.
NOTE:
The old behaviour (preserved in this commit) is that if sipdebug
is set in the config file, it can only be disabled by reloading the
config. I am not sure if this is accidental or voluntary, but it
is really unconvenient and I think it should be handled in the same
way as other options i.e. consider requests from the config file
or the cli (or the command line) to be fully equivalent and act on
the same status variable.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76330 f38db490-d61c-443f-a65b-d21fe96a405b
before using it.
I am unclear on the details right now so i hope someone can comment
more. The obvious (and lazy) approach would be to bzero() all of it
(except for the string pool), but isn't that too much work ?
Feedback wanted here...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76313 f38db490-d61c-443f-a65b-d21fe96a405b
be stored in ast_flags. First victim is 'SIP_NO_HISTORY'
replaced by a 'do_history' field in the sip_pvt structure.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76231 f38db490-d61c-443f-a65b-d21fe96a405b
the sdp messages. Overall the code is slightly more readable
(because the string is fully described by a single pointer),
and more efficient (because the length is stored explicitly
so you don't need to do strlen()).
(I have been using this code for almost a year now.)
I wish we had infix string operators to do this sort of things!
Nothing to backport from this change.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76229 f38db490-d61c-443f-a65b-d21fe96a405b
................
r76227 | russell | 2007-07-20 21:02:54 -0500 (Fri, 20 Jul 2007) | 12 lines
Merged revisions 76226 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r76226 | russell | 2007-07-20 21:01:46 -0500 (Fri, 20 Jul 2007) | 4 lines
Backport a fix for a memory leak that was fixed in trunk in reivision 76221
by rizzo. The memory used for the localaddr list was not freed during a
configuration reload.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76228 f38db490-d61c-443f-a65b-d21fe96a405b
define and use a macro to determine whether we are pointing to
one of them, so when one goes away (or a new one appears) we don't
have to touch all the code.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76224 f38db490-d61c-443f-a65b-d21fe96a405b
+ extensive documentation changes both in sip.conf.sample and in the source;
+ allow "externip" and "externhost" to include a port number as well;
+ allow "bindaddr" to have a port number (making bindport unnecessary,
even though it is still present for backward compatibility);
+ introduce the new "stunaddr" parameter to specify an STUN server to
be used from the main SIP socket;
+ extend the "sip show settings" output to show all the above.
Internally:
+ change related data structures from struct in_addr to struct sockaddr_in
to store the port numbers as well;
+ reorganize ast_sip_ouraddrfor() (should also be renamed to sip_ouraddrfor()
because it is not a generic API, though it might become so if called with
a socket as an additional argument, in which case it can be moved elsewhere).
As mentioned in the documentation, media sessions still do not use STUN so the
port numbers may still be incorrect when Asterisk is behind a NAT
On passing, some of the debugging messages printing media addresses are
probably using the wrong values, but this will be checked/fixed in a
subsequent commit if needed.
Part of the following chunk in the function that handles a "sip reload" is
probably needed on previous versions as well, to avoid leaking the memory
used for the "localaddr" list:
@@ -17244,13 +17274,17 @@
/* Reset IP addresses */
memset(&bindaddr, 0, sizeof(bindaddr));
+ memset(&stunaddr, 0, sizeof(stunaddr));
+ memset(&internip, 0, sizeof(internip));
+ /* Free memory for local network address mask */
+ ---> ast_free_ha(localaddr); <-----
memset(&localaddr, 0, sizeof(localaddr));
memset(&externip, 0, sizeof(externip));
memset(&default_prefs, 0 , sizeof(default_prefs));
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76221 f38db490-d61c-443f-a65b-d21fe96a405b
........
r76178 | qwell | 2007-07-20 16:03:57 -0500 (Fri, 20 Jul 2007) | 7 lines
Allow getting a call from an existing "sub" channel.
Cancel ringing if endpoint hangs up before answering.
Fixes were backported from trunk (there was apparently a bit of confusion during merge of a previous patch).
(closes issue #10241)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76179 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r76139 | mmichelson | 2007-07-20 13:42:27 -0500 (Fri, 20 Jul 2007) | 6 lines
When using users.conf for the entries in the directory, if multiple users had the same last name, only the first user listed would be available
in the directory.
(closes issue #10200, reported by mrskippy, patched by me)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76140 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r76132 | russell | 2007-07-20 13:22:24 -0500 (Fri, 20 Jul 2007) | 6 lines
Use the define that specifies the default length of an artificially created
DTMF digit in the ast_senddigit() function. The define is set to 100ms by
default, which is the same thing that this function was using. But, using
the define lets changes take effect in this case, as well as the others where
it was already used.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76138 f38db490-d61c-443f-a65b-d21fe96a405b