Commit Graph

4594 Commits

Author SHA1 Message Date
Joshua Colp 1e12db06da (closes issue #10565)
Reported by: tootai
Make sure the external IP address has the standard SIP port set for when the user does not specify the port in the externip setting.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 21:17:21 +00:00
Russell Bryant ee7a6c0851 Merged revisions 81383 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81383 | russell | 2007-08-30 10:38:29 -0500 (Thu, 30 Aug 2007) | 3 lines

Add missing checks for the PTRACING define.
(closes issue #10559, paravoid)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 15:40:18 +00:00
Christian Richter df04684a2c Merged revisions 81373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81373 | crichter | 2007-08-30 16:43:33 +0200 (Do, 30 Aug 2007) | 1 line

Fixed some warnings.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 14:54:30 +00:00
Christian Richter 16696af3df Merged revisions 81367 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81367 | crichter | 2007-08-30 10:31:59 +0200 (Do, 30 Aug 2007) | 11 lines

Fixed a severe issue where a misdn_read would lock the channel, but read would
not return because it blocks. later chan_misdn would try to queue a frame like
a AST_CONTROL_ANSWER which could result in a deadlock situation. misdn_read
will now not block forever anymore, and we don't queue the ANSWER frame at all
when we already was called with misdn_answer -> answer would be called twice.

Also we don't explicitly send a RELEASE_COMPLETE on receiption of a RELEASE
anymore, because mISDN does that for us, this resulted in a problem on some
switches, which would block our port after some calls for a short while.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 08:50:44 +00:00
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 20:55:40 +00:00
Tilghman Lesher 6bdc66e9b0 Changed one too many variable settings in issue #9315 (closes issue #10592)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 15:21:10 +00:00
Joshua Colp ee6f91968c Merged revisions 81331 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81331 | file | 2007-08-29 11:13:55 -0300 (Wed, 29 Aug 2007) | 4 lines

(closes issue #9690)
Reported by: mattv
Make rtp timeouts work even if two RTP streams are directly bridged in the RTP stack.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 14:16:07 +00:00
Russell Bryant 225d9166ec Merged revisions 81291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81291 | russell | 2007-08-28 16:38:26 -0500 (Tue, 28 Aug 2007) | 3 lines

Change the message about receiving a mini-frame before the first full voice
frame to a DEBUG message.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 21:39:36 +00:00
Mark Michelson 8b0c744786 Merged revisions 81120 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81120 | mmichelson | 2007-08-27 16:08:48 -0500 (Mon, 27 Aug 2007) | 7 lines

DTMF begin frames should be ignored so that when an agent acks a call with the '#' key,
he doesn't cause a queue's announce file to be interrupted. Also went ahead and did the
same for the '*' key and for ending a call.

(closes issue #10528, reported by deskhack, patched by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 21:09:37 +00:00
Joshua Colp 263b77634a Merged revisions 81012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81012 | file | 2007-08-27 12:01:59 -0300 (Mon, 27 Aug 2007) | 6 lines

(closes issue #10561)
Reported by: jesselang
Patches:
      chan_sip-ChannelReload-20080825.patch uploaded by jesselang (license 202)
Remove an extra \r\n to make the ChannelReload event conform with every other event.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 15:03:41 +00:00
Joshua Colp 12894ee728 Remove places that say if no language is specified it will default to english... since on some setups this is untrue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 13:35:16 +00:00
Russell Bryant d3687bdb93 Merged revisions 80932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80932 | russell | 2007-08-26 13:11:26 -0500 (Sun, 26 Aug 2007) | 3 lines

Remove an extra signal_condition() for the scheduler thread.
(closes issue #10564, patch from casper)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-26 18:12:58 +00:00
Russell Bryant 7c41c3a5bc Merged revisions 80895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80895 | russell | 2007-08-25 12:37:39 -0500 (Sat, 25 Aug 2007) | 7 lines

Fix some issues with the handling of the scheduler in chan_iax2.  Most of the
places that scheduled items to be executed by the scheduler thread did not
signal the scheduler thread to wake up so that it could recalculate the time
until the next action.  These changes will make the scheduler thread more
responsive and ensure that actions get executed as close to when intended as
possible instead of it being possible for very long delays.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-25 17:55:45 +00:00
Russell Bryant 700b5d8442 Merged revisions 80849 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80849 | russell | 2007-08-24 16:22:50 -0500 (Fri, 24 Aug 2007) | 5 lines

If dnsmgr is in use, and no DNS servers are available when Asterisk first
starts, then don't give up on poking peers.  Allow the poke to get rescheduled
so that it will work once the dnsmgr is able to resolve the host.
(closes issue #10521, patch by jamesgolovich)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 21:23:14 +00:00
Matthew Fredrickson 3616eb166f Add VMWI chan_zap support #9909
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 18:05:11 +00:00
Philippe Sultan fce77d7d6a Merged revisions 80661 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80661 | phsultan | 2007-08-24 13:42:46 +0200 (Fri, 24 Aug 2007) | 9 lines

Closes issue #10509

Googletalk calls are answered too early, which results in CDRs wrongly
stating that a call was ANSWERED when the calling party cancelled a
call before before being established.

We must not answer the call upon reception of a 'transport-accept' iq
packet, but this packet still needs to be acknowledged, otherwise the
remote peer would close the call (like in #8970).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 11:49:36 +00:00
Kevin P. Fleming b16f018d96 Merged revisions 80501 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80501 | kpfleming | 2007-08-23 12:08:25 -0500 (Thu, 23 Aug 2007) | 2 lines

report the actual channel number that was unregistered, instead of assuming that the interface list consists of channels 1 through <x> with no gaps in the sequence

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 17:18:29 +00:00
Russell Bryant 488cd9a7a6 Merged revisions 80499 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80499 | russell | 2007-08-23 12:02:50 -0500 (Thu, 23 Aug 2007) | 3 lines

Fix some code where it was possible for a reference to a peer to not get
released when it should.  Thank you to Marta Carbone for pointing this out!

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 17:04:04 +00:00
Joshua Colp ed9306ba42 If no default language has been specified print out that it will default to english when using sip show peer or sip show user.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 15:48:35 +00:00
Russell Bryant f6f9c14723 allow peers and users to go into a hash table
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 21:35:08 +00:00
Russell Bryant eb6813cce3 Merged revisions 80390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80390 | russell | 2007-08-22 16:00:44 -0500 (Wed, 22 Aug 2007) | 3 lines

Don't crash when using realtime in chan_sip without an insecure setting in the database.
(closes issue #10348, reported by link55, fixed by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 21:03:27 +00:00
Russell Bryant f04ed4641b Unsubscribe from MWI events in the peer destructor
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 20:46:16 +00:00
Russell Bryant 50d7fc81aa Merged revisions 80362 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80362 | russell | 2007-08-22 15:21:36 -0500 (Wed, 22 Aug 2007) | 34 lines

Merge changes from team/russell/iax_refcount.

This set of changes fixes problems with the handling of iax2_user and iax2_peer
objects.  It was very possible for a thread to still hold a reference to one of
these objects while a reload operation tries to delete them.  The fix here is to
ensure that all references to these objects are tracked so that they can't go away
while still in use.

To accomplish this, I used the astobj2 reference counted object model.  This
code has been in one of Luigi Rizzo's branches for a long time and was primarily
developed by one of his students, Marta Carbone.  I wanted to go ahead and bring
this in to 1.4 because there are other problems similar to the ones fixed by these
changes, so we might as well go ahead and use the new astobj if we're going to go
through all of the work necessary to fix the problems.

As a nice side benefit of these changes, peer and user handling got more efficient.
Using astobj2 lets us not hold the container lock for peers or users nearly as long
while iterating.  Also, by changing a define at the top of chan_iax2.c, the objects
will be distributed in a hash table, drastically increasing lookup speed in these
containers, which will have a very big impact on systems that have a large number of
users or peers.

The use of the hash table will be made the default in trunk.  It is not the default
in 1.4 because it changes the behavior slightly.  Previously, since peers and users
were stored in memory in the same order they were specified in the configuration file,
you could influence peer and user matching order based on the order they are specified
in the configuration.  The hash table does not guarantee any order in the container,
so this behavior will be going away.  It just means that you have to be a little
more careful ensuring that peers and users are matched explicitly and not forcing
chan_iax2 to have to guess which user is the right one based on secret, host, and
access list settings, instead of simply using the username.

If you have any questions, feel free to ask on the asterisk-dev list.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 20:44:23 +00:00
Russell Bryant 8a2dd1d145 Merged revisions 80183 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80183 | russell | 2007-08-21 13:42:15 -0500 (Tue, 21 Aug 2007) | 7 lines

Don't record SIP dialog history if it's not turned on.  Also, put an upper
limit on how many history entires will be stored for each SIP dialog.  It is
currently set to 50, but can be increased if deemed necessary.
(closes issue #10421, closes issue #10418, patches suggested by jmoldenhauer,
 patches updated by me)
(Security implications documented in AST-2007-020)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21 18:49:23 +00:00
Russell Bryant eaac379751 Merged revisions 80132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80132 | russell | 2007-08-21 10:22:22 -0500 (Tue, 21 Aug 2007) | 3 lines

Don't try to dereference the owner channel when it may not exist
(issue #10507, maxper)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21 15:23:12 +00:00
Joshua Colp 65e4c80d48 Fix random segfault issue when loading chan_zap. Trying to access a configuration structure that has already been destroyed is bad, mmmk?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 14:15:30 +00:00
Joshua Colp 477e7dcbc7 (closes issue #10495)
Reported by: stevedavies
Make sure context pointer is valid or else chan_iax2 will go kaboom.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 00:54:19 +00:00
Joshua Colp 9471a4ec08 Fix building of trunk. I'm doing work on a Sunday night just to avoid watching Snakes on a Plane which my roommate is watching.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 00:37:12 +00:00
Tilghman Lesher 749b67bd1d We weren't properly encapsulating the mtime ignores of config files (closes issue #10488)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-18 13:52:44 +00:00
Russell Bryant 57d5934e5d Merged revisions 79912 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79912 | russell | 2007-08-17 16:01:43 -0500 (Fri, 17 Aug 2007) | 4 lines

Avoid a crash in the handling of DTMF based Caller ID.  It is valid for
ast_read to return NULL in the case that the channel has been hung up.
(crash reported by anonymouz666 on IRC in #asterisk-dev)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 21:04:33 +00:00
Jason Parker 100e2387db Merged revisions 79904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10430)
........
r79904 | qwell | 2007-08-17 14:12:19 -0500 (Fri, 17 Aug 2007) | 11 lines

Don't send a semicolon over the wire in sip notify messages.
Caused by fix for issue 9938.

I basically took the code that existed before 9938 was fixed, and
 copied it into a new function - ast_unescape_semicolon

There should be very few places this will be needed (pbx_config
 does NOT need this (see issue 9938 for details))

Issue 10430, patch by me, with help/ideas from murf (thanks murf).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 19:13:25 +00:00
Jason Parker 0e83c80480 Merged revisions 79902 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10485)
........
r79902 | qwell | 2007-08-17 12:44:22 -0500 (Fri, 17 Aug 2007) | 4 lines

Re-add the setting of callerid name and number.

Issue 10485, reported by and fix explained by paradise.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 17:45:01 +00:00
Russell Bryant c67f7fd3da Make use of ast_sched_replace() in some places in chan_iax2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 14:14:59 +00:00
Russell Bryant f5bf66bcd7 This commit adds a scheduler API call, ast_sched_replace that can be used
in place of a very common construct.  I also used it in a number of places
in chan_sip.

  if (id > -1)
     ast_sched_del(sched, id);
  id = ast_sched_add(sched, ...);

changes to:

  ast_sched_replace(id, sched, ...);


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 14:07:44 +00:00
Russell Bryant 9d54c14278 Merged revisions 79857 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79857 | russell | 2007-08-17 08:37:08 -0500 (Fri, 17 Aug 2007) | 5 lines

Fix some crashes in chan_sip.  This patch changes various places that add items
to the scheduler to ensure that they don't overwrite the ID of a previously
scheduled item.  If there is one, it should be removed.
(closes issue #10391, closes issue #10256, probably others, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 13:39:17 +00:00
Christian Richter 7ee8772e2d Merged revisions 79833 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79833 | crichter | 2007-08-17 10:22:36 +0200 (Fr, 17 Aug 2007) | 1 line

sometimes we don't need to signal dtmf tones to asterisk, we just want them to go through as inband. Otherwise they might be generated by the other channel partner and then there is a double tone.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 08:29:56 +00:00
Joshua Colp ecff1370fb Fix building of chan_zap under development mode without libpri and libss7 installed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 01:19:04 +00:00
Russell Bryant 0b44b92cf5 Merged revisions 79756 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79756 | russell | 2007-08-16 16:29:24 -0500 (Thu, 16 Aug 2007) | 11 lines

Fix more deadlocks in chan_iax2 that were introduced by making frame handling
and scheduling multi-threaded.  Unfortunately, we have to do some expensive
deadlock avoidance when queueing frames on to the ast_channel owner of the IAX2
pvt struct.  This was already handled for regular frames, but ast_queue_hangup
and ast_queue_control were still used directly.  Making these changes introduced
even more places where the IAX2 pvt struct can disappear in the context of a
function holding its lock due to calling a function that has to unlock/lock it
to avoid deadlocks.  I went through and fixed all of these places to account for
this possibility.
(issue #10362, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:33:38 +00:00
Mark Michelson ff7c41753f Merged revisions 79748 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79748 | mmichelson | 2007-08-16 16:16:40 -0500 (Thu, 16 Aug 2007) | 8 lines

Fixes a problem where agents would get stuck busy due to their wrapuptime being longer than the queue's wrapuptime and
ringinuse=no for the queue.

(closes issue #10215, reported by Doug, repaired by me)

Special thanks to fkasumovic for pointing out the source of the problem and to bweschke for helping to come up with a solution!


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:21:35 +00:00
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00
Dwayne M. Hubbard 6186647ac3 added counter for iax2 show registry CLI output, closes issue 10461, thanks junky
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 18:23:39 +00:00
Christian Richter a3a32e6675 Merged revisions 79642 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79642 | crichter | 2007-08-16 10:21:21 +0200 (Do, 16 Aug 2007) | 1 line

0x80 + protocol is wrong for USERUSER when we want to send IA5 Chars.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 09:22:23 +00:00
Joshua Colp 3512cefb10 Merged revisions 79523 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79523 | file | 2007-08-15 11:18:44 -0300 (Wed, 15 Aug 2007) | 6 lines

(closes issue #10456)
Reported by: irroot
Patches:
      sip_timeout.patch uploaded by irroot (license 52)
Change hardcoded timer value to defined value. I'm doing this in 1.4 as well so if it needs to be changed in the future this place would not have been forgotten.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 14:20:36 +00:00
Christian Richter 8d6b33c64b Merged revisions 78936 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78936 | crichter | 2007-08-10 15:24:03 +0200 (Fr, 10 Aug 2007) | 1 line

fixed a bug with the useruser information element. We send them now also in the disconnect message.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 11:27:51 +00:00
Russell Bryant 4b584bbdf7 Merged revisions 79470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79470 | russell | 2007-08-14 13:49:10 -0500 (Tue, 14 Aug 2007) | 2 lines

Fix another spot where an iax2_peer would be leaked if realtime was in use.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 18:50:12 +00:00
Russell Bryant 4e038cdc7c Merged revisions 79436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79436 | russell | 2007-08-14 12:31:39 -0500 (Tue, 14 Aug 2007) | 3 lines

Fix some memory leaks throughout chan_iax2 related to the use of realtime.
I found these while working on iax2_peer object reference tracking.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 17:33:12 +00:00
Steve Murphy 4f98b05cd5 Don't ask me why, but waitfordigit will immediately return a 1 on my system, unless the outfd is initialized to -1 before calling the nandfds func
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 13:46:58 +00:00
Russell Bryant e05da8e948 Merged revisions 79301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79301 | russell | 2007-08-13 15:37:50 -0500 (Mon, 13 Aug 2007) | 3 lines

Don't call find_peer in registry_authrequest with the pvt lock held to avoid a
deadlock.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:40:47 +00:00
Russell Bryant 16373a4e5f Merged revisions 79276 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79276 | russell | 2007-08-13 15:18:30 -0500 (Mon, 13 Aug 2007) | 4 lines

Release the pvt lock before calling find_peer in register_verify to avoid a
deadlock.  Also, remove some unnecessary locking in auth_fail that was only done
recursively.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:20:43 +00:00
Russell Bryant 982a3ac424 Merged revisions 79274 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79274 | russell | 2007-08-13 15:02:57 -0500 (Mon, 13 Aug 2007) | 3 lines

Don't call find_peer within update_registry with a pvt lock held.  This can
cause a deadlock as the code will eventually call find_callno.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:06:19 +00:00
Russell Bryant 0dd52f7196 Merged revisions 79272 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79272 | russell | 2007-08-13 14:27:39 -0500 (Mon, 13 Aug 2007) | 9 lines

I am fighting deadlocks in chan_iax2.  I have tracked them down to a single
core issue.  You can not call find_callno() while holding a pvt lock as this
function has to lock another (every) other pvt lock.  Doing so can lead to a
classic deadlock.  So, I am tracking down all of the code paths where this
can happen and fixing them.

The fix I committed earlier today was along the same theme.  This patch fixes
some code down the path of authenticate_reply.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 19:29:30 +00:00
Russell Bryant a2847deb73 Merged revisions 79214 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79214 | russell | 2007-08-13 10:28:13 -0500 (Mon, 13 Aug 2007) | 4 lines

Fix a potential deadlock in socket_process.  check_provisioning can eventually
call find_callno.  You can't hold a pvt lock while calling find_callno because
it goes through and locks every single one looking for a match.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 15:32:05 +00:00
Joshua Colp d5eda8709c Merged revisions 79174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines

(closes issue #10437)
Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:22:46 +00:00
Jason Parker 9b3c3f1c61 Use localized softkey labels.
Add some information about localization "codes".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 21:29:31 +00:00
Russell Bryant 0034e3f49d When looking up a mailbox, use the default context if not specified as something else
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 19:35:07 +00:00
Russell Bryant 348ff8c3e9 Restore the ability to have multiple mailboxes listed for the mailbox option
in sip.conf.  chan_sip now maintains separate internal MWI subscriptions for
each one.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 19:11:53 +00:00
Russell Bryant 9d1acad76b Fix a problem that I had introduced into MWI handling. I had ignored
the mailbox context.  Now, all related MWI event dealings pay attention
to the context as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 17:07:36 +00:00
Joshua Colp 90066ea949 Minor fix for building under dev mode when byteswapping macro header files are not available.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 21:58:12 +00:00
Joshua Colp 22114b509d Add support for using epoll instead of poll. This should increase scalability and is done in such a way that we should be able to add support for other poll() replacements.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 21:44:58 +00:00
Joshua Colp 063c747f3a HAVEL_SS7 should be HAVE_SS7. Reported by kwallace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 20:49:07 +00:00
Joshua Colp f2fc44d07e Correct spelling. s/threaads/threads/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 19:03:46 +00:00
Jason Parker 395243c923 Merged revisions 78375 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78375 | qwell | 2007-08-07 13:25:15 -0500 (Tue, 07 Aug 2007) | 3 lines

Properly check the capabilities count to avoid a segfault.
(ASA-2007-019)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 18:26:19 +00:00
Russell Bryant eba344f498 Merged revisions 78371 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r78371 | russell | 2007-08-07 12:45:30 -0500 (Tue, 07 Aug 2007) | 12 lines

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

........
r78370 | russell | 2007-08-07 12:44:04 -0500 (Tue, 07 Aug 2007) | 4 lines

Revert patch committed for issue #9660.  It broke E&M trunks.
(closes issue #10360)
(closes issue #10364)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 17:46:00 +00:00
Joshua Colp 57769b9a53 Can't forget outsignaling!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 16:17:08 +00:00
Joshua Colp 4684dd1761 Just for jsmith... make signaling a valid option that acts like signalling.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 16:09:27 +00:00
Jason Parker bc8b1d3baa Add a TalkingToChan to the response of the "agents" manager action.
This is similar to the existing "talking to" that you see what using the "agent show" CLI command.

Closes issue #10102


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 23:00:35 +00:00
Russell Bryant d9407da71d Merged revisions 78242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78242 | russell | 2007-08-06 15:44:09 -0500 (Mon, 06 Aug 2007) | 4 lines

Fix an issue where dynamic threads can get free'd, but still exist in the 
dynamic thread list.
(closes issue #10392, patch from Mihai, with credit to his colleague, Pete)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 20:45:09 +00:00
Mark Michelson 8f17952065 Fixing a compiler warning which warns that a variable may be used unitialized. Thanks to mvanbaak for pointing this out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 17:51:09 +00:00
Mark Michelson c4c0e45c8b Merged revisions 78103 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78103 | mmichelson | 2007-08-03 15:25:22 -0500 (Fri, 03 Aug 2007) | 7 lines

Changed the behavior of sip's realtime_peer function to match the corresponding way of matching for non-realtime peers.
Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the
IP address.

In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 16:54:51 +00:00
Joshua Colp 54a2d42e2f Merged revisions 78182 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78182 | file | 2007-08-06 13:32:44 -0300 (Mon, 06 Aug 2007) | 2 lines

It is possible for a transfer to occur before the remote device has our tag in which case they send none in the transfer. In this case we need to not fail the transfer dialog lookup. 

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 16:34:15 +00:00
Jason Parker bb700d82ce Implement setvar functionality in chan_skinny
Closes issue #10379, patch by mvanbaak.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 16:08:11 +00:00
Tilghman Lesher 05d60c7860 Merged revisions 78139 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78139 | tilghman | 2007-08-04 22:29:01 -0500 (Sat, 04 Aug 2007) | 2 lines

If peer is not found, the error message is misleading (should be peer not found, not ACL failure)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-05 03:42:35 +00:00
Russell Bryant 661fa0b374 Merged revisions 78063 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78063 | russell | 2007-08-03 12:01:07 -0500 (Fri, 03 Aug 2007) | 4 lines

Only pass through HOLD and UNHOLD control frames when the mohinterpret option
is set to "passthrough".  This was pointed out by Kevin in the middle of a
training session.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-03 17:02:00 +00:00
Russell Bryant bcabfbb89a Merged revisions 78028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78028 | russell | 2007-08-02 21:04:22 -0500 (Thu, 02 Aug 2007) | 6 lines

Don't reuse the timespec that was set to 0 in the previous timedwait as it
will just return immediately.  Also, fix some logic so the thread's lock
isn't unlocked twice in the weird case of dynamic threads getting acquired
right after a timeout.
(pointed out by SteveK)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-03 02:05:02 +00:00
Jason Parker 1064b75ab7 Merged revisions 77996 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #9779)
........
r77996 | qwell | 2007-08-02 16:53:39 -0500 (Thu, 02 Aug 2007) | 5 lines

Make sure we actually allow 6 chars to be sent.
Also make note of the "A" option of date format.

Issue 9779, modifications by DEA, wedhorn, and myself.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 21:54:54 +00:00
Jason Parker fb94195d90 Merged revisions 77993 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10325)
........
r77993 | qwell | 2007-08-02 15:22:40 -0500 (Thu, 02 Aug 2007) | 5 lines

If a device disconnects, the session will go away.
If this happens during call setup, we need to give up.

Issue 10325.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 20:23:20 +00:00
Russell Bryant 7b3dcbb842 Merged revisions 77949 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77949 | russell | 2007-08-02 14:25:14 -0500 (Thu, 02 Aug 2007) | 5 lines

Fix the case where a dynamic thread times out waiting for something to do
during the first time it runs.  This shouldn't ever happen, but we should
account for it anyway.
(pointed out by pete, who works with mihai)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 19:26:12 +00:00
Jason Parker 98ef35b908 Merged revisions 77947 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10299)
........
r77947 | qwell | 2007-08-02 13:42:36 -0500 (Thu, 02 Aug 2007) | 5 lines

Make sure we clear the prompt status message on a hangup.
Also rearrange messages to better fit with what a wireshark trace shows it should be.

Issue 10299, initial patch and solution by sbisker, modified by me to fit with wireshark trace.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 18:43:29 +00:00
Russell Bryant 85ba8d515a Merged revisions 77943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77943 | russell | 2007-08-02 13:04:43 -0500 (Thu, 02 Aug 2007) | 9 lines

Fix another race condition in the handling of dynamic threads.  If the dynamic
thread timed out waiting for something to do, but was acquired to perform an
action immediately afterwords, then wait on the condition again to give the
other thread a chance to finish setting up the data for what action this thread
should perform.  Otherwise, if it immediately continues, it will perform the
wrong action.
(reported on IRC by mihai, patch by me)
(related to issue #10289)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 18:05:23 +00:00
Russell Bryant 12ed8e8d07 Fix an issue that Simon pointed out to me on IRC. There were cases in the
trunk version of find_idle_thread() where the old full frame processing
information was not cleared out.  This would have caused full frames to get
deferred for processing by threads that weren't actually processing frames for
that call.  Nice catch!!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 17:09:42 +00:00
Russell Bryant 171791dd8b Merged revisions 77939 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77939 | russell | 2007-08-02 11:56:04 -0500 (Thu, 02 Aug 2007) | 4 lines

Add another sanity check to vnak_retransmit().  This check ensures that frames
that have already been marked for deletion don't get retransmitted.
(closes issue #10361, patch from mihai)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 16:58:26 +00:00
Jason Parker e7e9275241 Merged revisions 77894 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10358)
........
r77894 | qwell | 2007-08-02 10:15:45 -0500 (Thu, 02 Aug 2007) | 5 lines

Make sure that we show the correct extension if dialed from a macro
"From: 5555" rather than "From: s"

Issue 10358, initial patch by DEA, reworked by me to use S_OR, tested by sbisker

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 15:16:53 +00:00
Jason Parker e27df99e5f Merged revisions 77890 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10291)
........
r77890 | qwell | 2007-08-01 17:28:56 -0500 (Wed, 01 Aug 2007) | 4 lines

Put in some additional debug information for softkey/stimulus messages.

Issue 10291, patch by DEA.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 22:31:07 +00:00
Russell Bryant 1990a00ca4 Merged revisions 77887 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77887 | russell | 2007-08-01 17:16:17 -0500 (Wed, 01 Aug 2007) | 23 lines

Fix some race conditions which have been causing weird problems in chan_iax2.
The most notable problem is that people have been seeing storms of VNAK frames
being sent due to really old frames mysteriously being in the retransmission
queue and never getting removed.

It was possible that a dynamic thread got created, but did not acquire its lock
before the thread that created it signals it to perform an action.  When this
happens, the thread will sleep until it hits a timeout, and then get destroyed.
So, the action never gets performed and in some cases, means a frame doesn't
get transmitted and never gets freed since the scheduler never gets a chance
to reschedule transmission.

Another less severe race condition is in the handling of a timeout for a dynamic
thread.  It was possible for it to be acquired to perform at action at the same
time that it hit a timeout.  When this occurs, whatever action it was acquired
for would never get performed.

(patch contributed by Mihai and SteveK)
(closes issue #10289)
(closes issue #10248)
(closes issue #10232)
(possibly related to issue #10359)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 22:24:23 +00:00
Jason Parker d9beb54cbb Merged revisions 77883 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77883 | qwell | 2007-08-01 16:08:42 -0500 (Wed, 01 Aug 2007) | 7 lines

Fix an issue that caused one-way audio on some newer devices (specifically the 7921),
 due to sending packets in the wrong order during hangup.

Also make sure we clear tones/messages on the correct line/instance.

Issue 10291, patch by DEA, tested by sbisker and myself.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 21:12:02 +00:00
Joshua Colp d9aee5e353 Merged revisions 77869 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77869 | file | 2007-08-01 14:56:59 -0300 (Wed, 01 Aug 2007) | 2 lines

Add some fixes for building on Solaris.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 18:01:33 +00:00
Russell Bryant 4e0947c5f1 Convert code that checks the _softhangup member of ast_channel directory to use
the ast_check_hangup() funciton.  This function takes scheduled hangups into
account.
(closes issue #10230, patch by Juggie)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 15:39:54 +00:00
Steve Murphy 35499c7f40 thanks to Russel, for pointing out that the dialoglist_lock/unlock routines also need to be macros if DETECT_DEADLOCKS is set
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 15:59:01 +00:00
Mark Michelson 768724f5e6 Merged revisions 77824 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77824 | mmichelson | 2007-07-31 10:21:22 -0500 (Tue, 31 Jul 2007) | 6 lines

This patch makes Asterisk send 100 Trying provisional responses upon receipt of re-invites. This makes it so that if there are two or more Asterisk
servers between endpoints, the Asterisk servers will not keep retransmitting the re-invites.

(closes issue #10274, reported by cstadlmann, patched by me with approval from file)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 15:22:32 +00:00
Kevin P. Fleming f35541734a there is no use in having functions that have no code in them, and hide the locking info when DEBUG_THREADS is enabled... i could have fixed this to be dependent on DEBUG_THREADS, but it would be just as easy for someone to add their test/debugging code to the macros as it would have been to the functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 15:01:27 +00:00
Kevin P. Fleming b2eb99bb47 use a different method for overriding the send_digit_begin pointer, as the old one fails to compile on my 64-bit system with gcc-4.1 and --enable-dev-mode turned on
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 14:55:37 +00:00
Steve Murphy 2cad4fea1a Discovered in experiments on core files: if you wrap the lock and unlock calls with sip_pvt_lock and sip_pvt_unlock, you lose the tracing info you would normally get via DETECT_DEADLOCKS; so I turn these two functions into macros when DETECT_DEADLOCKS is called. This way, you get meaningful stuff in the file and func slots in the lock_info struct.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 03:32:04 +00:00
Russell Bryant 3ca4126887 Change another unnecessary use of the increment operator to explicitly set the var to 1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 20:36:18 +00:00
Russell Bryant 3b49339387 Explicitly set a variable to 1 instead of using the increment operator.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 20:33:44 +00:00
Russell Bryant a27203a5bc Merged revisions 77794 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77794 | russell | 2007-07-30 15:16:43 -0500 (Mon, 30 Jul 2007) | 8 lines

Fix an issue that could potentially cause corruption of the global iax frame
queue.  In the network_thread() loop, it traverses the list using the
AST_LIST_TRAVERSE_SAFE macro.  However, to remove an element of the list within
this loop, it used AST_LIST_REMOVE, instead of AST_LIST_REMOVE_CURRENT, which I
believe could leave some of the internal variables of the SAFE macro invalid.
Mihai says that he already made this change in his local copy and it didn't help
his VNAK storm issues, but I still think it's wrong.  :)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 20:21:05 +00:00
Luigi Rizzo b20ab775d5 minor code rearrangements:
+ place the link field at the beginning of struct sip_pvt, 
  and not somewhere in the middle;
 
+ in __sip_reliable_xmit, remove a duplicate assignment, and
  put the statements in a more logical order (i.e. first copy
  the payload and associated info, then copy arguments from the
  caller, then finish initializing the headers...)
 
nothing to backport.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 10:55:37 +00:00
Luigi Rizzo adc28d1e1c rename handle_request() to handle_incoming(), as the former
was misleading - the function deals with all incoming packets, be
them requests or responses.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 08:07:00 +00:00
Luigi Rizzo 6fe18e2403 move some dialog-only flags to proper variables, namely
SIP_NOVIDEO, SIP_DIALOG_ANSWEREDELSEWHERE, SIP_PAGE2_NOTEXT,
SIP_PAGE2_OUTGOING_CALL
These are seldom used so the diff is relatively small.

Note that 'OUTGOING_CALL' is dangerously similar to another
dialog flag, 'SIP_OUTGOING', so the description will need to
clarify the different meaning of the two.

Also note that the description of NOTEXT is a bit unclear - does
it mean we don't support it, or 'not requested or not supported' ?


On passing fix a comment referring to video instead of text.

Finally, mark with XXX a possibly misleading debugging message.
(maybe the latter is worth backporting).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 21:24:56 +00:00
Luigi Rizzo 597421be86 use a function, cli_yesno(), to produce the output Yes or No for
CLI lines. This helps maintaining consistency on output, slightly
improves readability, and maybe one day will make it easier to
translate the output in other languages (though i have a hard time
believing that a CLI user who needs 'yes' and 'no' to be translated
can actually figure out what he/she is doing!)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 20:55:20 +00:00
Luigi Rizzo 89f44c573e move the two remaining peer flags to proper variables.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 20:28:02 +00:00
Luigi Rizzo db10bcc41a move RT_FROMCONTACT to a proper sip_peer field.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 20:13:32 +00:00
Luigi Rizzo fd2f3a20bc Move some global 'flags' to individual variables.
Start putting these variables in a single struct (called 'sip_cfg' for the time
being, but it could as well be 'global' or some other name) so it
is easy, when reading the code, to figure out what they are for.

The downside of using struct fields instead of individual global
variables is that the compiler cannot tell if there are unused fields.
But the advantage of not cluttering the namespace and manilpulating
all these variables at once certainly overcome the disadvantagess.

Nothing to backport, again.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 20:01:36 +00:00
Luigi Rizzo 5e35eab5a2 minor simplification of a conditional statement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 10:49:32 +00:00
Luigi Rizzo c19549820e build the version of sip_tech with no send_digit_begin
at load time instead of duplicating the initializer.
This should remove the risk of forgetting fields in the
initializer.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 10:13:14 +00:00
Luigi Rizzo e5f3a6ccdb remove bit position from description of SIP_* flags.
use AST_FORMAT_AUDIO_MASK instead of playing with AST_FORMAT_MAX_AUDIO
to determine audio formats.
There is a dubious use of AST_FORMAT_MAX_AUDIO in sip_request_call()
which surely needs fixing, namely: 
 
        /* mask request with some set of allowed formats.
         * XXX this needs to be fixed.
         * The original code uses AST_FORMAT_AUDIO_MASK, but it is
         * unclear what to use here. We have global_capabilities, which is
         * configured from sip.conf, and sip_tech.capabilities, which is
         * hardwired to all audio formats.
         */
 
The latter is possibly something to backport when fixed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 09:27:30 +00:00
Luigi Rizzo 692e1fe0c4 back on cleaning up the usage of flags.
Move together flags used in the same way (e.g. dialog only,
dialog-peer, ...) so it will become easier to deal with them
in a more systematic way.
This is being done in stages so it will be easier to detect
breakage, if any should occur.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 08:58:10 +00:00
Luigi Rizzo b5c5227804 more documentation on internal representation of incoming SIP messages.
Remove definitions for now-unused flags, and add references to print
routines for other flags.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 08:19:19 +00:00
Luigi Rizzo 5ca87effb7 make register_unref() return NULL so it is easy to cleanup
the original pointer while calling the function.

on passing add some comments on one of the places where it
is used, and explain why it is safe there.

again, a no-op for practical purposes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 00:06:35 +00:00
Luigi Rizzo 9f165b444a add some documentation to auto_congest(), and some
dialog_ref/unref (they are a no-op at the moment).
Also clean a pointer after freeing memory to avoid
dangling references, and write a for() loop in canonical form.

In practice, everything in this commit is a no-op.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 23:43:35 +00:00
Luigi Rizzo a6e169c09a more dialog_ref()/dialog_unref() calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 17:16:24 +00:00
Luigi Rizzo 5dcfd811d7 more dialog_ref()/dialog_unref() calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 16:38:07 +00:00
Luigi Rizzo d480266797 start introducing hooks for reference counts on dialog descriptors.
This commit is, for all practical purposes, a no-op, as it only
introduces the dialog_ref() and dialog_unref() methods, and uses them
in a few places (not all the places where they would be needed).

The goal is to start annotating the code with these calls, so the transition
to a proper container will be easier.

Nothing to backport.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 16:25:25 +00:00
Luigi Rizzo df75ae2285 remove an unused string
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 09:32:10 +00:00
Luigi Rizzo 800e1a6a03 simplify a conditional expression using S_OR
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 09:29:22 +00:00
Luigi Rizzo 6d8c6a9961 make use of received= and rport= fields in sip replies.
In a nutshell, these fields are used to tell a sip entity
the address and port its request came from, and are extremely
useful in the presence of NATs, especially with symmetric NATs
where STUN is totally ineffective.

This patch stores the address and port in the 'ourip' field of
the dialog descriptor, so they can be reused in subsequent transactions.
As it is, it works well for things like REGISTER requiring authentication,
because the second REGISTER request (with auth credentials) will carry
the correct address. Maybe it can also be useful, in case of an address
change, to do one or both of the following:

+ propagate the new address to the parent user/peer descriptor so that new
  dialogs will use the correct address from the beginning.
  This is trivial to implement, I am just waiting for feedback on this.

+ re-issue a request in case of an address change. This a lot less trivial,
  maybe unnecessary, and probably covered by the previous item.

I would seriously consider this patch for addition to 1.4 and 1.2.
The code is very little intrusive, and it would solve in a correct
way the nat traversal problems for which externip/externaddr/stunaddr
are only a partial and expensive workaround.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 07:44:16 +00:00
Joshua Colp 111250f2ae Turn 4 lines of code into 1 line that does the same thing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27 16:31:55 +00:00
Joshua Colp f6498f16bb Merged revisions 77536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77536 | file | 2007-07-27 13:27:16 -0300 (Fri, 27 Jul 2007) | 6 lines

(closes issue #10323)
Reported by: julianjm
Patches:
      chan_sip_device_state_hold_fix.v1.diff.txt uploaded by julianjm (license 99)
Clear ONHOLD flag when decrementing the onHold peer count. If we did not do this the count may keep decreasing.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27 16:29:40 +00:00
Mark Michelson d17d9c542b Merged revisions 77490 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77490 | mmichelson | 2007-07-27 09:30:43 -0500 (Fri, 27 Jul 2007) | 3 lines

"re-invite" was misspelled


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27 14:31:35 +00:00
Russell Bryant f8483a0d04 Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak)

Basically, this changes ...

if (option_verbose > 2)
   ast_verbose(VERBOSE_PREFIX_3, "Something\n");

to ...

ast_verb(3, "Something\n");


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Russell Bryant 70f140c1d2 Revert some changes to call abs() on the result of ast_random().
* random() is defined to return a positive result, and now ast_random()
   will always do so as well


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 13:26:44 +00:00
Tilghman Lesher 7a97d49914 Things expecting a positive result from ast_random() should not be surprised (closes #10308)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 13:19:07 +00:00
Luigi Rizzo 546c742106 silence a warning in ast-devmode on a potentially uninitialized var.
At first sight (but the function is very large so i am not 100% sure)
the code seems correct, so maybe my compiler is just not smart
enough to figure that out at the optimization level it has.

Not worthwhile merging to 1.4 i believe.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-25 21:58:13 +00:00
Steve Murphy 30c771a9d7 Merged revisions 76983 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r76983 | murf | 2007-07-24 18:18:32 -0600 (Tue, 24 Jul 2007) | 9 lines

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

........
r76978 | murf | 2007-07-24 18:07:24 -0600 (Tue, 24 Jul 2007) | 1 line

this fixes bug 10293, where the error message because defaultzone or loadzone was not defined was confusing
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-25 00:34:42 +00:00
Jason Parker cf551decc5 Revert trivial whitespace change (for testing)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 17:43:36 +00:00
Jason Parker 307d1fcb77 Trivial whitespace change to test comitting...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 17:23:16 +00:00
Tilghman Lesher 1c17bc177d Merged revisions 76803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76803 | qwell | 2007-07-24 11:32:20 -0500 (Tue, 24 Jul 2007) | 3 lines

Don't create the Asterisk channel until we are starting the PBX on it.
(ASA-2007-018)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 17:05:10 +00:00
Jason Parker 3562d4eea2 The chan_skinny Dial() syntax was funky. You had to do Dial(Skinny/line@device)
This allows you to just Dial(Skinny/line), as long as line isn't ambiguous.

Note that this does not remove or deprecate the "old" syntax, as it's still
 quite useful - even moreso if shared lines get implemented.


Initial patch by me, with some changes and suggestions from wedhorn.
(closes issue #10263)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 15:35:58 +00:00
Luigi Rizzo 961165519e two small fixes when using stun (reported by Marta Carbone):
+ externexpire was not initialized properly;
+ stunaddr was not handled properly on a sip reload



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 14:49:49 +00:00
Tilghman Lesher 55b1ee298e 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: https://origsvn.digium.com/svn/asterisk/trunk@76703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 19:51:41 +00:00
Jason Parker d8d1b6c8f2 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: https://origsvn.digium.com/svn/asterisk/trunk@76657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 19:00:19 +00:00
Joshua Colp 34e92f29f6 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: https://origsvn.digium.com/svn/asterisk/trunk@76655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 18:31:06 +00:00
Jason Parker 6f81f60696 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: https://origsvn.digium.com/svn/asterisk/trunk@76621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 17:58:46 +00:00
Luigi Rizzo 6a9270d879 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: https://origsvn.digium.com/svn/asterisk/trunk@76564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:45:22 +00:00
Joshua Colp 90dc0cfa85 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: https://origsvn.digium.com/svn/asterisk/trunk@76563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:38:35 +00:00
Russell Bryant 7a2772c151 Mark str2dtmfmode() as currently unused to resolve a compiler warning and
allow building under dev mode


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:37:26 +00:00
Russell Bryant eaebbdab61 (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: https://origsvn.digium.com/svn/asterisk/trunk@76559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:32:04 +00:00
Luigi Rizzo b1791d9349 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: https://origsvn.digium.com/svn/asterisk/trunk@76547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:18:04 +00:00
Russell Bryant 83609770c1 Remove an unused function to resolve a compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:02:21 +00:00
Joshua Colp 91c3d90e8f Use autoconf logic to determine byte swapping macro presence. This should now also use other macros if present.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 13:46:57 +00:00
Luigi Rizzo ed1775bd10 move "sip prunte realtime ..." and "sip set debug ... " to NEW_CLI style.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 13:29:06 +00:00
Joshua Colp 4dc6b6d50a 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: https://origsvn.digium.com/svn/asterisk/trunk@76520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 13:24:03 +00:00
Russell Bryant 3c10aab644 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: https://origsvn.digium.com/svn/asterisk/trunk@76486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 12:29:46 +00:00
Luigi Rizzo 1ee5480549 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: https://origsvn.digium.com/svn/asterisk/trunk@76467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 03:10:31 +00:00
Luigi Rizzo 28cde9fee3 add a bit of comments on internal functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 02:46:10 +00:00
Luigi Rizzo 719dcef90d rewrite "sip show {channels|subscriptions}" CLI handler
using the new-style cli format.
No functional changes, nothing to backport.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 21:38:26 +00:00
Luigi Rizzo 930bf0402d 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: https://origsvn.digium.com/svn/asterisk/trunk@76392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 21:00:10 +00:00
Luigi Rizzo 97512a856f add two comment blocks, one on reusing nonces, and one on the handling
of an 'authpeer' local variable.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 20:44:06 +00:00
Luigi Rizzo db12b404fc 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: https://origsvn.digium.com/svn/asterisk/trunk@76371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 19:08:37 +00:00
Luigi Rizzo 88f18dc9d7 remove unused argument from handle_invite_replaces(), and also leftover
SIP_PKT_* stuff from the previous commit.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 18:46:52 +00:00
Luigi Rizzo b7945cd78e 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: https://origsvn.digium.com/svn/asterisk/trunk@76365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 18:41:57 +00:00