https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79276 | russell | 2007-08-13 15:18:30 -0500 (Mon, 13 Aug 2007) | 4 lines
Release the pvt lock before calling find_peer in register_verify to avoid a
deadlock. Also, remove some unnecessary locking in auth_fail that was only done
recursively.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79272 | russell | 2007-08-13 14:27:39 -0500 (Mon, 13 Aug 2007) | 9 lines
I am fighting deadlocks in chan_iax2. I have tracked them down to a single
core issue. You can not call find_callno() while holding a pvt lock as this
function has to lock another (every) other pvt lock. Doing so can lead to a
classic deadlock. So, I am tracking down all of the code paths where this
can happen and fixing them.
The fix I committed earlier today was along the same theme. This patch fixes
some code down the path of authenticate_reply.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79214 | russell | 2007-08-13 10:28:13 -0500 (Mon, 13 Aug 2007) | 4 lines
Fix a potential deadlock in socket_process. check_provisioning can eventually
call find_callno. You can't hold a pvt lock while calling find_callno because
it goes through and locks every single one looking for a match.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines
(closes issue #10437)
Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r78103 | mmichelson | 2007-08-03 15:25:22 -0500 (Fri, 03 Aug 2007) | 7 lines
Changed the behavior of sip's realtime_peer function to match the corresponding way of matching for non-realtime peers.
Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the
IP address.
In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r78182 | file | 2007-08-06 13:32:44 -0300 (Mon, 06 Aug 2007) | 2 lines
It is possible for a transfer to occur before the remote device has our tag in which case they send none in the transfer. In this case we need to not fail the transfer dialog lookup.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r78063 | russell | 2007-08-03 12:01:07 -0500 (Fri, 03 Aug 2007) | 4 lines
Only pass through HOLD and UNHOLD control frames when the mohinterpret option
is set to "passthrough". This was pointed out by Kevin in the middle of a
training session.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r78028 | russell | 2007-08-02 21:04:22 -0500 (Thu, 02 Aug 2007) | 6 lines
Don't reuse the timespec that was set to 0 in the previous timedwait as it
will just return immediately. Also, fix some logic so the thread's lock
isn't unlocked twice in the weird case of dynamic threads getting acquired
right after a timeout.
(pointed out by SteveK)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77949 | russell | 2007-08-02 14:25:14 -0500 (Thu, 02 Aug 2007) | 5 lines
Fix the case where a dynamic thread times out waiting for something to do
during the first time it runs. This shouldn't ever happen, but we should
account for it anyway.
(pointed out by pete, who works with mihai)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
(closes issue #10299)
........
r77947 | qwell | 2007-08-02 13:42:36 -0500 (Thu, 02 Aug 2007) | 5 lines
Make sure we clear the prompt status message on a hangup.
Also rearrange messages to better fit with what a wireshark trace shows it should be.
Issue 10299, initial patch and solution by sbisker, modified by me to fit with wireshark trace.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77943 | russell | 2007-08-02 13:04:43 -0500 (Thu, 02 Aug 2007) | 9 lines
Fix another race condition in the handling of dynamic threads. If the dynamic
thread timed out waiting for something to do, but was acquired to perform an
action immediately afterwords, then wait on the condition again to give the
other thread a chance to finish setting up the data for what action this thread
should perform. Otherwise, if it immediately continues, it will perform the
wrong action.
(reported on IRC by mihai, patch by me)
(related to issue #10289)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
trunk version of find_idle_thread() where the old full frame processing
information was not cleared out. This would have caused full frames to get
deferred for processing by threads that weren't actually processing frames for
that call. Nice catch!!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
(closes issue #10358)
........
r77894 | qwell | 2007-08-02 10:15:45 -0500 (Thu, 02 Aug 2007) | 5 lines
Make sure that we show the correct extension if dialed from a macro
"From: 5555" rather than "From: s"
Issue 10358, initial patch by DEA, reworked by me to use S_OR, tested by sbisker
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77887 | russell | 2007-08-01 17:16:17 -0500 (Wed, 01 Aug 2007) | 23 lines
Fix some race conditions which have been causing weird problems in chan_iax2.
The most notable problem is that people have been seeing storms of VNAK frames
being sent due to really old frames mysteriously being in the retransmission
queue and never getting removed.
It was possible that a dynamic thread got created, but did not acquire its lock
before the thread that created it signals it to perform an action. When this
happens, the thread will sleep until it hits a timeout, and then get destroyed.
So, the action never gets performed and in some cases, means a frame doesn't
get transmitted and never gets freed since the scheduler never gets a chance
to reschedule transmission.
Another less severe race condition is in the handling of a timeout for a dynamic
thread. It was possible for it to be acquired to perform at action at the same
time that it hit a timeout. When this occurs, whatever action it was acquired
for would never get performed.
(patch contributed by Mihai and SteveK)
(closes issue #10289)
(closes issue #10248)
(closes issue #10232)
(possibly related to issue #10359)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77883 | qwell | 2007-08-01 16:08:42 -0500 (Wed, 01 Aug 2007) | 7 lines
Fix an issue that caused one-way audio on some newer devices (specifically the 7921),
due to sending packets in the wrong order during hangup.
Also make sure we clear tones/messages on the correct line/instance.
Issue 10291, patch by DEA, tested by sbisker and myself.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77824 | mmichelson | 2007-07-31 10:21:22 -0500 (Tue, 31 Jul 2007) | 6 lines
This patch makes Asterisk send 100 Trying provisional responses upon receipt of re-invites. This makes it so that if there are two or more Asterisk
servers between endpoints, the Asterisk servers will not keep retransmitting the re-invites.
(closes issue #10274, reported by cstadlmann, patched by me with approval from file)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77794 | russell | 2007-07-30 15:16:43 -0500 (Mon, 30 Jul 2007) | 8 lines
Fix an issue that could potentially cause corruption of the global iax frame
queue. In the network_thread() loop, it traverses the list using the
AST_LIST_TRAVERSE_SAFE macro. However, to remove an element of the list within
this loop, it used AST_LIST_REMOVE, instead of AST_LIST_REMOVE_CURRENT, which I
believe could leave some of the internal variables of the SAFE macro invalid.
Mihai says that he already made this change in his local copy and it didn't help
his VNAK storm issues, but I still think it's wrong. :)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
+ place the link field at the beginning of struct sip_pvt,
and not somewhere in the middle;
+ in __sip_reliable_xmit, remove a duplicate assignment, and
put the statements in a more logical order (i.e. first copy
the payload and associated info, then copy arguments from the
caller, then finish initializing the headers...)
nothing to backport.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
SIP_NOVIDEO, SIP_DIALOG_ANSWEREDELSEWHERE, SIP_PAGE2_NOTEXT,
SIP_PAGE2_OUTGOING_CALL
These are seldom used so the diff is relatively small.
Note that 'OUTGOING_CALL' is dangerously similar to another
dialog flag, 'SIP_OUTGOING', so the description will need to
clarify the different meaning of the two.
Also note that the description of NOTEXT is a bit unclear - does
it mean we don't support it, or 'not requested or not supported' ?
On passing fix a comment referring to video instead of text.
Finally, mark with XXX a possibly misleading debugging message.
(maybe the latter is worth backporting).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
CLI lines. This helps maintaining consistency on output, slightly
improves readability, and maybe one day will make it easier to
translate the output in other languages (though i have a hard time
believing that a CLI user who needs 'yes' and 'no' to be translated
can actually figure out what he/she is doing!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Start putting these variables in a single struct (called 'sip_cfg' for the time
being, but it could as well be 'global' or some other name) so it
is easy, when reading the code, to figure out what they are for.
The downside of using struct fields instead of individual global
variables is that the compiler cannot tell if there are unused fields.
But the advantage of not cluttering the namespace and manilpulating
all these variables at once certainly overcome the disadvantagess.
Nothing to backport, again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
at load time instead of duplicating the initializer.
This should remove the risk of forgetting fields in the
initializer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
use AST_FORMAT_AUDIO_MASK instead of playing with AST_FORMAT_MAX_AUDIO
to determine audio formats.
There is a dubious use of AST_FORMAT_MAX_AUDIO in sip_request_call()
which surely needs fixing, namely:
/* mask request with some set of allowed formats.
* XXX this needs to be fixed.
* The original code uses AST_FORMAT_AUDIO_MASK, but it is
* unclear what to use here. We have global_capabilities, which is
* configured from sip.conf, and sip_tech.capabilities, which is
* hardwired to all audio formats.
*/
The latter is possibly something to backport when fixed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Move together flags used in the same way (e.g. dialog only,
dialog-peer, ...) so it will become easier to deal with them
in a more systematic way.
This is being done in stages so it will be easier to detect
breakage, if any should occur.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
the original pointer while calling the function.
on passing add some comments on one of the places where it
is used, and explain why it is safe there.
again, a no-op for practical purposes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
dialog_ref/unref (they are a no-op at the moment).
Also clean a pointer after freeing memory to avoid
dangling references, and write a for() loop in canonical form.
In practice, everything in this commit is a no-op.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is, for all practical purposes, a no-op, as it only
introduces the dialog_ref() and dialog_unref() methods, and uses them
in a few places (not all the places where they would be needed).
The goal is to start annotating the code with these calls, so the transition
to a proper container will be easier.
Nothing to backport.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
In a nutshell, these fields are used to tell a sip entity
the address and port its request came from, and are extremely
useful in the presence of NATs, especially with symmetric NATs
where STUN is totally ineffective.
This patch stores the address and port in the 'ourip' field of
the dialog descriptor, so they can be reused in subsequent transactions.
As it is, it works well for things like REGISTER requiring authentication,
because the second REGISTER request (with auth credentials) will carry
the correct address. Maybe it can also be useful, in case of an address
change, to do one or both of the following:
+ propagate the new address to the parent user/peer descriptor so that new
dialogs will use the correct address from the beginning.
This is trivial to implement, I am just waiting for feedback on this.
+ re-issue a request in case of an address change. This a lot less trivial,
maybe unnecessary, and probably covered by the previous item.
I would seriously consider this patch for addition to 1.4 and 1.2.
The code is very little intrusive, and it would solve in a correct
way the nat traversal problems for which externip/externaddr/stunaddr
are only a partial and expensive workaround.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77536 | file | 2007-07-27 13:27:16 -0300 (Fri, 27 Jul 2007) | 6 lines
(closes issue #10323)
Reported by: julianjm
Patches:
chan_sip_device_state_hold_fix.v1.diff.txt uploaded by julianjm (license 99)
Clear ONHOLD flag when decrementing the onHold peer count. If we did not do this the count may keep decreasing.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
At first sight (but the function is very large so i am not 100% sure)
the code seems correct, so maybe my compiler is just not smart
enough to figure that out at the optimization level it has.
Not worthwhile merging to 1.4 i believe.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This allows you to just Dial(Skinny/line), as long as line isn't ambiguous.
Note that this does not remove or deprecate the "old" syntax, as it's still
quite useful - even moreso if shared lines get implemented.
Initial patch by me, with some changes and suggestions from wedhorn.
(closes issue #10263)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
using old methods of parsing arguments to using the standard macros. However, the big
change is that the really old way of specifying application and arguments separated by
a comma will no longer work (e.g. NoOp,foo|bar). Instead, the way that has been
recommended since long before 1.0 will become the only method available (e.g. NoOp(foo,bar).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r76654 | file | 2007-07-23 15:29:48 -0300 (Mon, 23 Jul 2007) | 12 lines
Merged revisions 76653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r76653 | file | 2007-07-23 15:28:13 -0300 (Mon, 23 Jul 2007) | 4 lines
(closes issue #5866)
Reported by: tyler
Do not force channel format changes when a generator is present. The generator may have changed the formats itself and changing them back would cause issues.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
does not use DTMF BEGIN frames.
1.4 seems correct (it does not have the two fields).
However, as this bug shows, the current way of creating the sip_tech
replica is too error-prone, one can easily forget to update one of
the two entries. Perhaps it would be better to create sip_tech_info
expliclty at module load, by doing
sip_tech_info = sip_tech;
sip_tech_info.send_digit_begin = NULL
(in this case, this is something applicable to 1.4 as well).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Reported by: snuffy
Patches:
doxygen-updates.diff uploaded by snuffy (license 35)
Another big batch of doxygen documentation updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
between integers and strings using a single translation table,
and use them in a few places instead of ad-hoc routines
that duplicate the table.
On passing, note that REFER_CONFIRMED is never used, and add a
few comments.
Nothing to backport here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r76485 | russell | 2007-07-23 07:25:01 -0500 (Mon, 23 Jul 2007) | 6 lines
Use a signed integer for storing the number of bytes in the packet read from
the network. Using an unsigned value here made it impossible to handle an
error returned from recvfrom(). Furthermore, in the case that recvfrom()
did return an error, this would cause a crash due to a heap overflow.
(closes issue #10265, reported by and fix suggested by timrobbins)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
foo = sip_destroy(foo);
and reduce the chance of bugs due to dangling pointers.
Also remove a duplicate prototype for the function.
nothing to backport.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
responses, so that there is a common exit point.
Mark two places where probably we could return -1 instead of 0 to report
an error to the caller.
(change triggered by investigations on how the 'SIP_PKT_IGNORE' field was used).
nothing to backport from this commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
individual variables. Apart from SIP_PKT_IGNORE which was used
a zillion times, the other two are used seldom.
On passing:
- move the arrays to the end of struct sip_request, so a (small)
buffer overflow is less likely to overwrite the other fields;
- note that the 'ignore' argument to handle_invite_replaces() is not
used and should be removed (will be done in a separate commit).
Nothing to backport in this change.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
variables and not flags.
NOTE:
The old behaviour (preserved in this commit) is that if sipdebug
is set in the config file, it can only be disabled by reloading the
config. I am not sure if this is accidental or voluntary, but it
is really unconvenient and I think it should be handled in the same
way as other options i.e. consider requests from the config file
or the cli (or the command line) to be fully equivalent and act on
the same status variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
before using it.
I am unclear on the details right now so i hope someone can comment
more. The obvious (and lazy) approach would be to bzero() all of it
(except for the string pool), but isn't that too much work ?
Feedback wanted here...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
be stored in ast_flags. First victim is 'SIP_NO_HISTORY'
replaced by a 'do_history' field in the sip_pvt structure.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
the sdp messages. Overall the code is slightly more readable
(because the string is fully described by a single pointer),
and more efficient (because the length is stored explicitly
so you don't need to do strlen()).
(I have been using this code for almost a year now.)
I wish we had infix string operators to do this sort of things!
Nothing to backport from this change.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
define and use a macro to determine whether we are pointing to
one of them, so when one goes away (or a new one appears) we don't
have to touch all the code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
+ extensive documentation changes both in sip.conf.sample and in the source;
+ allow "externip" and "externhost" to include a port number as well;
+ allow "bindaddr" to have a port number (making bindport unnecessary,
even though it is still present for backward compatibility);
+ introduce the new "stunaddr" parameter to specify an STUN server to
be used from the main SIP socket;
+ extend the "sip show settings" output to show all the above.
Internally:
+ change related data structures from struct in_addr to struct sockaddr_in
to store the port numbers as well;
+ reorganize ast_sip_ouraddrfor() (should also be renamed to sip_ouraddrfor()
because it is not a generic API, though it might become so if called with
a socket as an additional argument, in which case it can be moved elsewhere).
As mentioned in the documentation, media sessions still do not use STUN so the
port numbers may still be incorrect when Asterisk is behind a NAT
On passing, some of the debugging messages printing media addresses are
probably using the wrong values, but this will be checked/fixed in a
subsequent commit if needed.
Part of the following chunk in the function that handles a "sip reload" is
probably needed on previous versions as well, to avoid leaking the memory
used for the "localaddr" list:
@@ -17244,13 +17274,17 @@
/* Reset IP addresses */
memset(&bindaddr, 0, sizeof(bindaddr));
+ memset(&stunaddr, 0, sizeof(stunaddr));
+ memset(&internip, 0, sizeof(internip));
+ /* Free memory for local network address mask */
+ ---> ast_free_ha(localaddr); <-----
memset(&localaddr, 0, sizeof(localaddr));
memset(&externip, 0, sizeof(externip));
memset(&default_prefs, 0 , sizeof(default_prefs));
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
because in this case the string is left-aligned and it is not
truncated anyways.
Omitting the field size prevents the generation of trailing whitespace,
which makes the string fit in smaller windows.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
localnet settings (requires the change in SVN 76034), and also
give an indication on whether/why/how the remapping of addresses
in SIP message is done or not.
I think this is especially useful for debugging the configuration,
as the address remapping depends on a combination of at least 3
parameters (localnet, externhost, externip) and successful DNS lookup.
An example of the output of this section is below:
Network Settings:
---------------------------
SIP address remapping: Enabled using externhost
Externhost: foo.dyndns.net
Externip: 80.64.128.23:0
Externrefresh: 10
Internal IP: 12.34.56.78:5060
Localnet: 192.168.0.0/255.255.0.0
10.0.0.0/255.0.0.0
I leave to the community the judgement if the above info is a
useful addition for 1.4. It is not a bugfix, but it is neither a
new feature, only a useful diagnostic tool.
Note that I would like to move there also the bindaddress/port
information, in the usual addr:port format e.g.
Bindaddress: 0.0.0.0:5060
so that network information is all in one place.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75928 | russell | 2007-07-19 10:53:15 -0500 (Thu, 19 Jul 2007) | 14 lines
Merged revisions 75927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75927 | russell | 2007-07-19 10:49:42 -0500 (Thu, 19 Jul 2007) | 6 lines
When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
in the "sip show settings" cli output. I have put these in a
separate section, probably even bindaddr and SIP port should go
there.
There are more things to add here e.g. localnet and so on.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
list were not destroyed when the module is unloaded. However, after reading
the code related to the use of this list a lot today, I realized that it isn't
necessary. So, I have added a comment to explain why it isn't necessary.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75759 | russell | 2007-07-18 16:09:46 -0500 (Wed, 18 Jul 2007) | 13 lines
Merged revisions 75757 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75757 | russell | 2007-07-18 16:09:13 -0500 (Wed, 18 Jul 2007) | 5 lines
When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75445 | russell | 2007-07-17 15:48:21 -0500 (Tue, 17 Jul 2007) | 13 lines
Merged revisions 75444 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75444 | russell | 2007-07-17 15:45:27 -0500 (Tue, 17 Jul 2007) | 5 lines
Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75053 | russell | 2007-07-13 14:11:26 -0500 (Fri, 13 Jul 2007) | 20 lines
Merged revisions 75052 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75052 | russell | 2007-07-13 14:10:00 -0500 (Fri, 13 Jul 2007) | 12 lines
(closes issue #9660)
Reported by: mmacvicar
Patches submitted by: bbryant, russell
Tested by: mmacvicar, marco, arcivanov, jmhunter, explidous
When using a TDM400P (and probably other analog cards) there was a chance that
you could hang up and pick the phone back up where it has been long enough to
be not considered a flash hook, but too soon such that the device reports that
it is busy and the person on the phone will only hear silence. This patch
makes chan_zap more tolerant of this and gives the device a couple of seconds
to succeed so the person on the phone happily gets their dialtone.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r74767 | russell | 2007-07-11 17:57:07 -0500 (Wed, 11 Jul 2007) | 13 lines
Merged revisions 74766 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r74766 | russell | 2007-07-11 17:53:26 -0500 (Wed, 11 Jul 2007) | 5 lines
The function make_trunk() can fail and return -1 instead of a valid new call
number. Fix the uses of this function to handle this instead of treating it
as the new call number. This would cause a deadlock and memory corruption.
(possible cause of issue #9614 and others, patch by me)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
Closes issue #9186
................
r74159 | qwell | 2007-07-09 15:19:28 -0500 (Mon, 09 Jul 2007) | 16 lines
Merged revisions 74158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r74158 | qwell | 2007-07-09 15:18:15 -0500 (Mon, 09 Jul 2007) | 8 lines
Several chan_zap options were not working on reload because they were arbitrarily
disallowed when reloading some/most PRI options (such as signalling) was disallowed.
Options such as polarityonanswerdelay and answeronpolarityswitch can safely be changed on a reload.
This corrects that behavior.
Issue 9186, patch by tzafrir.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
If the call is answered by another phone, other phones won't display the call as "missed".
You can also add an option to the dial command so that you can have a "followme"
scenario and not count the calls as "missed" when you cancel the call.
Thanks to Ramon and Frank for feedback on this feature.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r73679 | russell | 2007-07-06 10:57:25 -0500 (Fri, 06 Jul 2007) | 15 lines
Merged revisions 73678 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r73678 | russell | 2007-07-06 10:55:41 -0500 (Fri, 06 Jul 2007) | 7 lines
(closes issue #10125)
Reported by: makoto
Patches submitted by: makoto
This fixes a crash in chan_sip that happens when the bindaddr setting is not
valid on Asterisk startup, gets fixed, and then a reload gets issued.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r73551 | russell | 2007-07-05 17:31:31 -0500 (Thu, 05 Jul 2007) | 6 lines
* Store the call number that a thread is processing without the full frame bit
set to ease debugging
* When deferring a full frame for processing, stick it into the queue for the
thread that is processing frames for that call, not the one that read the
current frame and is about to go back into the idle list
(related to issue #9937)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r72852 | crichter | 2007-07-02 10:41:08 +0200 (Mo, 02 Jul 2007) | 9 lines
Merged revisions 72585 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r72585 | crichter | 2007-06-29 15:08:26 +0200 (Fr, 29 Jun 2007) | 1 line
check if the bchannel stack id is already used, if so don't use it a second time. Also added a release_chan lock, so that the same chan_list object cannot be freed twice. chan_misdn does not crash anymore on heavy load with these changes.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r72851 | crichter | 2007-07-02 10:27:19 +0200 (Mo, 02 Jul 2007) | 9 lines
Merged revisions 72099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r72099 | crichter | 2007-06-27 15:22:37 +0200 (Mi, 27 Jun 2007) | 1 line
simplified generation for dummy bchannels, also we mark them as dummies, so they are not used later as real-bchannels, optimized the RESTART mechanisms, we block a channel now on cause:44, and send out a RESTART automatically, then on reception of RESTART_ACKNOWLEDGE we unblock the channel again.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r72125 | qwell | 2007-06-27 12:10:32 -0500 (Wed, 27 Jun 2007) | 4 lines
Don't modify a variable that we don't want modified. Make a copy of it instead.
Issue 10029, patch by phsultan with slight modifications by me (to remove needless casts).
Note: chan_jingle in trunk does not appear to have the same bug.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r72042 | crichter | 2007-06-27 09:58:06 +0200 (Mi, 27 Jun 2007) | 13 lines
Merged revisions 72040-72041 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r72040 | crichter | 2007-06-27 09:49:27 +0200 (Mi, 27 Jun 2007) | 1 line
for inbound TE calls, we setup the bchannel when we get the CONNECT_ACKNOWLEDGE, to make sure mISDN has everything ready. removed some #if 0 areas which weren't used anymore.
........
r72041 | crichter | 2007-06-27 09:54:30 +0200 (Mi, 27 Jun 2007) | 1 line
isdn_lib.c didn't compile
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r71121 | crichter | 2007-06-22 17:32:54 +0200 (Fr, 22 Jun 2007) | 9 lines
Merged revisions 70311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r70311 | crichter | 2007-06-20 16:47:59 +0200 (Mi, 20 Jun 2007) | 1 line
on receiption of cause:44 we mark the channel as in use and inform the user about the situation, we need to test the RESTART stuff then. Also shuffled the empty_chan_in_stack function after the bchannel cleaning functions, to avoid race conditions.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r70866 | russell | 2007-06-21 16:07:04 -0500 (Thu, 21 Jun 2007) | 5 lines
If a full frame is received while one of the iax2 threads is in the middle
of handling a full frame for the same call, queue it up for processing by that
same thread later instead of dropping it.
(issue #9937, patch by me)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r70397 | russell | 2007-06-20 13:46:49 -0500 (Wed, 20 Jun 2007) | 13 lines
Merged revisions 70396 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r70396 | russell | 2007-06-20 13:45:38 -0500 (Wed, 20 Jun 2007) | 5 lines
Fix a problem where an established call would not be properly disconnected
when a PRI disconnect is received depending on which cause code was received.
(issue #9588, original patch by softins, updated patch from jtexter3, and some
additional feedback from mhardeman)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r69944 | russell | 2007-06-19 10:22:36 -0500 (Tue, 19 Jun 2007) | 10 lines
Fix a crash that could occur when handing device state changes.
When the state of a device changes, the device state thread tells the extension
state handling code that it changed. Then, the extension state code calls the
callback in chan_sip so that it can update subscriptions to that extension.
A pointer to a sip_pvt structure is passed to this function as the call which
needs a NOTIFY sent. However, there was no locking done to ensure that the pvt
struct didn't disappear during this process.
(issue #9946, reported by tdonahue, patch by me, patch updated to trunk to use
the sip_pvt lock wrappers by eliel)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r69661 | file | 2007-06-18 11:46:32 -0400 (Mon, 18 Jun 2007) | 2 lines
Few minor transfer tweaks. We can't unlock something we never locked, and better handle a specific scenario with doing an attended transfer between two non-bridged calls.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r69183 | russell | 2007-06-13 14:57:38 -0500 (Wed, 13 Jun 2007) | 9 lines
Move the logic for destroying a call when no response is received to a BYE
outside of the block that checks for FLAG_FATAL to be set. This flag is only
set when the packet is transmitted with the reliability set to XMIT_CRITICAL
when the original packet is transmitted. A BYE is always sent with it set
to XMIT_RELIABLE, meaning this code could never be encountered. This resulted
in seeing some SIP channels that would never go away with the last packet
sent being a BYE.
(part of issue #9235, patch from jcmoore)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r68733 | crichter | 2007-06-11 18:57:59 +0200 (Mo, 11 Jun 2007) | 9 lines
Merged revisions 68732 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r68732 | crichter | 2007-06-11 18:49:00 +0200 (Mo, 11 Jun 2007) | 1 line
added check for NULL Pointer when calling misdn_new. Asterisk does not allow us to create channels anymore when stop gracefully is used :). also modified the restart_indicator to 0
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r68313 | kpfleming | 2007-06-07 17:14:35 -0500 (Thu, 07 Jun 2007) | 6 lines
some improvements to the IAX2 full frame dropping logic recently added:
- use inaddrcmp(), since we have it
- output the type of frame and subclass being dropped, and the type/subclass that is already being processed (which caused the drop)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r67329 | crichter | 2007-06-05 18:11:57 +0200 (Di, 05 Jun 2007) | 9 lines
Merged revisions 67306 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r67306 | crichter | 2007-06-05 17:39:43 +0200 (Di, 05 Jun 2007) | 1 line
simplified the EVENT_SETUP handling in the cb_events function a lot. Commented the different possibilities a bit and made functions of shared code. When the dialed extension does not exist in the extensions.conf we'll jump into the 'i' extension if this does exist, else we disconnect the call with the cause:1 = No Route to Destination.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67270 | kpfleming | 2007-06-05 09:35:52 -0500 (Tue, 05 Jun 2007) | 3 lines
ensure that a burst of full frames (AST_FRAME_DTMF being the prime example) will not be processed out of order... this is a brute force fix, but seems to be the safest fix for now (thanks to the Digium PQ department for finding this bug)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67158 | russell | 2007-06-04 18:31:40 -0500 (Mon, 04 Jun 2007) | 5 lines
Fix up a bunch of places where the iax2 pvt structure can disappear and the
code did not account for it and crashes.
(issues #9642, #9569, #9666, probably others ... based on the work by
stevedavies and mihai, with additional changes from me)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67156 | qwell | 2007-06-04 18:26:28 -0500 (Mon, 04 Jun 2007) | 6 lines
Fix for skinny keepalives.
If there is no traffic from the phone for (keep_alive * 1100) ms (arbitrarily
adding 10% for network issues, etc), unregister the device.
Issue 8394, patch by DEA.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67119 | russell | 2007-06-04 17:28:55 -0500 (Mon, 04 Jun 2007) | 6 lines
Add comments for two functions that get called with the appropriate call locked,
but perform operations that could result in the pvt structure getting destroyed
before returning again, causing numerous seg faults all over the module.
(inspired by issues #9642, #9569, and #9666, and the work done by stevedavies
and mihai)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
over from my attempt at putting pvt structs in a hash table. It can cause
seg faults, and has no reason to stay.
(issue #9642, pointed out by stevedavies)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67020 | russell | 2007-06-04 10:47:40 -0500 (Mon, 04 Jun 2007) | 7 lines
Resolve a deadlock in chan_iax2. When handling an implicit ACK to a frame that
was marked as the final transmission for a call, don't call iax2_destroy() for
that call while the global frame queue is still locked. There is a very nice
explanation of the deadlock in the report.
(issue #9663, thorough report and patch from stevedavies, additional positive
test reports from mihai and joff_oconnell)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r66881 | russell | 2007-06-01 14:41:30 -0500 (Fri, 01 Jun 2007) | 6 lines
Changes to the way DTMF is handled in the core broke dialing in chan_skinny.
This patch makes chan_skinny usable again. I did not end up testing this,
but there are multiple positive test reports listed in the bug report.
(issue #9596, reported by pj, testing by pj and mvanbaak, and the fix was
written by DEA)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
disclaimer along with SIP messages in the header, X-Disclaimer. This is off by
default. Also, the text of the disclaimer can be customized in sip.conf.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
places in the code where the same block of code for creating detached threads
was replicated. (patch from bbryant)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65968 65c4cc65-6c06-0410-ace0-fbb531ad65f3