Commit graph

10047 commits

Author SHA1 Message Date
Luigi Rizzo
c93be15b7e simplify ast_strings_to_mask
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 10:14:58 +00:00
Luigi Rizzo
efd87b68ee add a comment to remember that a block of code is
completely redundant.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 08:48:50 +00:00
Luigi Rizzo
2102d73bf4 + move the enum declaration for output formats near the head
of the file, so it can be used from more places;
+ make the declaration of contenttype[] more robust;
+ remove the wrappers around __xml_translate(), since they were
  used only in one place, and rename to xml_translate().
  This allows for a bit of simplifications.
+ document the output produced by the above function.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 06:28:34 +00:00
Luigi Rizzo
3a3b26658e merge xml_translate() and html_translate() into one function since
they do similar things.

Add a small form on top of the html output so request like
http://foo:8088/asterisk/manager will suggest you what to do.

Note: i suspect there is still a bug somewhere in the session matching
code, as sometimes you have to login twice in order for the following
commands to be recognised.

Apart from this, the cli now is basically usable from a web form!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 05:31:54 +00:00
Luigi Rizzo
fbe6c86b0b introduce uri_decode() so that '+' are translated into ' '
(e.g. browsers do this when they encode input strings from a form).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 05:27:22 +00:00
Luigi Rizzo
d1058df18f various code simplifications to reduce nesting depth,
minor optimizations to avoid extra calls of strlen(),
and some variable localization.

One feature worth backporting is the move of ast_variables_destroy()
to a different place in handle_uri() to avoid leaking memory
in case a uri is not found.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 04:05:56 +00:00
Joshua Colp
bb8926d50c Merged revisions 45452 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45452 | file | 2006-10-17 23:02:08 -0400 (Tue, 17 Oct 2006) | 2 lines

Don't segfault if you're using a channel driver that doesn't turn RTCP on

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 03:03:37 +00:00
Russell Bryant
40b8afd54f Merged revisions 45441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45441 | russell | 2006-10-17 22:41:36 -0400 (Tue, 17 Oct 2006) | 7 lines

Don't attempt to access private data members of the pthread_mutex_t object,
because this does not work on all linux systems.  Instead, just access
the reentrancy field in the ast_mutex_info struct when DEBUG_THREADS is
enabled.  If DEBUG_CHANNEL_LOCKS is enabled, the developer probably has
DEBUG_THREADS on as well.
(issue #8139, me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 02:46:39 +00:00
Russell Bryant
d8e688ece9 Merged revisions 45439 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45439 | russell | 2006-10-17 22:19:07 -0400 (Tue, 17 Oct 2006) | 2 lines

update entry to reboot a snom phone (issue #7850, pnlarsson)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 02:19:55 +00:00
Steve Murphy
c474556659 As per bug 6779, this patch is now applied to trunk; while I was at it, I corrected a reference to a CLI command, to follow the new regime.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 23:06:13 +00:00
Kevin P. Fleming
d9ebe01c7c Merged revisions 45410 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45410 | kpfleming | 2006-10-17 17:31:54 -0500 (Tue, 17 Oct 2006) | 2 lines

add a project-specific script to be used during release preparation

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 22:32:19 +00:00
Kevin P. Fleming
696f9ed677 Merged revisions 45408 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45408 | kpfleming | 2006-10-17 17:24:10 -0500 (Tue, 17 Oct 2006) | 3 lines

optimize the 'quick response' code a bit more... no more malloc() or memset() for each response
expand stringfields API a bit to allow reusing the stringfield pool on a structure when needed, and remove some unnecessary code when the structure was being freed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 22:24:45 +00:00
Joshua Colp
17fabe225d Warning be gone!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 21:09:49 +00:00
Joshua Colp
797efb5d4b Blocked revisions 45381 via svnmerge
................
r45381 | file | 2006-10-17 16:38:15 -0400 (Tue, 17 Oct 2006) | 9 lines

Blocked revisions 45380 via svnmerge

........
r45380 | file | 2006-10-17 16:37:17 -0400 (Tue, 17 Oct 2006) | 2 lines

Don't create a "real" pvt structure for requests that shouldn't be able to create one. Instead use a temporary pvt and fill it with enough information so we can send a reply.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 20:38:55 +00:00
Joshua Colp
15c473908b Merged revisions 45378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45378 | file | 2006-10-17 16:30:34 -0400 (Tue, 17 Oct 2006) | 2 lines

Don't create a "real" pvt structure for requests that shouldn't be able to create one. Instead use a temporary pvt and fill it with enough information so we can send a reply.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 20:34:22 +00:00
Olle Johansson
0b0d72579e Issue #5484 (branch sipdiversion) - Support for Diversion header in redirects of calls
with 302 redirection. (tinning)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 19:57:35 +00:00
Luigi Rizzo
3e2a2bfd7e simplify authority_to_str() using ast_build_string()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 18:08:51 +00:00
Olle Johansson
3376c8e976 Issue #7254 - Add support of "423 Interval too brief" to outbound SIP registrations.
Thanks, tardieu!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:54:59 +00:00
Luigi Rizzo
3abf04cc26 Improve the XML formatting of responses coming from web interface.
Normal responses are sequences of lines of the form "Name: value",
with \r\n as line terminators and an empty line as a response
terminator.

Generi CLI commands, however, do not have such a clean formatting,
and the existing code failed to generate valid XML for them.
Obviously we can only use heuristics here, and we do the following:
- accept either \r or \n as a line terminator, trimming trailing whitespace;
- if a line does not have a ":" in it, assume that from this point on
  we have unformatted data, and use "Opaque-data:" as a name;
- if a line does have a ":" in it, the Name field is not always
  a legal identifier, so replace non-alphanum characters with underscores;

All the above is to be refined as we improve the formatting of
responses from the CLI.

And, all the above ought to go as a comment in the code rather than
just in a commit message...
  


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:51:34 +00:00
Olle Johansson
a8a26ad389 Update of docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:51:34 +00:00
Olle Johansson
748de51a84 - Remove unneeded code that won't be reached now that we kill responses
to unkonwn dialogs earlier in the process. 
- move debug message.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:47:09 +00:00
Luigi Rizzo
f2d12f4d06 open a temporary file to receive the output from cli commands
invoked through the http interface.

It is not terribly efficient but better than no output at all.
Todo: use a configurable /tmp directory instead of a hardwired one.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:41:59 +00:00
Kevin P. Fleming
75ae42ff30 Merged revisions 45327 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r45327 | kpfleming | 2006-10-17 12:22:25 -0500 (Tue, 17 Oct 2006) | 10 lines

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

........
r45326 | kpfleming | 2006-10-17 12:22:01 -0500 (Tue, 17 Oct 2006) | 2 lines

provide licensing language for IAXy firmware file

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:22:52 +00:00
Luigi Rizzo
0c7e8f99a4 document xml_copy_escape() and add an extra function, namely
replace non-alphanum chars with underscore.
This is useful when building field names in xml formatting.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:19:31 +00:00
Olle Johansson
53d383cb5b ...block this one too... Only applies to 1.4 since the fix for trunk was different.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 16:27:01 +00:00
Olle Johansson
7415040b04 Block patch from 1.4 that does not apply here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 16:25:03 +00:00
Olle Johansson
9f837a0baa Get rid of the ignore variable that was only partially replaced
by the flag.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 06:47:02 +00:00
Joshua Colp
c62784c10d In the course of a data this has been turned into an option to ignore replies, then ignore responses and finally I'm just getting rid of the option altogether and making it the default no matter what. C'est la vie!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 20:26:56 +00:00
Joshua Colp
fe5641765e Woof.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 20:10:05 +00:00
Joshua Colp
da330feb60 Merged revisions 45280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r45280 | file | 2006-10-16 16:06:18 -0400 (Mon, 16 Oct 2006) | 10 lines

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

........
r45265 | file | 2006-10-16 15:59:54 -0400 (Mon, 16 Oct 2006) | 2 lines

Use responses rather then replies even though they mean the same thing.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 20:08:23 +00:00
Joshua Colp
b58cc9e1bd Merged revisions 45262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r45262 | file | 2006-10-16 15:37:34 -0400 (Mon, 16 Oct 2006) | 10 lines

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

........
r45260 | file | 2006-10-16 15:28:18 -0400 (Mon, 16 Oct 2006) | 2 lines

Add 'ignoreoodreplies' option which will not create a pvt structure on a SIP response but instead basically drop it.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 19:43:33 +00:00
Joshua Colp
d065c35026 Blocked revisions 45246 via svnmerge
........
r45246 | file | 2006-10-16 13:24:35 -0400 (Mon, 16 Oct 2006) | 2 lines

Backport of new directed pickup (BE-85).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 17:25:41 +00:00
Joshua Colp
ba15f8baf7 It's new directed pickup! This now features a more sane way of finding the channel to pick up (I snuck it into the tree on Friday... bet you didn't know I'd actually use it eh?). PICKUPMARK now also works in a different way, you should prefix it with _ when setting it so it gets inherited onto the channel(s) created in app_dial as directed pickup will now look for it on the target channel, not the originating channel. (BE-85)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 16:26:23 +00:00
Olle Johansson
522fb028dd Update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 14:03:48 +00:00
Luigi Rizzo
5f395bf38f + comment some unclear fields of struct mansession;
+ let some commands (Challenge, Login) be processed even if
  already authenticated, as it doesn't harm and prevents some
  incorrect error messages

+ remove custom code for Logoff - the existing handler was ok.

Some indentation fixes may be necessary



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 14:00:53 +00:00
Olle Johansson
5b52f69201 When adding new functions, please add a forward declaration.
I *know* it is not required, but it makes navigation easier and will help
when splitting up this large source code file. 

Thank you!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 13:20:21 +00:00
Olle Johansson
43505df9f4 Importing rev 45196 from 1.4 - don't kill dialog for a bad response
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 13:03:02 +00:00
Olle Johansson
09b8583937 A B2BUA should *not* issue proxy auth.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 12:28:18 +00:00
Luigi Rizzo
5fda2a874a + comment some unclear requirements for master_eventq
+ remove the need for an snprintf in astman_get_header()
+ fix comment for manager list eventq
+ localize one variable and minor code simplifications.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 11:29:22 +00:00
Luigi Rizzo
6d10a245b6 protect access to first_action with actionlock.
Mark with XXX one place (during command execution) where
navigation should be protected with actionlock, but is not
because it would block requests for a long time.

To solve this properly we need to put reference counts in
the struct manager_action.
A suboptimal fix is to copy the record on a search and then
unlock the list while we work on the copy.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 09:33:00 +00:00
Luigi Rizzo
97fc34d450 comment some functions, and more small code simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 08:38:35 +00:00
Luigi Rizzo
250ad2ad7e fix indentation of a large block after changes in previous commit
(basically whitespace only).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 06:55:14 +00:00
Luigi Rizzo
9146e44403 simplify string parsing routines using ast_skip_*() functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 06:30:51 +00:00
Luigi Rizzo
895eb4fd73 don't forget to close a descriptor on a malloc failure.
On passing, small rearrangement of the code to reduce indentation.

There is a bit more cleanup planned for this file, so a merge to 1.4
will be done when it is all done.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-15 20:54:15 +00:00
Luigi Rizzo
9a3cef21ac typo: serer -> server
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-15 20:37:42 +00:00
Steve Murphy
6bbd50bce2 update the doc string for both AEL and extensions.conf users.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-14 04:36:21 +00:00
Kevin P. Fleming
dc3ddc165b Merged revisions 45125 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45125 | kpfleming | 2006-10-13 18:02:48 -0500 (Fri, 13 Oct 2006) | 7 lines

------------------------------------------------------------------------
r45119 | kpfleming | 2006-10-13 17:57:42 -0500 (Fri, 13 Oct 2006) | 2 lines

don't drop the entire permit/deny list when an attempt is made to add an invalid entry (BE-92)

------------------------------------------------------------------------

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 23:03:36 +00:00
Joshua Colp
1e3c5bc5ba Inherit the context and extension until the channel is answered
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 21:20:18 +00:00
Joshua Colp
3e6b9cacb4 Merged revisions 45106 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45106 | file | 2006-10-13 17:06:09 -0400 (Fri, 13 Oct 2006) | 2 lines

Clear the quiet flag too since we are restarting a recognition again (reported on -dev by Stephan Edelman)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 21:07:06 +00:00
Joshua Colp
fd2bd9a87e Merged revisions 45104 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

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

Check return value from engine in case of failure (ie: out of licenses) (reported on -dev mailing list)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 21:03:05 +00:00