dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

20360 Commits

Author SHA1 Message Date
mmichelson 33efacab4b Fix up some weird indentation problems in reqresp_parser.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277175 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 16:25:01 +00:00
seanbright 42de36a805 Avoid crashing when installing a duplicate translation path with a lower cost.
(closes issue #17092)
Reported by: moy
Patches:
      translate.rev254273.patch uploaded by moy (license 222)
Tested by: moy


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277143 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 15:20:40 +00:00
eliel 3e48620e65 Add Despegar.com (my main sponsor) to the CREDITS file.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277103 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 13:40:30 +00:00
oej 29255dcf4b Formatting changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277102 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 13:32:22 +00:00
oej 8f32473da8 Formatting fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277065 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 13:10:24 +00:00
oej 33d90abf9b Clarify syntax changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277028 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 12:13:45 +00:00
oej efdf295a64 Adding a few more to the list of CREDITS
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277027 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 11:45:05 +00:00
oej f217a7d160 Formatting changes (guideline corrections)
Found a unused bag of curly brackets under my table. I always wondered where 
they had gone. They where indeed needed in chan_sip.c


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276989 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 10:31:42 +00:00
oej 9bba5cccff Adding a few more credits
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276952 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 10:08:45 +00:00
oej c7a055522d Add ability to configure the Max-Forwards header in the dialplan, as well as in
sip.conf configuration for the channel and for devices.

The Max-Forwards header is used to prevent loops in a SIP network. Each intermediary,
like SIP proxys and SBCs, decrement this counter and detects when it reaches zero,
at which point the SIP request is nicely killed in a SIP-friendly way.

Review: https://reviewboard.asterisk.org/r/778/

Thanks to dvossel for the review and good advice.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276951 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 10:00:58 +00:00
oej 884f6d5489 Add a dialplan function to check if a queue exists: QUEUE_EXISTS
Review: https://reviewboard.asterisk.org/r/777/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276950 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 09:25:48 +00:00
tilghman 87c28faab4 And yet one more
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276911 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 06:04:22 +00:00
tilghman 8fc5f1be94 "Item may be used uninitialized in this function."
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276910 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 05:59:11 +00:00
mmichelson ece88387b9 Fix reversed logic of if statement.
Found based on message from Philip Prindeville on the
Asterisk Developers mailing list.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276909 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 05:42:24 +00:00
tilghman 1f0da4719a Detect the --dynamic-list flag a bit better
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276908 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 05:38:06 +00:00
tilghman 9e41a69ae8 Fix build on FreeBSD
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276871 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 04:45:33 +00:00
tilghman 34a5c533f3 Fix trunk build for Mac OS X 10.6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276870 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 04:23:02 +00:00
tilghman 22b2dbca0b Allow ipaddress to contain the maximum IPv6 address.
Also, update meetme to the full list of supported fields.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276869 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 04:18:58 +00:00
tilghman ceff8cd788 Quote AC_SUBST within m4_ifval, so it does not get prematurely expanded.
(closes issue #17654)
 Reported by: pprindeville
 Patches: 
       issue17654.diff uploaded by qwell (license 4)
 Tested by: qwell, pprindeville


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276830 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-15 23:25:09 +00:00
jpeeler 9823a33ff4 Correct not setting the bindport before attempting to open the socket.
Related to changes from 276571, I was accidentally testing with a port set in
my configuration causing me to miss this. Also moved the TCP handling as well
to occur before build_peer is called.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276788 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-15 20:21:03 +00:00
tilghman 6f7cb5d2e8 Define LLONG_MAX on systems that do not have it.
(closes issue #17644)
 Reported by: pprindeville


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276769 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-15 19:46:57 +00:00
tilghman 56f4cd3725 Fix linking asterisk on CentOS 5, which is using gcc 4.1.1. Gcc 4.1.2 has the real fix.
Review: https://reviewboard.asterisk.org/r/790/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276731 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-15 18:44:20 +00:00
jpeeler 3811ab62e0 Merged revisions 276652 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r276652 | jpeeler | 2010-07-15 08:48:58 -0500 (Thu, 15 Jul 2010) | 2 lines
  
  In a perfect world, the frame source would never be NULL. In the meantime, don't crash when it is.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276653 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-15 13:51:11 +00:00
russell 3f50182cd1 Add lua5.1 to the handy dandy list of packages.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276616 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-15 12:21:10 +00:00
jpeeler 1c30ac5dd9 Fix MWI notification transmission problems over SIP.
MWI updates were not being sent if no messages were found in the event cache.
This was corrected since a phone may need to clear its MWI status configured
previously from another mailbox.

Upon module or sip reload, MWI updates could not be sent due to the sipsock
socket not being set early enough in reload_config. The code handling the
descriptor assignment and such has simply been moved before the call to
build_peer.

Issuing a sip reload cleared the IP address of the peer, but skipped checking
the database for registration information. The database is now checked both
for sip reload and actually reloading the module.

If a transmission occurs before the do_monitor thread has started, do not
attempt to send a signal to it.

(closes issue #17398)
Reported by: ip-rob


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276571 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 22:58:24 +00:00
mmichelson ed3f5d3773 Fix errors where incorrect address information was printed.
ast_sockaddr_stringiy_fmt (which is call by all ast_sockaddr_stringify* functions)
uses thread-local storage for storing the string that it creates. In cases where
ast_sockaddr_stringify_fmt was being called twice within the same statement, the
result of one call would be overwritten by the result of the other call. This
usually was happening in printf-like statements and was resulting in the same
stringified addressed being printed twice instead of two separate addresses.

I have fixed this by using ast_strdupa on the result of stringify functions if
they are used twice within the same statement. As far as I could tell, there were
no instances where a pointer to the result of such a call were saved anywhere, so
this is the only situation I could see where this error could occur.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276570 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 22:32:29 +00:00
rmudgett 851016296b Make compile again.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276531 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 21:29:32 +00:00
tilghman 19d91b9a9b Oops, merge reverted this fix.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276493 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 21:11:09 +00:00
tilghman 943f6b879d Remove the old stub files, preferring the optional_api method.
(closes issue #17475)
 Reported by: tilghman
 
Review: https://reviewboard.asterisk.org/r/695/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276490 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 20:48:59 +00:00
kpfleming bc8a8e4c64 Don't try to call an embedded module's backup_globals() function until
after confirming it exists.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276441 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 20:15:48 +00:00
dvossel 2d1c0b787c handle special case were "200 Ok" to pending INVITE never receives ACK
Unlike most responses, the 200 Ok to a pending INVITE Request is
acknowledged by an ACK Request.  If the ACK Request for this Response is not received
the previous behavior was to immediately destroy the dialog and hangup
the channel. Now in an effort to be more RFC compliant, instead of immediately
destroying the dialog during this special case, termination is done with a BYE Request
as the dialog is technically confirmed when the 200 Ok is sent even if the ACK is
never received.  The behavior of immediately hanging up the channel remains.
This only affects how dialog termination proceeds for this one special case.

RFC 3261 section 13.3.1.4
"If the server retransmits the 2xx response for 64*T1 seconds without receiving
an ACK, the dialog is confirmed, but the session SHOULD be terminated.  This is
accomplished with a BYE, as described in Section 15."



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276439 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 19:51:08 +00:00
rmudgett d93fa33a75 Expand the caller ANI field to an ast_party_id
Expand the ani field in ast_party_caller and ast_party_connected_line to
an ast_party_id.

This is an extension to the ast_callerid restructuring patch in review:
https://reviewboard.asterisk.org/r/702/

Review: https://reviewboard.asterisk.org/r/744/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276393 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 16:58:03 +00:00
dvossel c7be695461 collapse debug code in retrans_pkt into separate lines
I've been working in this function a bunch lately, and
these huge debug strings are getting annoying.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276392 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 16:40:42 +00:00
rmudgett 8202df7633 Make compile again.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276391 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 16:39:18 +00:00
jpeeler e0b547300a Do not skip sending MWI for a peer if an address is defined. Really just a merge mistake from IPv6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276389 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 16:36:02 +00:00
tringenbach 615374b0d1 Fix documentation for pgsql cel and cdr, and slightly improve pgsql_cel.
Change the documented pgsql schema to use "timestamp" instead of "time",
as the latter is only a time without a date.

Added some missing columns for cel's pgsql schema, and corrected spelling
on some others. Updated cel's uniqueid size to be the same as the cdr.
Added id column to cel's pgsql schema and updated code to allow unknown
columns to get their default value instead of forcing 0 or empty string.

Added microseconds to the timestamp cel logs to pgsql.

Review: https://reviewboard.asterisk.org/r/734


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276349 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 16:09:11 +00:00
rmudgett ad58aa92a2 ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

Review:	https://reviewboard.asterisk.org/r/702/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 15:48:36 +00:00
lmadsen 3c0a99b844 Merged revisions 276267 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r276267 | lmadsen | 2010-07-14 06:49:01 -0500 (Wed, 14 Jul 2010) | 1 line
  
  Update documentation for voicemail.conf externpass option.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276268 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 11:51:48 +00:00
dvossel 4bbc69ca09 chan_sip: RFC compliant retransmission timeout
Retransmission of packets should not be based on how many packets were
sent, but instead on a timeout period.  Depending on whether or not the
packet is for a INVITE or NON-INVITE transaction, the number of packets
sent during the retransmission timeout period will be different, so
timing out based on the number of packets sent is not accurate.

This patch fixes this by removing the retransmit limit and only stopping
retransmission after a timeout period is reached.  By default this
timeout period is 64*(Timer T1) for both INVITE and non-INVITE
transactions.  For more information on sip timer values refer to
RFC3261 Appendix A.

Review: https://reviewboard.asterisk.org/r/749/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276219 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 22:18:38 +00:00
twilson 9e1fd43955 Revert early destruction of RTP sessions
Some code improperly assumes that the sessions are still there, so revert the
change until I can find all of them and fix them.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276206 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 21:42:42 +00:00
russell c73f59a48c Recorded merge of revisions 276126 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r276126 | russell | 2010-07-13 14:14:54 -0500 (Tue, 13 Jul 2010) | 2 lines
  
  Only reset a CDR that exists.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276127 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 19:15:47 +00:00
russell d267b93f33 Merged revisions 276123 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r276123 | russell | 2010-07-13 14:06:53 -0500 (Tue, 13 Jul 2010) | 2 lines
  
  Use chan->cdr instead of chan_cdr (just like peer->cdr instead of peer_cdr in the last commit).
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276124 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 19:09:42 +00:00
tilghman 88a041a0a2 Oops, XML documentation fix.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276122 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 19:05:17 +00:00
tilghman ca694ec28d It really cannot fail in the places below, but the stupid compiler doesn't know that.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276120 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 19:00:02 +00:00
tilghman 0d2ab49caa Weird compiler error on Bamboo.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276118 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 18:41:59 +00:00
tilghman 97ce3cc27b FILE() now supports line-mode and writing (altering) files.
(closes issue #16461)
 Reported by: skyman
 Patches: 
       20100622__issue16461.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman
 
Review: https://reviewboard.asterisk.org/r/737/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276114 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 18:31:41 +00:00
jpeeler e1bf60e202 Merged revisions 275773 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r275773 | jpeeler | 2010-07-12 15:34:51 -0500 (Mon, 12 Jul 2010) | 12 lines
  
  Make user removals and traversals thread safe in meetme.
  
  Race conditions present in meetme involving the user list where a lack of
  locking has the potential for a user to be removed during a traversal or as in
  the case of the reporter after checking if the list is empty could cause a
  crash. Fixing this was done by convering the userlist to an ao2 container.
  
  (closes issue #17390)
  Reported by: Vince
  
  Review: https://reviewboard.asterisk.org/r/746/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276074 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 17:37:40 +00:00
twilson 75b54ab02a Destroy RTP fds when we schedule final dialog destruction
Since we are only keeping the dialog around for retransmissions at this point
and there is no possibility that we are still handling RTP, go ahead and
destroy the RTP sessions. Keeping them alive for 32 past when they are used
is unnecessary and can lead to problems with having too many open file
descriptors, etc.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275998 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 17:11:37 +00:00
russell cb34928104 Merged revisions 275994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r275994 | russell | 2010-07-13 11:51:18 -0500 (Tue, 13 Jul 2010) | 14 lines
  
  Access peer->cdr directly instead of through a saved off reference.
  
  At this point in the code, it is possible that peer_cdr may be invalid.
  Specifically, in the blind transfer code, CDRs are swapped between channels.
  So, peer_cdr is no longer == peer->cdr.
  
  The scenario that exposed a crash in this code was a blind transfer that hit
  the system call limit, causing the transferee channel to get destroyed after
  the transfer attempt failed.  Even if it succeeds and this code doesn't crash,
  this code was still trying to reset a CDR on a channel that was now owned by
  a different thread, which is a BadThing(tm).
  
  (ABE-2417)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275995 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 16:53:44 +00:00
tilghman 0c42c8990e Merged revisions 275909 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r275909 | tilghman | 2010-07-13 09:47:30 -0500 (Tue, 13 Jul 2010) | 2 lines
  
  Move SQL scripts into their own database-specific directories.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275910 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13 14:48:40 +00:00