Commit Graph

4181 Commits

Author SHA1 Message Date
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
Russell Bryant
74450c6eff Revert erroneous commit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-18 21:16:47 +00:00
Russell Bryant
236872e7c4 Add support for setting the maximum trunk size for IAX2 trunking
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-18 21:14:15 +00:00
Russell Bryant
ed426a7165 If Asterisk is in the middle of shutting down, respond to OPTIONS
with 503 Unavailable.

(closes issue #10994)
Reported by: eserra
Patches:
      sip-options-503.patch uploaded by eserra (license 45)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17 17:57:45 +00:00
Joshua Colp
faf4b212eb Whoops, forgot to remove the original sip_scheddestroy.
(closes issue #11010)
Reported by: vadim


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17 16:58:03 +00:00
Joshua Colp
c9638888aa Don't schedule dialog destruction if a MESSAGE is received using an existing dialog.
(closes issue #11010)
Reported by: vadim


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17 15:06:36 +00:00
Philippe Sultan
ab36dd5843 Fix the output for this channel help CLI command
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16 10:46:13 +00:00
Russell Bryant
3ba62c30b9 Make the default for the srvlookup option to be yes. It doesn't really make
sense for it to default to off.  The default configuration file has it on, and
proper RFC behavior, as indicated by a comment in the code, is for it to be on.
So, let's have it on by default to make lives easier.
(closes issue #10954, suggested by jtodd)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15 16:54:57 +00:00
Joshua Colp
437a6ffcd3 When creating a new packet don't try to stop retransmission of it. It was just allocated/created so it's impossible for it to have already been scheduled.
(closes issue #10945)
Reported by: flefoll
Patches:
      chan_sip.c.br14.85280.xmit_reliable-patch uploaded by flefoll (license 244)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11 15:26:20 +00:00
Joshua Colp
3b9fafc1e0 If devicestate is passed a port number strip it out.
(closes issue #10930)
Reported by: ibc


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-10 14:42:00 +00:00
Joshua Colp
e568fc66d9 Add support for handling a 182 Queued response.
(closes issue #10924)
Reported by: ramonpeek
Patches:
      queued-182.diff uploaded by ramonpeek (license 266)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-10 14:28:18 +00:00
Joshua Colp
474e0e8d12 Don't perform a reinvite if a transfer is in progress.
(issue #10915)
Reported by: ramonpeek


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-09 14:30:16 +00:00
Russell Bryant
21d9b7996b Do deadlock avoidance in a couple more places. You can't lock two channels
at the same time without doing extra work to make sure it succeeds.
(closes issue #10895, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-05 16:44:21 +00:00