dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

12469 Commits

Author SHA1 Message Date
tilghman c29e2a2152 Enhance AGI with several fixes:
- 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
2007-07-23 22:02:05 +00:00
file 100272d113 Clean up res_crypto module. It now uses an rwlist to keep the keys and it should also be thread safe now.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 21:42:43 +00:00
tilghman 0037bcf3f2 Missed one conversion to comma delimiter (thanks, Juggie) and add documentation on the
change to the Local channel name.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76704 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 20:27:26 +00:00
tilghman fd0b69a4e7 Merge the dialplan_aesthetics branch. Most of this patch simply converts applications
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
2007-07-23 19:51:41 +00:00
qwell b5741f9dd4 Merged revisions 76656 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76656 | qwell | 2007-07-23 13:59:28 -0500 (Mon, 23 Jul 2007) | 3 lines

Fix some incorrect softkey labels in messages.
Don't try to play dialtone in some unimplemented features.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76657 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 19:00:19 +00:00
file 0bf27c80f0 Merged revisions 76654 via svnmerge from
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
2007-07-23 18:31:06 +00:00
qwell 295fce6985 Merged revisions 76620 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10276)
........
r76620 | qwell | 2007-07-23 12:57:53 -0500 (Mon, 23 Jul 2007) | 4 lines

Don't try to queue up hold/unhold frames on a non-existent channel.

Issue 10276.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76621 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 17:58:46 +00:00
file 20d8e30a21 Merged revisions 76618 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76618 | file | 2007-07-23 14:48:51 -0300 (Mon, 23 Jul 2007) | 2 lines

Allow app_morsecode to build on PPC Linux by putting the value of the digit char in an int.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76619 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 17:49:45 +00:00
rizzo 1043987fff add two missing entries in the replica of the sip_tech that
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
2007-07-23 14:45:22 +00:00
file 6b2784bedb Merged revisions 76561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r76561 | file | 2007-07-23 11:34:21 -0300 (Mon, 23 Jul 2007) | 14 lines

Merged revisions 76560 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76560 | file | 2007-07-23 11:32:07 -0300 (Mon, 23 Jul 2007) | 6 lines

(closes issue #10236)
Reported by: homesick
Patches:
      rpid_1.4_75840.patch uploaded by homesick (license 91)
Accept Remote Party ID on guest calls.

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76563 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 14:38:35 +00:00
russell 5b1638231a Mark str2dtmfmode() as currently unused to resolve a compiler warning and
allow building under dev mode


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76562 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 14:37:26 +00:00
russell 88c6359e5b (closes issue #10271)
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
2007-07-23 14:32:04 +00:00
russell f71444708d note the debug and verbose changes in CHANGES
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76558 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 14:23:47 +00:00
russell 70476ea4aa (closes issue #10192)
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
2007-07-23 14:21:41 +00:00
rizzo 9be597bb66 introduce two functions, map_x_s() and map_s_x(), to map
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
2007-07-23 14:18:04 +00:00
russell c303e37b20 Remove an unused function to resolve a compiler warning
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76524 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 14:02:21 +00:00
file 9286652123 Use autoconf logic to determine byte swapping macro presence. This should now also use other macros if present.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76523 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 13:46:57 +00:00
rizzo c5fd13bbcd move "sip prunte realtime ..." and "sip set debug ... " to NEW_CLI style.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76521 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 13:29:06 +00:00
file ffce3b29bc Merged revisions 76519 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76519 | file | 2007-07-23 10:23:09 -0300 (Mon, 23 Jul 2007) | 6 lines

(closes issue #10268)
Reported by: mvanbaak
Patches:
      chan_skinny_openbsd.diff uploaded by mvanbaak (license 7)
Add another OS that has to use the Macros for byte ordering.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76520 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 13:24:03 +00:00
russell 76f932803e Merged revisions 76485 via svnmerge from
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
2007-07-23 12:29:46 +00:00
rizzo f94bc4e1fd Add some documentation on the sipregistry states and the
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
2007-07-23 03:10:31 +00:00
rizzo b29db1dc8c add a bit of comments on internal functions.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76458 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 02:46:10 +00:00
rizzo 5ba59b2577 rewrite "sip show {channels|subscriptions}" CLI handler
using the new-style cli format.
No functional changes, nothing to backport.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76408 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-22 21:38:26 +00:00
rizzo afb0c1dbf9 Make sip_destroy() return NULL so the caller can do things like
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
2007-07-22 21:00:10 +00:00
rizzo 76dd871e99 add two comment blocks, one on reusing nonces, and one on the handling
of an 'authpeer' local variable.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76390 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-22 20:44:06 +00:00
rizzo 70040480cf comment and slightly restructure handle_request() in the part that handles
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
2007-07-22 19:08:37 +00:00
rizzo a96340ce79 remove unused argument from handle_invite_replaces(), and also leftover
SIP_PKT_* stuff from the previous commit.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76366 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-22 18:46:52 +00:00
rizzo 956b3e9485 Cleanup of flags used in struct sip_request, moving them to
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
2007-07-22 18:41:57 +00:00
rizzo 16d792ae36 move two per-packet flags to proper variables.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76349 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-22 18:03:07 +00:00
rizzo 090dad3516 minor clarification on the usage of SIP_* flags.
Also correct some items that were misclassified.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-22 17:27:52 +00:00
rizzo 3f377c27ad document the way sipdebug works, and implement it through
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
2007-07-22 08:42:24 +00:00
rizzo 610c6562f9 move the SIP_REALTIME flag to a field in the user/peer structure.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76314 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-21 17:57:47 +00:00
rizzo 340ad4be77 Add a note to document how the temporary 'pvt' should be initialized
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
2007-07-21 17:32:00 +00:00
file 712969305d Add support for using /dev/urandom to get random numbers on systems that support it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76296 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-21 14:39:52 +00:00
rizzo 704310b667 whoops... was setting needdestroy on the wrong dialog.
(spotted by a diff with my own branch)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76279 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-21 09:35:48 +00:00
rizzo 1ba68e33ae more two more flags to proper variables: ALREADYGONE and NEEDDESTROY.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76278 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-21 09:18:50 +00:00
rizzo 098ca9176a use explicit variables for things that don't need to
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
2007-07-21 03:53:17 +00:00
rizzo e89d2140cf Use ast_str_append() instead of ast_build_string() to construct
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
2007-07-21 02:33:25 +00:00
russell f48cf7b8c2 Blocked revisions 76227 via svnmerge
................
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
2007-07-21 02:03:43 +00:00
rizzo 35344904c3 We have two 'technology' descriptors for a SIP channel, so
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
2007-07-21 01:25:13 +00:00
murf 319cd59279 One small documentation update made to accompany 10154, the upgrading of the queue ringing to allow periodic announcments
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76222 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-21 01:08:46 +00:00
rizzo 07754d5dfd Enhance NAT support as discussed on the -dev list, i.e.:
+ 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
2007-07-21 01:01:10 +00:00
murf 68d069e410 This update was supplied in 10154; to allow announcemnts if the 'r' option (ringing) is provided.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76220 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-21 00:57:00 +00:00
qwell 29046eb9c5 Add support for default "say mode" (whether to use the "old" method or "new" method. "new" method being config file)
Add support for autocomplete of "say load" CLI command.

Patch by IgorG
(closes issue #10243)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76216 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-20 22:25:41 +00:00
murf bbea177387 Merged revisions 76211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76211 | murf | 2007-07-20 15:36:05 -0600 (Fri, 20 Jul 2007) | 1 line

This patch from 10249 is worth applying! It prevents downloading sound files if they are already downloaded. Darn Practical, if you ask me
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76213 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-20 21:41:51 +00:00
qwell f1473a9ffc Blocked revisions 76178 via svnmerge
........
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
2007-07-20 21:04:27 +00:00
qwell d5185892d3 Blocked revisions 76176 via svnmerge
........
r76176 | qwell | 2007-07-20 15:54:10 -0500 (Fri, 20 Jul 2007) | 2 lines

Eliminate a compiler warning with gcc 4.2 by constifying a char *

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76177 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-20 20:56:07 +00:00
qwell f9dbcf1104 Merged revisions 76174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76174 | qwell | 2007-07-20 15:32:55 -0500 (Fri, 20 Jul 2007) | 2 lines

It's possible for sub->owner to be NULL here if you cancel the call immediately after/during sending a digit.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76175 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-20 20:33:34 +00:00
mmichelson 2d468a95ee Merged revisions 76139 via svnmerge from
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
2007-07-20 18:44:30 +00:00
russell 03564a690f Merged revisions 76132 via svnmerge from
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
2007-07-20 18:28:15 +00:00