Commit graph

1669 commits

Author SHA1 Message Date
Joshua Colp
e1bb0dab37 Merged revisions 45040 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45040 | file | 2006-10-13 12:01:17 -0400 (Fri, 13 Oct 2006) | 2 lines

Complete merging in RPID screen changes (issue #8101 reported by hristo, patch by oej in revision 44757)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 16:02:27 +00:00
Luigi Rizzo
e1378c470f Try to avoid the use of 'z' modifier in cases where it is not
necessary - rather, cast the argument to int.

In this case, the string is in a UDP packet and as such
limited to 64k so its length can be safely represented in an int
without truncation (besides, this is just a debugging message!)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 11:18:01 +00:00
Luigi Rizzo
1fe21371a3 arguments to auth_headers() needed to be swapped here.
To avoid the same mistake in the future (due to slightly
confusing variable names), add a comment.

On passing, remove a redundant initialization.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 11:11:19 +00:00
Kevin P. Fleming
49b0cc8c94 eliminate compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 19:16:16 +00:00
Kevin P. Fleming
0ecfae3dbd Merged revisions 44971 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44971 | kpfleming | 2006-10-12 14:14:24 -0500 (Thu, 12 Oct 2006) | 2 lines

we can only send one 'a=ptime' attribute per media session, not one for each format

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 19:15:25 +00:00
Kevin P. Fleming
035aeb82e4 Merged revisions 44956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44956 | kpfleming | 2006-10-12 13:38:51 -0500 (Thu, 12 Oct 2006) | 10 lines

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

........
r44955 | kpfleming | 2006-10-12 13:31:26 -0500 (Thu, 12 Oct 2006) | 2 lines

ensure that IAX2 and SIP sockets allow UDP fragmentation when running on Linux (thanks to Brian Candler on the asterisk-dev list for the tip)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 18:43:52 +00:00
Luigi Rizzo
97ac6793c7 + move [almost] all instances of WWW-Authenticate/Proxy-Authenticate
and friends in a function, auth_headers(), which is used to
  simplify the interface of do_{proxy|register}_auth().
 
+ use PROXY_AUTH = 407, WWW_AUTH = 401 as values for enum sip_auth_type;

No functional change, only code cleanup.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 15:12:54 +00:00
Luigi Rizzo
59e61ae4a0 reduce indentation of two large blocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 23:36:25 +00:00
Luigi Rizzo
6d6e60be79 operator != also works between booleans...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 23:26:44 +00:00
Russell Bryant
9e2abab8fa Revert Luigi's accidental commit of his local changes when debugging some SIP
authentication issues.  This was committed in revision 44844, where the commit
message was just "small formatting cleanup", so I am pretty sure he didn't mean
to commit this part.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 13:38:37 +00:00
Luigi Rizzo
328e1c9d1c remove duplicate prototypes. Have not checked if there are more.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 13:21:33 +00:00
Luigi Rizzo
ed683ccc2a simplify and comment handle_response_peerpoke()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 13:12:31 +00:00
Luigi Rizzo
312fd57758 fix indentation of a function after previous commit
(whitespace-only change)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 12:24:57 +00:00
Luigi Rizzo
2eeaeaa7a7 handle_response_peerpoke() does not need to return anything.
(Reindentation in the next commit.)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 09:17:05 +00:00
Luigi Rizzo
510b9f04c0 small formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 08:56:09 +00:00
Joshua Colp
832014a91b Merged revisions 44819 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44819 | file | 2006-10-10 13:21:44 -0400 (Tue, 10 Oct 2006) | 2 lines

Move some stuff around so that a NOTIFY dialog won't hang around until the end of the world under certain circumstances

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 17:23:14 +00:00
Joshua Colp
1eedc8af43 Merged revisions 44806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44806 | file | 2006-10-10 12:30:00 -0400 (Tue, 10 Oct 2006) | 2 lines

Bail out if we have no refer structure and we get a refer response

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 16:31:05 +00:00
Joshua Colp
fadc6c4ed7 Merged revisions 44788 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44788 | file | 2006-10-10 11:23:14 -0400 (Tue, 10 Oct 2006) | 2 lines

Only set DTMF information if an RTP structure exists

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 15:25:05 +00:00
Luigi Rizzo
06fab1382b clarify the use of the standard SIP port number, 5060,
and rename the old DEFAULT_SIP_PORT as STANDARD_SIP_PORT
to make it clear that this is not something we can change,
unlike other defaults.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 08:08:35 +00:00
Luigi Rizzo
15fcc45c4e improve formatting of SIP packets when dumped to the verbose
output stream, so it is easier to find them in the log.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 07:40:27 +00:00
Olle Johansson
d766095219 Being pedantic... "media" is easier to understand than "data" in the function name... :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-09 11:20:02 +00:00
Luigi Rizzo
853f7ed660 slightly restructure sipsock_read() removing a "goto"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-09 09:04:30 +00:00
Luigi Rizzo
69af2cea2f use S_OR in one place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-09 08:33:52 +00:00
Luigi Rizzo
ad63b4c7c1 update_call_counter(): indentation fixes and small simplifications
at the top of the function.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 23:26:10 +00:00
Luigi Rizzo
06ef2c1907 localize some variables and reduce nesting depth
(indentation will be fixed by a separate commit).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 23:04:12 +00:00
Luigi Rizzo
dd2121b075 small simplification to initreqprep()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 22:45:01 +00:00
Luigi Rizzo
36e4f62e7c Simplify function parse_request() using a single loop instead
of two very similar ones.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 22:20:35 +00:00
Luigi Rizzo
b90f91c3b4 do not dereference p if we know it is NULL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 14:10:26 +00:00
Olle Johansson
1b64c41369 Fix some debug output for setsockopt for TOS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 20:42:27 +00:00
Olle Johansson
259f0d76b6 - move definition of global_autoframing to the same place as other globals
- set initial value at load/reload
- Add questionmarks for someone to fill in for doxygen 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 18:57:11 +00:00
Olle Johansson
12ef70f0c0 Add/change doxygen and comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 16:32:31 +00:00
Olle Johansson
9cc9c38250 Explain usage of DEFAULT_SIP_PORT
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 16:03:36 +00:00
Olle Johansson
64aae4a887 Do *NOT* use DEFAULT_SIP_PORT in these comparisions, since users may change
that, but the protocol clearly states that if we DO NOT mention a port it
is 5060. DEFAULT_SIP_PORT is whatever we default to listen to.

I believe it's the third time I revert a patch like this.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 15:38:18 +00:00
Luigi Rizzo
901a66c401 slightly restructure the code that computes the channel's name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 12:50:42 +00:00
Luigi Rizzo
a1a5824869 put repeated code to set nat mode in a function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 12:20:16 +00:00
Luigi Rizzo
bc1e5f77af put common code in a function to avoid repetitions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 11:28:38 +00:00
Luigi Rizzo
b37dc86c74 remove hardwired usage of 5060, use DEFAULT_SIP_PORT instead
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 11:11:39 +00:00
Luigi Rizzo
e691246b6e improve and document function get_in_brackets(), introducing
a helper function find_closing_quote() of more general use.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 09:36:09 +00:00
Luigi Rizzo
6466c2ebf9 when possible, use ast_set2_flags instead of ast_set/ast_clr .
Also mark XXX some dubious places.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 08:56:59 +00:00
Luigi Rizzo
ccca5843fd Two things:
1. slightly rearrange/simplify the parsing of the argument in sip_register.
   This brings in a patch that has been in Mantis (5834)  for ages,
   and is the larger part of the commit;

2. implement the "contact" option for peers, similar to the one in users.conf:

   If you put a "contact" option with a non-empty argument (e.g. contact=123)
   in a peer section, asterisk will register with the provider as if you had a     

        register= username:secret@host/contact 

   line in the general section.

The latter is a very small is a new feature so i am not putting it
in the 1.4 branch, although the "contact" option in user.conf is
already in the 1.4 branch and so it wouldn't be too strange to
merge it.

Note that the implementation of "contact" is much simpler than
the one in 5834, and limited to a few lines in build_peer().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-06 15:41:12 +00:00
Olle Johansson
cb127f4baa Remove deprecated "incominglimit" config option
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-06 09:01:09 +00:00
Joshua Colp
0b26b56316 Merged revisions 44486 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44486 | file | 2006-10-05 14:01:51 -0400 (Thu, 05 Oct 2006) | 2 lines

One more T.38 fix! Don't leave a reinvite hanging by a thread if the other side is already setup with T.38

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 18:03:34 +00:00
Joshua Colp
9924c3e2e9 Merged revisions 44450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44450 | file | 2006-10-04 22:40:40 -0400 (Wed, 04 Oct 2006) | 2 lines

Don't totally bail out if T.38 was negotiated

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 02:43:07 +00:00
Kevin P. Fleming
975ef9de9d Merged revisions 44433 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44433 | kpfleming | 2006-10-04 20:30:05 -0500 (Wed, 04 Oct 2006) | 10 lines

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

........
r44432 | kpfleming | 2006-10-04 20:27:57 -0500 (Wed, 04 Oct 2006) | 2 lines

fix Polycom presence notification again

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 01:30:44 +00:00
Kevin P. Fleming
50bcacbdbd Merged revisions 44393 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44393 | kpfleming | 2006-10-04 16:17:30 -0500 (Wed, 04 Oct 2006) | 11 lines

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

........
r44392 | kpfleming | 2006-10-04 16:15:29 -0500 (Wed, 04 Oct 2006) | 3 lines

remove workaround for old Polycom firmware SUBSCRIBE requests
add workaround for new Polycom firmware SUBSCRIBE requests (bug is known to exist in 2.0.1 firmware)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 21:20:55 +00:00
Kevin P. Fleming
3c876af5cf Merged revisions 44378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines

update thread creation code a bit
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space
add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 19:51:38 +00:00
Joshua Colp
6727e8f599 Merged revisions 44284 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44284 | file | 2006-10-03 14:35:55 -0400 (Tue, 03 Oct 2006) | 2 lines

Use VideoSupport instead so it is considered a valid XML attribute name. (issue #8075 reported by renemendoza)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 18:37:06 +00:00
Matt O'Gorman
ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +00:00
Joshua Colp
fadd9e7831 Merged revisions 44215 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44215 | file | 2006-10-02 16:11:02 -0400 (Mon, 02 Oct 2006) | 10 lines

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

........
r44213 | file | 2006-10-02 16:07:59 -0400 (Mon, 02 Oct 2006) | 2 lines

Change the fd on the I/O context in case it changed during the reload, which is indeed possible. (issue #7943 reported by eclubb)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 20:13:26 +00:00
Mark Spencer
847fe77eb9 Don't use channel when you don't mean a channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 02:38:52 +00:00
Paul Cadach
d2087e6a09 Merged revisions 44078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44078 | pcadach | 2006-09-30 22:12:23 +0600 (Сбт, 30 Сен 2006) | 6 lines

Fix issue #7928 correctly. Next is a comment of previous fix:

Issue #7928 - Don't send both 404 and 503. Fix by phsultan with
a small fix by me, myself or I. Thanks, Philippe!
(This was caused by my changes to the transaction handling)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-30 16:15:53 +00:00
Paul Cadach
031cd452d9 Merged revisions 44068 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44068 | pcadach | 2006-09-30 10:37:39 +0600 (Сбт, 30 Сен 2006) | 14 lines

Found some buggy SIP clients (phones Planet VIP-153T firmware
1.0, Linksys PAP2 firmware 3.1.9(LSc)) which sends ACK not on OK
message only (when remote party answers) but on RINGING message
too, so when we send 200 OK message, we get unidentified ACK
message (because INVITE acknowledged on RINGING message already),
so 200 OK retransmits within its retransmission interval then
call gets dropped.

If someone else knows how to provide workaround for such cases,
please, fix it in correct way.

Thanks to ssh from #asteriskru for provide access to his box to
study and fix this case.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-30 04:41:04 +00:00
Joshua Colp
29d27bfe0d Merged revisions 43933 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43933 | file | 2006-09-28 14:05:43 -0400 (Thu, 28 Sep 2006) | 2 lines

Put in missing \ns on the end of ast_logs (issue #7936 reported by wojtekka)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 18:09:01 +00:00
Joshua Colp
8785d7229f Add jitterbuffer information to sip list settings (issue #7945 reported by sergee)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 17:07:37 +00:00
Joshua Colp
fcad797dfd Merged revisions 43774 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43774 | file | 2006-09-27 12:23:12 -0400 (Wed, 27 Sep 2006) | 2 lines

Make rfc2833compensate a global option. 

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 16:25:45 +00:00
Joshua Colp
98873d34bd Merged revisions 43707 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43707 | file | 2006-09-26 16:47:26 -0400 (Tue, 26 Sep 2006) | 10 lines

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

........
r43705 | file | 2006-09-26 16:38:06 -0400 (Tue, 26 Sep 2006) | 2 lines

Use proper type to represent the group variable (issue #8025 reported by makoto)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 20:51:36 +00:00
Luigi Rizzo
4d188126d9 style fix:
move variable declaration at the beginning of the block.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-22 14:56:21 +00:00
Joshua Colp
323527b4f3 Oh look more changes, but these are my own! (Clean up module load functions)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 22:53:17 +00:00
Tilghman Lesher
f14dc5fab4 And some deprecated APIs and modifications to documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 22:23:49 +00:00
Tilghman Lesher
6ae8741518 Lots more removal of deprecated things
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:59:12 +00:00
Joshua Colp
1c764935f2 SS7 marked the start of an open season for trunk again but here's something minor - abstract early bridging into the technology so that we don't always assume they use RTP and try it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 19:27:26 +00:00
Tilghman Lesher
70af28270d Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:40:39 +00:00
Matt O'Gorman
d0a1a0033d similar patch for verbose vs debug with minor changes
bug 2617


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:23:45 +00:00
Joshua Colp
3c732537bc Improve output of sip show peers (issue #6624 reported by mavetju with minor code changes by myself)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 15:23:39 +00:00
Matt O'Gorman
465adf2bf1 allow for packetization on rtp channel drivers, need to add
option for setting our own packetization as apposed to just doing 
what is asked.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 23:32:57 +00:00
Olle Johansson
42a56b7a5a Merging patch from 1.2 - Issue #7682
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 20:13:14 +00:00
Olle Johansson
b93280947a Issue #7351 - sending CANCEL when the call at some point has been in UP state is wrong.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:56:44 +00:00
Kevin P. Fleming
fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Kevin P. Fleming
c2c4f86c72 merge markster's usersconf branch with some slight changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 23:53:58 +00:00
Olle Johansson
948533a791 Issue #7924 - cmaj - Turn off silence suppression if no channel owner
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-12 14:22:55 +00:00
Olle Johansson
50b6a222ef Issue #7928 - Don't send both 404 and 503. Fix by phsultan with a small fix by me, myself or I.
Thanks, Philippe! 
(This was caused by my changes to the transaction handling)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-12 14:17:33 +00:00
Olle Johansson
d970a07b1c If we've found a T38 SDP line, stop looking for more on the very same line
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-12 00:32:18 +00:00
Olle Johansson
da55c166dc More formatting fixes and doxygen stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:49:10 +00:00
Olle Johansson
d37002287b Add comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:27:11 +00:00
Olle Johansson
8868c4e1ca - Use enum for send-request reliability flags
- Make re-invites CRITICAL 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:24:35 +00:00
Olle Johansson
31fa147b76 More formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:14:58 +00:00
Olle Johansson
4c081033b6 More formatting/doxygen updates to keep me occupied
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:04:33 +00:00
Olle Johansson
421f2b076d Ignore this. Only whitespace fixes while being bored.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 18:45:10 +00:00
Olle Johansson
2984fbc068 Change from "r" as a variable name to "dialog". "r" is commonly used for registrations,
not dialogs, in other places of the code...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 18:14:02 +00:00
Olle Johansson
e7b882961e Use Timer T1 for dialog timeouts/destruction
(If you have qualify=yes, we will use the actual roundtrip time)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 18:06:44 +00:00
Tilghman Lesher
237fbf35fc If the leading underscore is not stripped before comparison,
pbx_builtin_getvar_helper() will never find the associated variable.
(Bug 7892)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-10 17:35:08 +00:00
Olle Johansson
5a622d032e Don't destruct sessions prematurely. Especially not when we want reliable retransmissions...
If this works properly, we might have to check 1.2 to implement a backport.

The theory is that if you get a final reply in a session, it is ok to destroy the session.
If you send a final reply, you need to keep the session open for potential retransmits
from the other side. If you send a HANGUP/CANCEL, wait to the other side confirms
or until you have a timeout. If you send HANGUP/CANCEL/ACK reliably, don't destroy
the session so that you cancel the needed retransmits.

I will have to change the timer to 64*T1, but that will be a separate patch. That will
mean that if we know the roundtrip time, we can destroy sessions quicker.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:44:36 +00:00
Olle Johansson
01714e962b importing rev 42535 from 1.2 (which by mistake was actually imported from svn trunk)
- Maybe the first circular commit?


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:25:18 +00:00
Olle Johansson
d0cbbaf8d7 Don't destroy pvt prematurely. Wait for answer or timeout.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:01:59 +00:00
Olle Johansson
562b491a85 Clear proper flag
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:00:19 +00:00
Joshua Colp
53cf63c33a Convert some warnings into debug messages since they can exist under perfectly normal circumstances that the user shouldn't care about (issue #7894 reported by stephen_dredge)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 16:51:11 +00:00
Olle Johansson
bd4e57a873 Make sure we handle CANCEL/ACK properly (imported with mods from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-04 15:57:26 +00:00
Joshua Colp
e43b830a9d Merged revisions 41768 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41768 | file | 2006-09-01 18:49:07 -0400 (Fri, 01 Sep 2006) | 2 lines

Only wipe the redirected audio & video IP/port if it's specified, and trigger a reinvite.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 22:51:46 +00:00
Joshua Colp
0be2884d80 If we are doing video and we can't reinvite, then resort to generic bridging instead of Packet2Packet since video isn't supported there yet. (reported by PCadach in #asterisk-bugs)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 17:54:22 +00:00
Joshua Colp
8ee7419d26 If no number is specified in the SIP_HEADER dialplan function, then just use the first one. (issue #7854 reported by sxpert and issue #7863 reported by hristo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:19:03 +00:00
Matt O'Gorman
05a695af72 everything that loads a config that needs a config file to run
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it 
had a non static function when it should.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00:20 +00:00
Joshua Colp
c6977b9983 Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 01:59:02 +00:00
Olle Johansson
6ca927457d Why check bridgepeer twice?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 20:24:32 +00:00
Olle Johansson
18164dec14 Don't add headers to an uninitialized eq (from issue 7694 garyhai, but not
a resolution to that bug report)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:51:31 +00:00
Olle Johansson
13eb698ce7 Note to myself: Remember Russell's note: Always compile first...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:20:29 +00:00
Olle Johansson
2c98238fbe Mark ALERT_INFO as deprecated. This can now be done with the sipaddheader() application and
does not need special code in chan_sip any more.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:16:53 +00:00
Olle Johansson
0ace854142 Issue #7572 (Boesl) - hangup channel that get buggy 487 response (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:07:21 +00:00
Olle Johansson
7aa333c9ef Issue #7822 - don't issue SRV lookups if it's disabled. (barthek)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 14:36:46 +00:00
Joshua Colp
12b6ec4e11 Use an API call (ast_rtp_get_bridged) to return the RTP stream we are bridged to, and also use it in chan_sip so we know to ignore the no RTP activity checking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 03:16:03 +00:00
Joshua Colp
c70ed7614a Merge in RTP-level packet bridging. Packet comes in, packet goes out - that's what RTP-level packet bridging is all about!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-28 17:37:56 +00:00
Joshua Colp
1c182a606a Allow an offset for SIP_HEADER so you can get more then 1 header of the same name if they exist. Why someone would want to grab something like Via headers from dialplan I don't exactly know, but okay. (issue #7563 reported by Corydon76)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:33:42 +00:00
Kevin P. Fleming
0a27d8bfe5 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00
Russell Bryant
a8272afb1f fix the use of an uninitialized variable (issue #7746, pointed out by garyhai)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 19:14:20 +00:00
Joshua Colp
59766196ea Move things around a bit more for onhold support, and add a check to only decrement the onhold variable if it's greater then 0. (issue #7740 reported by AuPix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 15:34:50 +00:00
Russell Bryant
9f9a5f1984 move the calls to ast_jb_configure() to before the PBX thread is started on the
channel to remove the theoretical race condition that the channel could get
bridged before the channel's jitterbuffer gets configured.  This was pointed
out by PCadach on IRC.  Thanks!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 03:43:47 +00:00
Russell Bryant
fff5a55af6 print a more user friendly error message with the text representation of codecs
(issue #7233, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:28:38 +00:00
Russell Bryant
65373a1987 reduce duplicated code by using print_codec_to_cli in sip_show_user as it is
already used in sip_show_peer (issue #7739, DEA)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:17:38 +00:00
Joshua Colp
4ebd436c85 Add support to see if a peer has someone on hold, and fix a small bug with getting the state name. This one goes out to you mog!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-10 02:41:20 +00:00
Russell Bryant
92bd7f19f7 Merge team/russell/ast_verbose_threadstorage
- instead of defining a free() wrapper in a bunch of files, define it as
  ast_free() in utils.h and remove the copies from all the files.

- centralize and abstract the code used for doing thread storage. The code
  lives in threadstorage.h, with one function being implemented in utils.c.
  This new API includes generic thread storage as well as special functions
  for handling thread local dynamic length string buffers.

- update ast_inet_ntoa() to use the new threadstorage API
- update ast_state2str() to use the new threadstorage API
- update ast_cli() to use the new threadstorage API

- Modify manager_event() to use thread storage. Instead of using a buffer of
  4096 characters as the workspace for building the manager event, use a thread
  local dynamic string.  Now there is no length limitation on the length of the
  body of a manager event.

- Significantly simplify the handling of ast_verbose() ...
  - Instead of using a static char buffer and a lock to make sure only one
    thread can be using ast_verbose() at a time, use a thread local dynamic
    string as the workspace for preparing the verbose message. Instead of
    locking around the entire function, the only locking done now is when the
    message has been built and is being deliviered to the list of registered
    verbose message handlers.
  - This function was doing a strdup() on every message passed to it and
    keeping a queue of the last 200 messages in memory. This has been
    completely removed. The only place this was used was that if there were
    any messages in the verbose queue when a verbose handler was registered,
    all of the messages in the queue would be fed to it.  So, I just made sure
    that the console verbose handler and the network verbose handler (for
    remote asterisk consoles) were registered before any verbose messages.
    pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at
    startup, but I didn't feel the performance hit of this message queue was
    worth saving the initial verbose output for these very rarely used modules.
  - I have removed the last three arguments to the verbose handlers, leaving
    only the string itself because they aren't needed anymore. For example,
    ast_verbose had some logic for telling the verbose handler to add
    a newline if the buffer was completely full. Now that the buffer can grow
    as needed, this doesn't matter anymore.
  - remove unused function, ast_verbose_dmesg() which was to dispatch the
    message queue
  - Convert the list of verbose handlers to use the linked list macros.

- add missing newline characters to a few ast_verbose() calls

- convert the list of log channels to use the linked list macros in logger.c

- fix close_logger() to close all of the files it opened for logging

- update ast_log() to use a thread local dynamic string for its workspace
  for preparing log messages instead of a buffer of size BUFSIZ (8kB on my
  system) allocated on the stack.  The dynamic string in this case is limited
  to only growing to a maximum size of BUFSIZ.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 06:32:04 +00:00
Olle Johansson
a42c164879 Fix accidental removal of if() in commit 38905
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 16:20:23 +00:00
Olle Johansson
b57c238260 Issue #7651 - always send subscription-state (AuPix)
Small change to the fix in the report.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 09:22:43 +00:00
Russell Bryant
9892054414 Merged revisions 38950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38950 | russell | 2006-08-05 03:21:12 -0400 (Sat, 05 Aug 2006) | 3 lines

don't advertise that this function can set a SIP header when it can only
do reads

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 07:22:27 +00:00
Russell Bryant
663adb2b0e Merged revisions 38903-38904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38903 | russell | 2006-08-05 01:07:39 -0400 (Sat, 05 Aug 2006) | 2 lines

suppress a compiler warning about the usage of a potentially uninitialized variable

........
r38904 | russell | 2006-08-05 01:08:50 -0400 (Sat, 05 Aug 2006) | 10 lines

Fix an issue that would cause a NewCallerID manager event to be generated
before the channel's NewChannel event.  This was due to a somewhat recent
change that included using ast_set_callerid() where it wasn't before.  This
function should not be used in the channel driver "new" functions.
(issue #7654, fixed by me)

Also, fix a couple minor bugs in usecount handling.  chan_iax2 could have
increased the usecount but then returned an error.  The place where chan_sip
increased the usecount did not call ast_update_usecount()

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 05:26:29 +00:00
Joshua Colp
e306f812df Don't assume that a referred by URI will always exist (issue #7641 reported and fixed by AuPix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-04 18:40:47 +00:00
Kevin P. Fleming
1b784cd1f7 Merged revisions 38731 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38731 | kpfleming | 2006-08-02 14:29:56 -0500 (Wed, 02 Aug 2006) | 3 lines

fix brain-damage I introduced when trying to fix the CANCEL/BYE sending mechanism for pending INVITES
accept unknown 1xx responses as 183 responses (as RFC3261 mandates we should do)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-02 19:32:38 +00:00
Kevin P. Fleming
ec2e7aee56 Merged revisions 38611 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38611 | kpfleming | 2006-07-31 16:14:11 -0500 (Mon, 31 Jul 2006) | 4 lines

don't reissue hangup requests for SIP channels that have expired their RTP timeouts (one time is enough)
don't rescan the SIP private structure list too fast, it can cause channels to not be able to hang up (issue #7495, and probably others)
use ast_softhangup_nolock() since we already hold the channel's lock

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 21:31:44 +00:00
Russell Bryant
450db95711 add macros for the pure and const attributes to compiler.h, in case they ever
need to be handled differently for a specific compiler


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 22:50:54 +00:00
Russell Bryant
d6246e579f Add the function attribute "pure" or "const" to various functions that perform
int to string or string to int operations.

"pure" essentially says that this function has no side effects aside from its
result, and the result depends on nothing else other than its arguments and
global variables.  "const" is a more strict form of "pure", where the function
also doesn't access any global variables.

From the gcc manual: "Such a function can be subject to common subexpression 
elimination and loop optimization just as an arithmetic operator would be."
This also tells the compiler that it is safe to call the function fewer times
than the code says to, given the same arguments, since the result will always
be the same.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 22:14:49 +00:00
Joshua Colp
48c09ef517 Merged revisions 38420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38420 | file | 2006-07-28 14:49:00 -0400 (Fri, 28 Jul 2006) | 2 lines

Make a copy of the request URI in check_user_full instead of modifying the one on the structure, and also strip params properly from the user portion of the SIP URI so as to preserve the domain (issue #7552 reported by dan42)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 18:53:43 +00:00
Russell Bryant
1df50be628 Merged revisions 38288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38288 | russell | 2006-07-26 21:58:41 -0400 (Wed, 26 Jul 2006) | 3 lines

fix a crash when MALLOC_DEBUG is enabled and the regexten is enabled. The crash
would occur when the extension got removed. (fixes issue #7484)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 02:00:20 +00:00
Joshua Colp
6d52c0b559 Merged revisions 38234 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38234 | file | 2006-07-26 11:26:06 -0400 (Wed, 26 Jul 2006) | 2 lines

Put default callerid into contact when the one specified is either NULL or has a zero string length. (issue #7590 reported by key2)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26 15:27:45 +00:00
Joshua Colp
cbf79ca489 Start out with cleared RTP payload structures instead of defaults. This should prevent issues where if a stream (audio/stream) is not present and it's RTP payload structure is combined with the overall capability then the capability would be every codec that Asterisk supports.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 15:47:59 +00:00
Luigi Rizzo
2c3bc8b1b3 move middle-of-the-block declaration at the top.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 11:46:27 +00:00
Joshua Colp
6810884f60 Only deal with getting the supported payloads on audio if an audio RTP stream exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 03:42:27 +00:00
Russell Bryant
d897bd41c2 use ast_atomic_fetchadd_int in chan_zap, sip, and iax2 for usecount handling
and fix a couple little things in passing
 - usecnt was not initialized in chan_iax2
 - ast_update_use_count() was not called after incrementing the count in chan_sip


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-22 00:33:56 +00:00
BJ Weschke
f2611e36c3 This corrects the crash condition present in #7575, but I'm not really sure if it's the "right" fix. Please review and make any adjustments you see necessary.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21 19:10:58 +00:00
Russell Bryant
ca9ba719b6 Merge a new implementation of ast_inet_ntoa, our thread safe replacement for
inet_ntoa, which uses thread specific data (aka thread local storage) instead
of stack allocatted buffers to store the result.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21 17:31:28 +00:00
Joshua Colp
1861dcdff5 Only bitmaskify the RTP payload structure for video if an RTP structure exists for it... otherwise the default values will cause codec combination madness
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-20 18:42:22 +00:00
North Antara
1edb21b423 Fix a few doxygen warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 22:40:36 +00:00
Kevin P. Fleming
6d0742fc16 merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 20:44:39 +00:00
Kevin P. Fleming
e8d711723a revert this morning's incorrect indentation change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 13:50:19 +00:00
Mark Spencer
837910062b First pass at in-place file manipulation via manager
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 13:28:38 +00:00
Kevin P. Fleming
4376af0080 actually make the non-standard G726-32 behavior available for SIP clients
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 20:35:41 +00:00
Kevin P. Fleming
ead48c38cb Merged revisions 37531 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37531 | kpfleming | 2006-07-13 11:44:23 -0500 (Thu, 13 Jul 2006) | 2 lines

report address of peer trying to subscribe to unknown hint

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 16:47:20 +00:00
Kevin P. Fleming
fd9c9ec28f allow users of RTP to use G726-32 AAL2 packing even when RFC3551 packing has been requested (Sipura/Grandstream ATAs and others will need this)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 01:38:47 +00:00
Russell Bryant
4316a871ac repeat after me ...
I WILL TYPE "make" BEFORE COMMITTING ANY CODE


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 19:25:50 +00:00
Olle Johansson
8cd5ad1755 Re-enable RTCP quality reports
(Bug found in SIP Master Class, Chicago)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 19:09:55 +00:00
Russell Bryant
7828780bb7 eliminate some pointer signedness warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 07:03:42 +00:00
Joshua Colp
1fb6111c18 Merged revisions 37173 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37173 | file | 2006-07-06 11:48:07 -0400 (Thu, 06 Jul 2006) | 2 lines

Instead of giving the scheduled item ID on a peer expiration, give the time until they expire (issue #7455 reported by slavon)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 15:55:05 +00:00
Olle Johansson
c5660895a8 Draft became RFC...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 15:56:13 +00:00
Olle Johansson
f9df5318ce Specify digest algorithm for picky clients
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-04 14:54:55 +00:00
Olle Johansson
c6ab7e7164 Increase buffer size for routing headers. When routing with enc.keys within
route headers, we're reaching the limimt for what's possible in one UDP packet...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 15:10:22 +00:00
Olle Johansson
2f6f0b19c5 Raise debugging level for message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 07:25:33 +00:00
Russell Bryant
73e8e2ab1f Blocked revisions 36725 via svnmerge
........
r36725 | russell | 2006-07-03 00:19:09 -0400 (Mon, 03 Jul 2006) | 4 lines

use ast_set_callerid to be more consistent and to make sure that the
"callerid" option in the conf files is always handled the same way and sets ANI
(issue #7285, gkloepfer)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 04:25:21 +00:00
Olle Johansson
8affb4c1f8 Issue #7421 - Hold status not working fully. Thanks jmls for a good job debugging!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 19:53:54 +00:00
Olle Johansson
4c8e3bcdca users want code to compile, really.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 17:14:32 +00:00
Olle Johansson
e995afbd10 Formatting and debug output fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 16:42:53 +00:00
Olle Johansson
765e420458 tell the other side that we're using 20 ms packetization for iLBC
- we need to investigate support for refusing offers of 30 ms (like the Nokia
  e-series) or supporting it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 14:18:00 +00:00
Olle Johansson
b971f65978 - Make use of system name in realtime SIP peers optional
- Fix small issue with SIP history


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 12:00:36 +00:00
Joshua Colp
59be0b03b7 Fix up a few log messages in chan_sip (issue #7449 reported by tgrman)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 15:29:15 +00:00
Olle Johansson
8d4ace1a0a Store sysname even if we do not store fullcontact (thanks tholo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 07:22:47 +00:00
Olle Johansson
a38e7f01a9 ...too early in the morning for commits in Bergen, Norway...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:59:10 +00:00
Olle Johansson
d92de40c2f Add support for a=inactive in SDP for holding. This is not very well documented
in RFCs, as they keep referring to each other in a circular pattern in regards
to this item, but since the Nokia SIP/GSM phones use this, we might as well
start supporting it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:15:12 +00:00
Olle Johansson
dd94255a69 Don't delete initid scheduled item twice... Thanks, vecher, for bugging me about this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 20:54:06 +00:00
Olle Johansson
f12f5b7c6c Formatting and doxygen fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 19:28:04 +00:00
Olle Johansson
6d86697867 issue #7033 - Don't burst pokes to peers at load or reload.
Open for a cool algorithm to space them out...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 18:00:09 +00:00
Olle Johansson
6895f108bd Inspired by issue 6742, but solved in a different way.
(Yes, I like the system name setting)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 17:30:14 +00:00
Olle Johansson
6ca399c459 Don't change direction of the dialogue when we send a re-invite
(will confuse to/from headers and to/from tags)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 10:54:57 +00:00
Olle Johansson
0dbb924cb5 Found a missing "l" on the left side of the sofa, close to the TV.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 20:43:49 +00:00
Olle Johansson
66786a7d53 Issue #7421 - Stop generator on both call legs (patch by tgrman)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 20:41:54 +00:00
Olle Johansson
1cbd4effca Issue #7429 - accessing a not allocated structure causes segfault... (tgrman, fix by myself
inspired by suggested fix).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 19:07:32 +00:00
Kevin P. Fleming
93385c0fab fix for issue #7245
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 17:24:14 +00:00
Olle Johansson
9863bb982c Separate private options so we don't request bug report on those...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 08:25:33 +00:00
Olle Johansson
8ee441b649 Update the SIP options list from IANA repository
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 07:45:03 +00:00
Tilghman Lesher
b3c6e18a5e Merged revisions 35915 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r35915 | tilghman | 2006-06-25 10:10:06 -0500 (Sun, 25 Jun 2006) | 2 lines

Bug 7425 - Size of buffer is passed in by len

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-25 15:12:02 +00:00
Russell Bryant
c8ceb92a4f revert my changes that converted the jb on the channel to be dynamically
allocated. These changes caused crashes when using a channel type that did
not support the jitterbuffer. Instead of fixing why it's crashing, I'm going
to implement this in a better way next week. The way I did it caused a
jitterbuffer to be allocated on every channel where the channel type supported
jitterbuffers, even if they were disabled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 16:49:12 +00:00
Russell Bryant
46018d5032 - dynamically allocate the ast_jb structure that is on the channel structure
so that channels not using a jitterbuffer don't waste as much memory
- ensure that the channel drivers that use jitterbuffers can handle a failure
  from configuring a jitterbuffer on a new channel because of a memory
  allocation error
- On passing through these channel drivers, configure the jitterbuffer before
  starting the PBX thread instead of afterwards. If the pbx fails to start for
  whatever reason, this would have caused a crash.
- Also on passing, move the increase of the usecount to after all of the
  possible failure conditions in the function
- fix a place where ast_update_use_count() was not called
- ensure that the owner channel pointer of the channel pvt strcutures is set to
  NULL in failure conditions


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 17:05:17 +00:00
Olle Johansson
a256bcb080 Issue #7380 - Cannot put a one-legged call on hold/off hold
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 19:58:03 +00:00
Olle Johansson
58c243a6d4 Only formatting changes... (tabs to spaces)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 17:05:38 +00:00
Olle Johansson
7876a86e96 - Doxygen and some formatting fixes in res_features
- Get rid of compiler warnings in chan_sip


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 07:49:29 +00:00
Olle Johansson
a85fec94fd Finally fix parking and go back to metermaids
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 07:13:20 +00:00
Olle Johansson
12164df2fd How many times can we free allocated memory? Many, obviously... ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 21:12:58 +00:00
Olle Johansson
b27fff2a9d Hunting crash when parking calls with SIP REFER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 21:09:50 +00:00
Olle Johansson
0195279499 use correct test for checking if sip domains are enabled or not
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 15:46:49 +00:00
Olle Johansson
cb4221c7e9 Don't count unknown media streams as media streams in the offer... (Fenlander reported this on irc)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 13:31:42 +00:00
Olle Johansson
e04914b44a parse SDP properly even when we are debugging. (Thanks fenlander!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 13:28:33 +00:00
Olle Johansson
3b910323f3 Issue #6820 - SIP channels hang in semi active state
- Block fix from 1.2
- Implement part of that fix that was not already implemented, but in a different way

basically, don't cancel destruction when we receive re-transmits.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 10:34:53 +00:00
Olle Johansson
bce5b8a146 - Formatting
- Create larger buffer for managing long auth headers from clients (adviced by SNOM)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 21:09:24 +00:00
Olle Johansson
2813d15f52 Hoppsan!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 13:00:55 +00:00
Olle Johansson
83e64c7c94 - Do not require a space at the end of the m= string in a T38 re-invite
Bug reported in the t38 issue report, but by mistake ignored before commit.
  Thanks to everyone informing me about this, and Corydon for helping me sort
  out sscanf :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 06:35:55 +00:00
Olle Johansson
8fd35365f5 Add some debug logging
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 15:15:29 +00:00
Olle Johansson
4b6d6a1a0b Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 11:40:31 +00:00
Matt O'Gorman
b22e7bf558 adds support for t38 pass through patch brought up to trunk from
bug 5090 by josh colp.  Thanks to everyone who help get this patch through
especially to the author Steven Underwood.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 18:35:53 +00:00
Russell Bryant
55ffe394a5 only set the QOS variables if the pvt has an owner so that they are not
created as global variables.  (The fact that these were getting created on
my system probably means that these are in the wrong place so oej, you may
want to look at this again.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 21:01:48 +00:00
Olle Johansson
1ec28daa30 Formatting fix and doxygen update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:07:35 +00:00
Olle Johansson
2ab4e12549 Fix typo (Thanks Vechers!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:01:05 +00:00
Olle Johansson
5d3d87900e - Remove redundant forward declaration
- Change variable name to make register_verify more readable (p -> peer not pvt in this function)
- Get Contact: header only once instead of twice
- Add some comments to register_verify

Caused by issue #7327... :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 15:17:18 +00:00
Olle Johansson
e41fcca65a - Complete addition of forward declarations and grouping of functions
- Change/add comments
- Declare internal function as static
- Remove functionname: in descriptions of functions
- Move Enums to top of file


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 20:42:11 +00:00
Olle Johansson
8ef5092031 Issue #7325 - Parse string after URI decoding (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 21:32:48 +00:00
Olle Johansson
d2fa9efdad Store RTCP reports in channel variables and SIP history
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 21:28:52 +00:00
Olle Johansson
6d4ab87321 - RTP debug message formatting
- Add rtcp report to SIP history


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 21:09:42 +00:00
Olle Johansson
8bee8de932 Another try at hanging up the transferer channel after the masq
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 20:09:55 +00:00
Olle Johansson
bcf82f32d5 Don't force context for domain= setting (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 15:57:28 +00:00
Olle Johansson
2366793c63 Remove the return value from functions that return something that is never checked anywhere.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 13:35:41 +00:00
Olle Johansson
ce10b34ca6 Enabling and disabling debug messages...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 09:38:13 +00:00
Kevin P. Fleming
09778b268e move 'struct ast_rtp' back to rtp.c where it belongs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 23:10:45 +00:00
Olle Johansson
36506dad2d Debug logging fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:30:20 +00:00
Olle Johansson
fee02a9b7d At least reply if we get a fatal error in handling a packet.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:14:54 +00:00
Olle Johansson
91732256db Don't crash if chan2 does not exist (one-legged call situations, like echo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:07:05 +00:00
Olle Johansson
b796bf414b Improve SIP history
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:06:04 +00:00
Olle Johansson
89081c3d06 Issue #7294 - Asterisk sends INVITE instead of BYE. Fix by Philippe Sultan. Thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 18:13:06 +00:00
Kevin P. Fleming
472c1ca282 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Olle Johansson
479181951a Merge of the "sdpcleanup" branch. Thanks to John Martin for a lot of tests
and some patches (all disclaimed).

- Don't change RTP properties if we reject a re-INVITE
- Don't add video to an outbound channel if there's no video on the inbound channel
- Don't include video in the "preferred codec" list for codec selection
- Clean up and document code that parses and adds SDP attachments

Since we do not transcode video, we can't handle video the same way as audio. This is a
bug fix patch. In future releases, we need to work on a solution for video negotiation,
not codecs but formats and framerates instead.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 16:09:33 +00:00
Olle Johansson
8bc0599b11 Issue 7208 - Handle ; in userinfo part of URI too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 07:43:40 +00:00
Olle Johansson
404f8db694 Do not use ':' as a separator between arguments (kept around for 1.4 for backwards compatibility)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 06:36:18 +00:00
Olle Johansson
62dd0dc6f2 Only override callingpres set by rpid if user/peer preference is set. (Issue #7240)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 06:23:22 +00:00
Olle Johansson
02bc3637da Code simplification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 21:13:48 +00:00
Olle Johansson
d520d238f1 - Fix more problems in transfer code (thanks Tholo!)
- Add debug for hangup not in UP state


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 21:01:13 +00:00
Olle Johansson
043b765bdc Respond to some of Luigis questions...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 19:18:24 +00:00
Olle Johansson
e97507e8fb Fix potential bug. THanks luigi!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 18:58:27 +00:00
Olle Johansson
0d6906e107 - Doxygen fix
- Debug message change


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 18:35:29 +00:00
Olle Johansson
c2b50fd2bd Show max bitrate in "sip show user" and "sip show channel"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 17:35:30 +00:00
Olle Johansson
439e4963ab - Typo in chan_sip (: missing)
- Only print formats once in dumpchan()


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 11:09:14 +00:00
Luigi Rizzo
531ed6f290 add a bit of comment on what build_route does,
plus minor code simplification.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 00:09:13 +00:00
Luigi Rizzo
88077a4d1f remove some duplicated code;
fix indentation on one line;
mark XXX some unreachable code;
mark XXX another place where we could reduce the nesting depth.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:58:32 +00:00
Luigi Rizzo
2724885b78 small simplification in assignments, and fix a typo in a comment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:46:23 +00:00
Luigi Rizzo
24d1d23a93 mark XXX some places where there is a return right before
a large "else" block, which is suitable for a reduction of
the nesting depth.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:34:01 +00:00
Luigi Rizzo
8dbdd8518b fix indentation of a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:23:24 +00:00
Luigi Rizzo
d18e363523 some code simplifications using S_OR() to remove some if blocks
and duplicate code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:17:54 +00:00
Luigi Rizzo
ec46b5a4ce use ast_skip_blanks() where appropriate, and use standard
C jargoon  *foo++ = '\0'; instead of two separate statements.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:03:29 +00:00
Luigi Rizzo
b7b716b618 mark XXX a buggy section of code and implement a probable
replacement (leave the original in case my code does not
do what the function was meant to do).
oej, please check this...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 22:56:45 +00:00
Luigi Rizzo
7483e1d2b6 simplify logic in a small block of code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 22:29:37 +00:00
Luigi Rizzo
c7a5a96fc6 mark XXX a bug in the code. oej/kevin, any idea what you want
to use here ?



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 22:18:41 +00:00
Luigi Rizzo
a63b2e4c53 remove duplicate code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 20:40:54 +00:00
Luigi Rizzo
1a38041830 Replace '\"' with '"'.
The escape is unnecessary, and makes a bad example
to people reading the code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 20:34:26 +00:00
Olle Johansson
e0a8649273 - Formatting
- Add some comments


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 19:21:46 +00:00
Olle Johansson
b7cfe5bd08 Minor change to DEBUG and WARNING messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 19:15:40 +00:00
Olle Johansson
4d17451c55 Issue #7103 take two. Thanks Mikael!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:58:06 +00:00
Russell Bryant
4c76028de9 - add the ability to configure forced jitterbuffers on h323, jingle,
and mgcp channels
- remove the jitterbuffer configuration from the pvt structures in
  the sip, zap, and skinny channel drivers, as copying the same global
  configuration into each pvt structure has no benefit.
- update and fix some typos in jitterbuffer related documentation
(issue #7257, north, with additional updates and modifications)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:47:28 +00:00
Russell Bryant
62b2f320a1 make a global variable static and remove an unused global variable
(issue #7258, tardieu)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 14:15:16 +00:00
Olle Johansson
725e285bc4 Commit of the new SIP transfer support (oej/siptransfer branch)
- improved support of attended transfers (REFER with replaces)
- support of INVITE/replaces in the context of a transfer
- improved support of blind transfers (REFER)

Thanks to Voop, Nuvio and Foniris for sponsoring this work.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 07:30:45 +00:00
Russell Bryant
414106a3a6 move the includes of abstract_jb.h to be with the rest of the asterisk includes.
These used to be wrapped in a #ifdef


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 17:29:12 +00:00
Russell Bryant
bb7dd96cfe Add support for using a jitterbuffer for RTP on bridged calls. This includes
a new implementation of a fixed size jitterbuffer, as well as support for the
existing adaptive jitterbuffer implementation. (issue #3854, Slav Klenov)

Thank you very much to Slav Klenov of Securax and all of the people involved
in the testing of this feature for all of your hard work!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 16:56:50 +00:00
Joshua Colp
503486e99d OKAY - Only replace our IP address in the outgoing SIP messages if the actual source address is within the specified local network. (issue #7051 reported by Luke-Jr with mods by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 16:31:41 +00:00
Olle Johansson
c7007e1f55 Add congestion message to SIP history
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 14:36:47 +00:00
Olle Johansson
bc0f0a3226 Use ast_channel_trylock for channels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 14:28:29 +00:00
Kevin P. Fleming
f890cab292 Merged revisions 30293 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30293 | kpfleming | 2006-05-25 12:18:01 -0500 (Thu, 25 May 2006) | 2 lines

allow SIPCHANINFO(peername) to work for calls from users as well (issue #7215)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 17:22:26 +00:00
Kevin P. Fleming
57f6093661 don't send CANCEL for an INVITE that we haven't received a provisional response for yet... mark it pending until a response arrives (issue #7079)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 20:37:45 +00:00
Olle Johansson
b8b1fda04c Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:58:36 +00:00
Kevin P. Fleming
3e99be68d1 add a new option for 'obscuring' SIP user/peer names from fishers
use an enum for authentication results and clean up code
fix a bug where SUBSCRIBE for an unknown user/peer would not generate a response


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 03:28:49 +00:00
Kevin P. Fleming
b31af470e7 Merged revisions 29764 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29764 | kpfleming | 2006-05-23 13:16:40 -0500 (Tue, 23 May 2006) | 2 lines

simplify/fix lock retry, and fix comment

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 18:17:40 +00:00
BJ Weschke
c4227714fd Sanity check code for an extended failure in trying to obtain a channel lock that may have been obtained elsewhere. Prevents the monitor thread of the SIP module from going into an infinite loop, effectively, breaking SIP until you restart Asterisk or the mutex is unlocked, whichever comes first.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:31:05 +00:00
Olle Johansson
16a648aaf1 Breaking once will stop us... :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 12:39:48 +00:00
Olle Johansson
883e4d6a9b Code formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 12:14:35 +00:00
Mark Spencer
fa9e0ed768 Handle ringing (early) state properly on SIP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 04:49:31 +00:00
Luigi Rizzo
76c47813fe remove code duplication generating some ast_verbose messages .
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 03:16:38 +00:00
Luigi Rizzo
82dbf5a4c1 use the functional form of time(), and mark XXX a couple of places
with dubious assignments.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:43:24 +00:00
Luigi Rizzo
afe7c46924 more constifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:31:58 +00:00
Luigi Rizzo
322aff00c6 various constification of function arguments to prevent erroneous
usage and to ease understanding of the function themselves.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:27:33 +00:00
Luigi Rizzo
ba195ee2d4 the msg argument of the various transmi_response*() functions is const.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:22:39 +00:00