Commit Graph

4193 Commits

Author SHA1 Message Date
Tilghman Lesher
9d70e52611 Properly initialize polarity statuses, so that they are detected properly.
Reported by: julianjm
Patch by: julianjm
(Closes issue #10238)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 21:28:39 +00:00
Jason Parker
8771f23fff If a typo is found in a config file, we previous continued on with what was already loaded.
We do not want to do this (see bug below for details).

This makes it so that if a [ is found without a ], the entire config will fail, and nothing in it will be loaded.

Isue #10690.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 00:11:09 +00:00
Joshua Colp
6fcaf2bb4b It is possible for nativeformats to contain more then one codec, so print out multiple ones.
(closes issue #11366)
Reported by: ovi


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 16:13:43 +00:00
Olle Johansson
7efa6b1fe0 Avoid reinvite race situations with two Asterisks trying
to reinvite each other in 1.4 and trunk. 

This patch implements support for the 491 error code that
Asterisk 1.4 generates on situations where we get an 
incoming INVITE and already has one in progress.

Thanks to mavetju for reporting and to Raj Jain for an
excellent explanation of the problem.

Patch by myself. Tested with 8 Asterisk servers connected
to each other in a training network.

Closes issue #10481



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 14:04:44 +00:00
Joshua Colp
4edfc25a1f Add support for accepting and sending T.38 in the initial INVITE.
(closes issue #9402)
Reported by: thdei


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 16:14:26 +00:00
Mark Michelson
7b052b78e1 A big one...
This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop.
This is accomplished by creating a datastore on the calling channel which has a linked list of all devices
dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this
progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply
be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore
is detached from the channel and destroyed.

This change also introduces some side effects to the code which I shall enumerate here:

1. Datastore inheritance has been backported from trunk into 1.4
2. A large chunk of code has been removed from app_dial. This chunk is the section of code
   which handles the call forward case after the channel has been requested but before it has
   been called. This was removed because call-forwarding still works fine without it, it makes the
   code less error-prone should it need changing, and it made this set of changes much less painful
   to just have the forwarding handled in one place in each module.
3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore
   which is attached to the channel may be created and attached in either app_dial or app_queue, so they
   need a common place to find the datastore info. This approach was taken in case similar datastores are
   needed in the future, there will be a common place to add them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 23:12:17 +00:00
Mark Michelson
d2d88e0f3d Changing some bad logic when calculating the interdigit timeout.
(closes issue #11402, reported and patched by eferro)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 20:59:51 +00:00
Jason Parker
90edaee7dd Only log debug messages if debug is enabled.
Closes issue #11416, patch by casper.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 18:20:49 +00:00
Russell Bryant
1f8caa100d Change the behavior of ao2_link(). Previously, in inherited a reference.
Now, it automatically increases the reference count to reflect the reference
that is now held by the container.

This was done to be more consistent with ao2_unlink(), which automatically
releases the reference held by the container.  It also makes it so it is
no longer possible for a pointer to be invalid after ao2_link() returns.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30 19:26:04 +00:00
Joshua Colp
daf94226d5 Fix locking issues under one legged replaces scenarios.
(closes issue #11420)
Reported by: irroot
Patches:
      chan_sip_oneleg.patch uploaded by irroot (license 52)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30 14:43:15 +00:00
Mark Michelson
a53959d666 Clear the DTMF buffer if the call times out.
(closes issue #11418, reported and patched by eferro)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30 00:16:04 +00:00
Olle Johansson
0c3ec937ce If we get a codec offer using a well-known payload type, but using it for another
codec that we don't know, Asterisk did not remove that codec from the list.

With this patch, we remove the codec from audio and video rtp objects and
deny it ever existed. Thanks to lasse for testing.

(closes issue #11376)
Reported by: lasse
Patches: 
      bug11376.txt uploaded by oej (license 306)
Tested by: lasse


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 15:23:17 +00:00
Christian Richter
be20960013 added RR patch from iroot #10908, thanks.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 13:40:55 +00:00
Tilghman Lesher
245abfa1c2 Fix an uninitialized memory read found by valgrind
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:23:14 +00:00
Tilghman Lesher
f39db73930 Yet another memory corruption issue.
Reported by: atis
Patch by: tilghman
Fixes issue #10923


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:05:56 +00:00
Olle Johansson
9d3be20a0d Don't send re-invites during pending INVITE transactions.
Patch by one47 - thanks!

Closes issue #9305


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 11:26:22 +00:00
Olle Johansson
fc49ddab3a Improve support for multipart messages. Code by gasparz, changes
by me (mostly formatting). Thanks, gasparz!

Closes issue #10947


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 11:15:09 +00:00
Jason Parker
fb0bb38fc4 Fix building on newer systems which require a third arg to open() when using O_CREAT.
Issue 11238, reported by puzzled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 21:07:08 +00:00
Tilghman Lesher
4332b72082 If we set a value for qualify, we should actually pay attention to it, instead of overriding the value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 17:34:11 +00:00
Tilghman Lesher
1a052e0498 Fix two cases of memory corruption caused by background threads.
Reported by: atis
Patch by: tilghman
Fixes issue #10923


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 17:29:17 +00:00
Christian Richter
c2c1e68238 if we're NT and no number was dialed and overlapdial is set, we wait for the ISDN timeout instead of starting our own timer. added a comment for the misdn.conf.sample for the overlapdial config option.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 11:26:48 +00:00
Christian Richter
4e52dc67dc added restart all interfaces Restart_Indicator, to automatically send a RESTART after the L2 of a PTP Port comes up. Also fixed some places where we have send a RELEASE without need for it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 11:23:57 +00:00
Christian Richter
472f7a471c fixed a state/event issue with overlapdial=yes when no extension matched. removed the general sending of a RELEASE_COMPLETE when we receive a RELEASE, this is done by mISDNuser/mISDN. This makes it possible to use asterisk-1.4 with mISDN trunk, but requires users of mISDN/mISDNuser-1.1.X to upgrade to at least mISDNuser-1.1.6 (when using the NT mode at all)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 11:13:13 +00:00
Christian Richter
ad50f139c4 fixed the support for CW and therefore for the reject_cause option.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 09:57:23 +00:00
Christian Richter
57ccb76df1 aded ntkeepcalls option, to avoid droÃpping calls when the L2 goes down on a PTP link. There are some pbx which do turn off the L1 for a very short while and restart it immediately. normally T310 should be started and after 10 seconds or so the calls should be dropped, this is a simple fix wihtout this timer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 09:45:36 +00:00
Mark Michelson
3b75ff9010 Rework of the commit I made yesterday to use the already built-in
ast_uri_decode function as opposed to my home-rolled one. Also added
comments.

Thanks to oej for pointing me in the right direction



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 21:00:08 +00:00
Joshua Colp
3aea241b63 Do not add a sip: to the beginning of the To URI unless needed.
(closes issue #10756)
Reported by: goestelecom


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 02:26:48 +00:00
Joshua Colp
0f1ef85f9a Improve the devicestate logic for multiple devices. If any are available then the extension is considered available.
(closes issue #10164)
Reported by: nic_bellamy
Patches:
      sip-hinting-svn-branch-1.4.patch uploaded by nic (license 299)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 01:28:56 +00:00
Joshua Colp
53fd91490e Add support for allowing one outgoing transaction. This means if a response comes back out of order chan_sip will still handle it. I dream of a chan_sip with real transaction support.
(closes issue #10946)
Reported by: flefoll
(closes issue #10915)
Reported by: ramonpeek
(closes issue #9567)
Reported by: atca_pres


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 01:11:25 +00:00
Joshua Colp
f1309f2c3f If callerid is configured in sip.conf use that for checking the presence of an extension in the dialplan.
(closes issue #11185)
Reported by: spditner


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:53:25 +00:00
Mark Michelson
0d76379f54 This patch makes it possible for SIP phones to dial extensions defined with '#' characters
in extensions.conf AND maintain their escaped characters when forming URI's

(closes issue #10681, reported by cahen, patched by me, code review by file)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 22:40:35 +00:00
Joshua Colp
cac21aa19b Make it so that if a peer is determined to be unreachable using qualify their devicestate will report back unavailable.
(closes issue #11006)
Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 17:08:05 +00:00
Joshua Colp
8b309c7bb9 Fix improbable but possible memory leaks in chan_zap.
(closes issue #11166)
Reported by: eliel
Patches:
      chan_zap.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 16:24:56 +00:00
Russell Bryant
ea00780d49 When traversing the list of channel variables here in transmit_invite(), the
asterisk channel must be locked, as this data may change at any time.

(I have seen numerous reports of crashes related to the handling of channel
variables.  There are a couple of issues on the bug tracker related to it,
but it has also been noted on IRC and mailing lists.  So, I am finding and
fixing some places where channel variables are handled improperly.) 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 21:33:56 +00:00
Russell Bryant
69e42e6096 Fix up some indentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 21:21:39 +00:00
Joshua Colp
10c172eb00 If a SIP channel is put on hold multiple times do not keep incrementing the onHold value.
(closes issue #11085)
Reported by: francesco_r
Tested by: blitzrage
(closes issue #10474)
Reported by: acennami


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 18:47:13 +00:00
Jason Parker
7fa3a53ec2 Make sure we destroy the config structure on configuration failure.
Issue 11163, patch by eliel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 17:19:41 +00:00
Luigi Rizzo
a0edff2477 Rename ast_string_field_free_pool to ast_string_field_free_memory,
and ast_string_field_free_all to ast_string_field_reset_all
to avoid misuse (due to too similar names and an error in
documentation). Fix two related memory leaks in app_meetme.

No need to merge to trunk, different fix already applied there.
Not applicable to 1.2



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-04 22:38:13 +00:00
Joshua Colp
986e8a3ae8 Make subscribecontext behave as advertised. It will now look for the presence of a hint in the given context (be it subscribecontext or context).
(closes issue #10702)
Reported by: slavon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-02 20:49:45 +00:00
Joshua Colp
e49faa404a If an INFO request within a dialog is received with a content length of 0 simply send back a 200 OK. It is valid to do this and the remote side is probably using it to make sure the signalling is still alive.
(closes issue #5747)
Reported by: chandi
Patches:
      infofix-81430-1.patch uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-02 20:20:21 +00:00
Jason Parker
ac6218741f Make sure we set the poll fds to NULL after free()ing it.
Part of issue 11017, patch by tzafrir.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 16:21:22 +00:00
Jason Parker
40cd95fc27 Don't try to allocate memory that we're just going to re-allocate later anyways.
Issue 11130, patch by eliel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-31 21:16:20 +00:00
Russell Bryant
1561187fc4 Merge the changes from team/russell/iax2_poke_fix and iax2-poke-fix-trunk
There was a race condition related to the handling of POKEing peers.  Essentially, 
a reference to a peer is held by the scheduler when there are pending callbacks, 
but the reference count didn't reflect it.  So, it was possible for a peer to hit
a reference count of zero and have its destructor begin to be called at the same
time that the scheduler thread ran a POKE related callback.  If that happened,
a crash would likely occur.

(closes issue #11082, closes issue #11094)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-30 21:19:09 +00:00
Jason Parker
fc51acbc73 Only try to clean out h323/ if the h323/Makefile exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-30 20:29:41 +00:00
Joshua Colp
143536912e Fix issue where if both sides of the dialog cancelled the dialog at the same time chan_sip could kepe retransmitting a response for no reason.
(closes issue #9566)
Reported by: atca_pres
Patches:
      bug9566.patch uploaded by oej


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 17:20:28 +00:00
Jason Parker
1b7b80da3a Correctly respect hidecalleridname configuration option.
Simplify code slightly in the process.

Issue 11079, reported by ddv2005


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-24 20:56:47 +00:00
Joshua Colp
d6d7384355 After reading online I have confirmed that Record-Route headers should be copied to 1xx responses as well.
(closes issue #10113)
Reported by: makoto


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 16:35:22 +00:00
Christian Richter
e4df4c58ec we send DISCONNECT instead of RELEASE/RELEASE_COMPLETE if the dialplan does not match after an overlap call. Also added out_cause=1
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 09:21:15 +00:00
Joshua Colp
a5b69b3583 Fix two issues with domains and transfers. If a port was given in the hostname it was treated as part of the hostname. If domains were configured but external domains were not enabled all transfers would be considered remote.
(closes issue #11027)
Reported by: ramonpeek
Patches:
      11027-1.diff uploaded by ramonpeek (license 266)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 15:33:49 +00:00
Joshua Colp
918ee9ae5b Set port number in received as information for registrations as well.
(closes issue #11028)
Reported by: brad-x


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 15:08:12 +00:00