Commit Graph

6819 Commits

Author SHA1 Message Date
Jason Parker
c2aa3f8621 Merged revisions 303285 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r303285 | qwell | 2011-01-21 15:48:09 -0600 (Fri, 21 Jan 2011) | 15 lines
  
  Merged revisions 303284 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r303284 | qwell | 2011-01-21 15:45:34 -0600 (Fri, 21 Jan 2011) | 8 lines
    
    Reset configuration before parsing users.conf.
    
    Some values configured in chan_dahdi.conf were able to leak in to users.conf
    configuration.  This was surprising users, and potentially setting non-sane
    "defaults".
    
    ASTNOW-125
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@303286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-21 21:50:11 +00:00
Sean Bright
4e770f12bf Initialize an uninitialized variable.
(closes issue #18640)
Reported by: jcovert
Patches:
      chan_sip.c.patch uploaded by jcovert (license 551)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@302414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 15:45:17 +00:00
Sean Bright
5dbb8aa010 Use appropriate type for requested format in chan_local.
We were passing and storing the requested format as an int instead of format_t
resulting in truncation.

(closes issue #18238)
Reported by: whizemen
Patches:
      0018238_speex16.patch uploaded by whizemen (license 1143)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@302412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 15:31:39 +00:00
Matthew Nicholson
34bda44174 Merged revisions 302313 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r302313 | mnicholson | 2011-01-18 15:40:03 -0600 (Tue, 18 Jan 2011) | 11 lines
  
  Merged revisions 302311 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r302311 | mnicholson | 2011-01-18 15:35:03 -0600 (Tue, 18 Jan 2011) | 4 lines
    
    URI encode the user part of the contact header.
    
    ABE-2705
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@302314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 21:43:21 +00:00
Richard Mudgett
78e1319a13 Deadlock between dahdi_request() and pri_dchannel() processing an incomming call.
The sig_pri_new_ast_channel() is called with the channel private lock held
when pri_dchannel() calls it and no channel private lock held when
dahdi_request() calls it.  The use of pri_grab() in
sig_pri_new_ast_channel() could leave the channel private lock held when
it returns if the lock was not held before calling it.

Make sig_pri_new_ast_channel() just lock the PRI span lock instead of
using pri_grab().  It is safe to do this because dahdi_request() does not
have the channel private lock and the deadlock potential with the PRI span
lock is only between pri_dchannel() and other threads.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@301946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-14 21:09:57 +00:00
Brett Bryant
a257d69f35 Changing previous revisions 301845/301847 to use ast_sockaddr_setnull() instead
of setting the field manually to avoid uninitialized data.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@301851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-14 20:11:55 +00:00
Brett Bryant
bc223456ff Fix for a consistent MulticastRTP channel driver crash due to use of unitilized
data.

(closes issue #18290)
(closes issue #18602)
Reported by: voipgate, wybecom

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@301845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-14 19:35:23 +00:00
Jeff Peeler
9190854417 Resolve deadlock involving REFER.
Two fixes:
1) One must always have the private unlocked before calling
pbx_builtin_setvar_helper to not invalidate locking order since it locks the
channel.
2) Unlock the channel before calling pbx_find_extension, which starts and stops
autoservice during the lookup. The problem scenario as illustrated by the
reporter:

Thread: do_monitor
-----------------------
handle_request_do
 handle_incoming
  handle_request_refer
   ast_parking_ext_valid
    pbx_find_extension
     ast_autoservice_stop
      while (chan_list_state == as_chan_list_state) { usleep(1000); }

Thread: autoservice_run
-----------------------
autoservice_run
 chan = ast_waitfor_n
  ast_waitfor_nandfds
   ast_waitfor_nandfds_classic / simple / complex (depending on your system)
    ast_channel_lock(c[x]);

handle_request_do and schedule_process_request_queue locks the owner
if it exists. The autoservice thread is waiting for the channel lock, which
wasn't ever released since the do_monitor thread was waiting for autoservice
operations to complete. Solved by unlocking the channel but keeping a reference
to guarantee safety.

(closes issue #18403)
Reported by: jthurman
Patches: 
      20110103-blind_deadlock.diff uploaded by jthurman (license 614)
      issue18403.patch uploaded by jpeeler (license 325)
Tested by: jthurman



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@301790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-14 17:32:52 +00:00
Terry Wilson
08938fe910 Merged revisions 301682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r301682 | twilson | 2011-01-12 15:05:02 -0600 (Wed, 12 Jan 2011) | 9 lines
  
  Don't reject all SUBSCRIBE auth requests
  
  When merging another SUBSCRIBE fix from 1.4, some braces were put in
  the wrong place. This patch fixes that.
  
  (closes issue #18597)
  Reported by: thsgmbh
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@301683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-12 21:19:48 +00:00
Richard Mudgett
be4d5e4348 The DTMF attended transfer feature cannot callback a chan_dahdi BRI phone.
The DAHDI ISDN channel name is not dialable.

Make a channel name like DAHDI/i3/400-12 dialable when the sequence number
is stripped off of the name.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@301134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-08 01:11:31 +00:00
Richard Mudgett
2baf7ac892 Merged revision 300711 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

..........
  r300711 | rmudgett | 2011-01-05 13:43:55 -0600 (Wed, 05 Jan 2011) | 14 lines

  A call retrieved from hold may wind up with no audio.

  If the retrieved call is natively bridged then the call may not have any
  audio path.  The following warning message is given:
  "Failed to add <dfd> to conference <chan>/<chan>: Invalid argument".

  * Open the media on a B channel when pri_fixup_principle() moves the call
  from a no_b_channel channel to a real channel.

  * Added lock protection while pri_fixup_principle() moves a call from one
  private structure to another.

  * Made some pri_fixup_principle() messages more meaningful.
..........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@300714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-05 20:54:21 +00:00
Leif Madsen
d5036e449b Merged revisions 300520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r300520 | lmadsen | 2011-01-04 15:52:41 -0600 (Tue, 04 Jan 2011) | 9 lines
  
  Fix backwards and broken XML documentation.
  
  (closes issue #18547)
  Reported by: jcovert
  Patches: 
        xmldoc.c.patch uploaded by jcovert (license 551)
        chan_iax2.c.doc.patch uploaded by jcovert (license 551)
        chan_sip.c.patch uploaded by jcovert (license 551)
        chan_agent.c.patch uploaded by jcovert (license 551)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@300521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-04 21:53:27 +00:00
Terry Wilson
be2b52c028 Merged revisions 300298 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r300298 | twilson | 2011-01-04 11:37:26 -0600 (Tue, 04 Jan 2011) | 22 lines
  
  Merged revisions 300216 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r300216 | twilson | 2011-01-04 11:11:48 -0600 (Tue, 04 Jan 2011) | 15 lines
    
    Don't authenticate SUBSCRIBE re-transmissions
    
    This only skips authentication on retransmissions that are already
    authenticated. A similar method is already used for INVITES. This
    is the kind of thing we end up having to do when we don't have a
    transaction layer...
    
    (closes issue #18075)
    Reported by: mdu113
    Patches: 
          diff.txt uploaded by twilson (license 396)
    Tested by: twilson, mdu113
    
    Review: https://reviewboard.asterisk.org/r/1005/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@300301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-04 17:54:41 +00:00
Tilghman Lesher
7268144da1 Merged revisions 299625 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r299625 | tilghman | 2010-12-25 04:05:00 -0600 (Sat, 25 Dec 2010) | 12 lines
  
  Merged revisions 299624 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r299624 | tilghman | 2010-12-25 04:04:06 -0600 (Sat, 25 Dec 2010) | 5 lines
    
    Move check for extension existence below variable inheritance, due to the possible use of an eswitch.
    
    (closes issue #16228)
     Reported by: jlaguilar
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-25 10:07:15 +00:00
Moises Silva
4c54cac705 Merged revisions 299530 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r299530 | moy | 2010-12-22 21:28:37 -0500 (Wed, 22 Dec 2010) | 7 lines
  
  Enqueue AST_CONTROL_PROGRESS after AST_CONTROL_RINGING when MFC-R2 calls are accepted
  
  (closes issue #18438)
  Reported by: mariner7
  Tested by: moy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-23 02:53:02 +00:00
Richard Mudgett
30a74dd9fe Chan_dahdi sends an empty COLP on the bridged channel.
Chan_dahdi always inserts a connected party IE when you call from one
dahdi channel to another dahdi channel, even if no such information was
received on the 2nd channel.  This clears the display of many phones.

* Removed leftover artifact from before the valid flag was added.

* Updated all of the channel's caller id information with the new
connected line information instead of just the string parts.

(closes issue #18508)
Reported by: wimpy
Patches:
      issue18508_trunk.patch uploaded by rmudgett (license 664)
Tested by: wimpy, rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-22 02:10:39 +00:00
Matthew Nicholson
7358372d1a Merged revisions 299242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r299242 | mnicholson | 2010-12-20 15:25:35 -0600 (Mon, 20 Dec 2010) | 23 lines
  
  Merged revisions 299194,299198,299220 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r299194 | mnicholson | 2010-12-20 14:45:38 -0600 (Mon, 20 Dec 2010) | 6 lines
    
    Respond as soon as possible with a 202 Accepted to refer requests.
    
    This change also plugs a few memory leaks that can occur when parking sip calls.
    
    ABE-2656
  ........
    r299198 | mnicholson | 2010-12-20 15:00:44 -0600 (Mon, 20 Dec 2010) | 2 lines
    
    Remove changes to via processing that were not supposed to go into the last commit.
  ........
    r299220 | mnicholson | 2010-12-20 15:21:39 -0600 (Mon, 20 Dec 2010) | 4 lines
    
    Use ast_free() instead of free()
    
    ABE-2656
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-21 15:25:03 +00:00
Mark Michelson
bc5602a88f Fix a couple of CCSS issues.
* Make sure to allocate a cc_params structure
  when creating autopeers.

* Use sip_uri_cmp when retrieving SIP CC agents
  and monitors in case parameters appear in the
  URI.

(closes issue #18504)
Reported by: kkm

(closes issue #18338)
Reported by: GeorgeKonopacki
Patches: 
      18338.diff uploaded by mmichelson (license 60)
Tested by: GeorgeKonopacki




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 21:38:30 +00:00
Tzafrir Cohen
8a73e54701 Typos: recieved => received
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 09:14:29 +00:00
Brad Watkins
1c1631cebf Fix parsing of mwi => lines in sip.conf
Reworking parsing of mwi => lines to resolve a segfault.  Also add a set of unit tests for the function that does the parsing.

(closes issue #18350)
Reported by: gbour
Tested by: Marquis, gbour

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@298773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-17 17:26:31 +00:00
Tilghman Lesher
5bc2e04ec0 Ensure the ipaddr field in realtime is large enough to handle IPv6 addresses.
(closes issue #18464)
 Reported by: IgorG
 Patches: 
       realtime_ipv6store.diff uploaded by IgorG (license 20)
       (plus a few additional lines by tilghman)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@298539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-16 09:28:17 +00:00
Richard Mudgett
3ed89f0e89 Merged revisions 298194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r298194 | rmudgett | 2010-12-13 11:04:41 -0600 (Mon, 13 Dec 2010) | 26 lines
  
  Merged revisions 298193 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r298193 | rmudgett | 2010-12-13 10:56:07 -0600 (Mon, 13 Dec 2010) | 19 lines
    
    Outgoing PRI/BRI calls cannot do DTMF triggered transfers.
    
    Outgoing PRI/BRI calls cannot do DTMF triggered transfers if a PROCEEDING
    message is not received.  The debug output shows that the DTMF begin event
    is seen, but the DTMF end event is missing.  When the DTMF begin happens,
    the call is muted so we now have one way audio (until a DTMF end event is
    somehow seen).
    
    * Made set the proceeding flag when the PRI_EVENT_ANSWER event is
    received.
    
    * Made absorb the DTMF begin and DTMF end events if we are overlap dialing
    and have not seen a PROCEEDING message.
    
    * Added a debug message when absorbing a DTMF event.
    
    JIRA SWP-2690
    JIRA ABE-2697
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@298195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-13 17:11:43 +00:00
Terry Wilson
7310e07564 Merged revisions 297960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r297960 | twilson | 2010-12-09 16:10:31 -0600 (Thu, 09 Dec 2010) | 21 lines
  
  Merged revisions 297959 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r297959 | twilson | 2010-12-09 16:00:30 -0600 (Thu, 09 Dec 2010) | 14 lines
    
    Ignore spurious REGISTER requests
    
    If a REGISTER request with a Call-ID matching an existing transaction is received
    it was possible that the REGISTER request would overwrite the initreq of the
    private structure. This info is used to generate messages for other responses in
    the transaction. This patch ignores REGISTER requests that match non-REGISTER
    transactions.
    
    (closes issue #18051)
    Reported by: eeman
    Tested by: twilson
    
    Review: https://reviewboard.asterisk.org/r/1050/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@297965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-09 22:18:19 +00:00
David Vossel
f32ff875d6 Fixes issue with outbound google voice calls not working.
Thanks to az1234 and nevermind_quack for their input in helping debug the issue.

(closes issue #18412)
Reported by: nevermind_quack
Patches:
      fix uploaded by dvossel (license 671)




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@297957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-09 21:32:20 +00:00
Jeff Peeler
00143b2778 Merged revisions 297605 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r297605 | jpeeler | 2010-12-06 16:03:04 -0600 (Mon, 06 Dec 2010) | 18 lines
  
  Merged revisions 297603 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r297603 | jpeeler | 2010-12-06 15:57:15 -0600 (Mon, 06 Dec 2010) | 12 lines
    
    Improve handling of REGISTER requests with multiple contact headers.
    
    The changes here attempt to more strictly follow RFC 3261 section 10.3.
    Basically the following will now cause a 400 Bad Response to be returned, if:
    - multiple Contact headers are present with one set to expire all bindings ("*")
    - wildcard parameter is specified for Contact without Expires header or Expires
      header is not set to zero.
    
    ABE-2442
    ABE-2443
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@297607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-06 22:06:37 +00:00
Sean Bright
cc870a3b31 Merged revisions 297534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r297534 | seanbright | 2010-12-03 12:40:52 -0500 (Fri, 03 Dec 2010) | 3 lines
  
  The CLI command should not contain <placeholder>s, these are for descriptions.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@297535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-03 17:41:30 +00:00
Jeff Peeler
add7816848 Merged revisions 297073 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r297073 | jpeeler | 2010-12-01 11:52:46 -0600 (Wed, 01 Dec 2010) | 30 lines
  
  Merged revisions 297072 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r297072 | jpeeler | 2010-12-01 11:50:09 -0600 (Wed, 01 Dec 2010) | 23 lines
    
    Fix not stopping MOH when transfered local channel queue member is answered.
    
    The problem here is only present when local channels are used with the MOH
    passthru option as well as no optimization (/nm). I will describe the slightly
    bizarre scenario that was used to test, where phones B and C are queue members:
    
    Phone A dials into a queue with two members using local channels and the above
    options. Phone B answers. Phone A blind transfers phone B into the same queue.
    Phone A hangs up. Phone C answers, but phone B didn't stop playing MOH.
    
    In this scenario, the unhold frame that should have gotten to phone B never
    arrived due to the masquerade from the blind transfer. This is usually fine
    since app_queue manages the starting and stopping of MOH. However, with the
    passthrough option enabled when app_queue attempts to stop MOH it tries to do
    so on the local channel rather than the real channel. The easiest solution
    was to just make sure to send an unhold frame during the transfer since it
    wouldn't make sense to have MOH playing after a transfer anyway. This only
    modifies SIP transfers, but the other transfers did not seem to be a problem.
    If DTMF based transfers were a problem it might be okay to add ast_moh_stop
    to finishup, but I didn't want to have to add that unless required.
    
    ABE-2624
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@297075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-01 17:53:13 +00:00
Tilghman Lesher
a41c5537d9 Merged revisions 296950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r296950 | tilghman | 2010-11-30 19:38:19 -0600 (Tue, 30 Nov 2010) | 2 lines
  
  Missed initializations caused startup errors on Mac OS X (and possibly others, too).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-01 01:46:32 +00:00
Paul Belanger
9194596f7d Merged revisions 296671 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r296671 | pabelanger | 2010-11-29 17:54:14 -0500 (Mon, 29 Nov 2010) | 12 lines
  
  Merged revisions 296670 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r296670 | pabelanger | 2010-11-29 17:49:39 -0500 (Mon, 29 Nov 2010) | 5 lines
    
    Make sure nothing else is needed before destroying the scheduler.
    
    (closes issue #18398)
    Reported by: pabelanger
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29 23:05:45 +00:00
Russell Bryant
7017473c8c Complete some error handling in transmit_publish() in chan_sip.c.
This error handling block caught my eye.  It was missing a couple of things,
but it should be safe now.  Thanks to mmichelson for the quick peer review
on IRC.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29 21:26:44 +00:00
Richard Mudgett
b8249ee177 Merged revision 296575 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

..........
  r296575 | rmudgett | 2010-11-29 14:27:37 -0600 (Mon, 29 Nov 2010) | 13 lines

  Invalid mISDN PTMP redirecting signaling as TE towards NT.

  The mISDN PTMP redirection signaling (NOTIFY redirecting number and
  notification code, SETUP redirecting number) is also sent in PTMP/TE mode.
  It should only apply in PTMP/NT mode.  The call setup proceeds but the
  network (Deutsche Telekom) reacts with ugly ISDN STATUS messages.

  Also don't send the redirecting number ie when PTP is also sending the
  DivertingLegInformation2 facility.  The redirecting number ie is redundant
  and the network (Deutsche Telekom) complains about it.

  Patches:
        abe_2651_v4.patch uploaded by rmudgett (license 664)

  JIRA ABE-2651
  JIRA SWP-2537
..........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29 20:46:03 +00:00
Brad Watkins
ee5d9d0835 Fix reloading of peer when a user is requested.
Prevent peer reloading from causing multiple MWI subscriptions to be created when using realtime.  This had the effect of sending one NOTIFY for every time a sip peer made a call, in one case eventually overwhelming  the phone and causing it to reboot.

(closes issue #18342)
Reported by: nivek
Patches:
      issue0018342p1.patch uploaded by nivek (license 636)
Tested by: nivek

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-26 18:19:02 +00:00
Richard Mudgett
5634ae11d5 Merged revisions 296166 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines
  
  Merged revisions 296165 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines
    
    Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip.
    
    The FXS connected phone has to have CW/CID support to fail, as it will
    send back a DTMF 'A' or 'D' when it's ready to receive CallerID.  A normal
    phone with no CID never fails.  Also the SIP phone does not hear MOH when
    the CW call is answered.
    
    The DTMF end frame is suppressed when the phone acknowledges the CW signal
    for CID.  The problem is the DTMF begin frame needs to be suppressed as
    well.  The DTMF begin frame is causing SIP to start sending the DTMF RTP
    frames.  Since the DTMF end frame is suppressed, SIP will not stop sending
    those DTMF RTP packets.
    
    * Suppress the DTMF begin and end frames when the channel driver is
    looking for DTMF digits.
    
    * Fixed a couple issues caused by not cleaning up the CID spill if you
    answer the CW call while it is sending the CID spill.
    
    * Fixed not sending CW/CID spill to the phone when the call is natively
    bridged.  (Fixed by not using native bridge if CW/CID is possible.)
    
    * Suppress received audio when sending CW/CID spills.  The other parties
    involved do not need to hear the CW/CID spills and may be confused if the
    CW call is for them.
    
    (closes issue #18129)
    Reported by: alecdavis
    Patches:
          issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664)
    Tested by: alecdavis, rmudgett
    
    
    NOTE:
    
    * v1.4 does not have the main problem fixed by suppressing the DTMF start
    frames.  The other three items fixed are relevant.
    
    * If you really must restore native bridging between analog ports, you
    need to disable CW/CID either by configuring chan_dahdi.conf
    callwaitingcallerid=no or dialing *70 before dialing the number to
    temporarily disable CW.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:49:48 +00:00
Richard Mudgett
a77913a22d One way audio before answering call waiting call on analog port.
* Analog call waiting Caller ID spills could get stuck resulting in one
way audio until the waiting call is answered.  This only happens on the
second (and later) call waiting call if the active call is not the first
call.

* The CLI/AMI "dahdi show channel" command could report the wrong channel
information.

Must keep the struct analog_pvt.owner and struct dahdi_pvt.owner pointer
in sync.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@295747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-20 03:11:15 +00:00
Terry Wilson
1930461fa7 Merged revisions 295672 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r295672 | twilson | 2010-11-19 13:55:48 -0800 (Fri, 19 Nov 2010) | 15 lines
  
  Merged revisions 295628 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r295628 | twilson | 2010-11-19 12:53:36 -0800 (Fri, 19 Nov 2010) | 8 lines
    
    Discard responses with more than one Via
    
    This is not a perfect solution as headers that are joined via commas are not
    detected. This is a parsing issue that to fix "correctly" would necessitate 
    a new SIP parser.
    
    Review: https://reviewboard.asterisk.org/r/1019/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@295673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-19 22:06:10 +00:00
Richard Mudgett
7fbafbd5df Bring sig_analog extraction more into alignment with orig-trunk/v1.6.2 chan_dahdi.
* Restore SMDI support.
* Fixed initial value of struct analog_pvt.use_callerid.  It may get
forced on depending upon other config options.
* Call analog_dnd() instead of manual inlined code.
* Removed unused struct analog_pvt.usedistinctiveringdetection.
* Removed the struct analog_pvt.unknown_alarm flag.  It was really the
struct analog_pvt.inalarm flag.
* Use ast_debug() instead of ast_log(LOG_DEBUG).
* Rename several function's index variable to idx.
* Some formatting tweaks.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@295516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-19 16:47:11 +00:00
Richard Mudgett
ac9434aecc Merged revisions 294822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r294822 | rmudgett | 2010-11-11 20:44:12 -0600 (Thu, 11 Nov 2010) | 18 lines
  
  Merged revisions 294821 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r294821 | rmudgett | 2010-11-11 20:41:13 -0600 (Thu, 11 Nov 2010) | 11 lines
    
    Asterisk is getting a "No D-channels available!" warning message every 4 seconds.
    
    Asterisk is just whining too much with this message: "No D-channels
    available!  Using Primary channel XXX as D-channel anyway!".
    
    Filtered the message so it only comes out once if there is no D channel
    available without an intervening D channel available period.
    
    (closes issue #17270)
    Reported by: jmls
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-12 02:45:22 +00:00
Jeff Peeler
01f31e0c50 Merged revisions 294733 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r294733 | jpeeler | 2010-11-11 15:57:22 -0600 (Thu, 11 Nov 2010) | 25 lines
  
  Merged revisions 294688 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r294688 | jpeeler | 2010-11-11 15:12:27 -0600 (Thu, 11 Nov 2010) | 18 lines
    
    Fix problem with qualify option packets for realtime peers never stopping.
    
    The option packets not only never stopped, but if a realtime peer was not in
    the peer list multiple options dialogs could accumulate over time. This
    scenario has the potential to progress to the point of saturating a link just
    from options packets. The fix was to ensure that the poke scheduler checks to
    see if a peer is in the peer list before continuing to poke. The reason a peer
    must be in the peer list to be able to properly manage an options dialog is
    because otherwise the call pointer is lost when the peer is regenerated from
    the database, which is how existing qualify dialogs are detected.
    
    (closes issue #16382)
    (closes issue #17779)
    Reported by: lftsy
    Patches: 
          bug16382-3.patch uploaded by jpeeler (license 325)
    Tested by: zerohalo
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-11 21:58:25 +00:00
Richard Mudgett
3f9644b7db Analog lines do not transfer CONNECTED LINE or execute the interception macros.
Add connected line update for sig_analog transfers and simplify the
corresponding sig_pri and chan_misdn transfer code.

Note that if you create a three-way call in sig_analog before transferring
the call, the distinction of the caller/callee interception macros make
little sense.  The interception macro writer needs to be prepared for
either caller/callee macro to be executed.  The current implementation
swaps which caller/callee interception macro is executed after a three-way
call is created.

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

JIRA ABE-2589
JIRA SWP-2372


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-09 16:55:32 +00:00
Matthew Nicholson
529b8fc988 Merged revisions 294242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r294242 | mnicholson | 2010-11-08 14:50:21 -0600 (Mon, 08 Nov 2010) | 8 lines
  
  Go off hold when we get an empty reinvite telling us to.
  
  (closes issue 0014448)
  Reported by: frawd
  
  (closes issue #17878)
  Reported by: frawd
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-08 20:56:30 +00:00
Richard Mudgett
4e39e38ac5 valgrind reported references to freed memory during a mISDN hangup collision.
Bad things have been happening in chan_misdn because the chan_misdn
channel private struct chan_list is not protected from reentrancy.  Hangup
collisions have be causing read and write accesses to freed memory.

Converted chan_misdn struct chan_list to an ao2 object for its reference
counting feature.

**********
Removed an impediment to converting chan_list to an ao2 object.

The use of the other_ch member in chan_list is shaky at best.  It is set
if the incoming and outgoing call legs are mISDN.  The use of the other_ch
member goes against the Asterisk architecture and can even cause problems.

1) It is used to disable echo cancellation.  This could be bad if the call
is forked and the winning call leg is not mISDN or the winning call leg is
not the last mISDN channel called by the fork.  The other_ch would become
a dangling pointer.

2) It is used when the far end is alerting to hear the far end's inband
audio instead of Asterisk's generated ringback tone.  This is bad if the
call is forked.  You would only hear the last forked mISDN channel and it
may not be ringing yet.

The other_ch would become a dangling pointer if the call is later
transferred.
**********

JIRA SWP-2423
JIRA ABE-2614


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-08 17:16:01 +00:00
Brett Bryant
e1a1360451 Fixed deadlock avoidance issues while locking channel when adding the
Max-Forwards header to a request.

(closes issue #17949)
(closes issue #18200)
Reported by: bwg

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-05 22:03:11 +00:00
David Vossel
c34f40e710 Fixes ringback tone on sip semi-attended transfer.
ABE-2168


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-04 21:39:51 +00:00
Paul Belanger
5cf1c93fd5 Do not output port in IPaddress for AMI sippeers.
(closes issue #18248)
Reported by: orn
Patches: 
      ami_sippeers.patch uploaded by pabelanger (license 224)
Tested by: orn


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-04 13:27:54 +00:00
Richard Mudgett
252cffd38d Merged revisions 293806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r293806 | rmudgett | 2010-11-03 13:31:57 -0500 (Wed, 03 Nov 2010) | 27 lines
  
  Merged revisions 293805 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r293805 | rmudgett | 2010-11-03 13:23:04 -0500 (Wed, 03 Nov 2010) | 20 lines
    
    Party A in an analog 3-way call would continue to hear ringback after party C answers.
    
    All parties are analog FXS ports.
    1) A calls B.
    2) A flash hooks to call C.
    3) A flash hooks to bring C into 3-way call before C answers.  (A and B hear ringback)
    4) C answers
    5) A continues to hear ringback during the 3-way call. (All parties can hear each other.)
    
    * Fixed use of wrong variable in dahdi_bridge() that stopped ringback on
    the wrong subchannel.
    
    * Made several debug messages have more information.
    
    A similar issue happens if B and C are SIP channels.  B continues to hear
    ringback.  For some reason this only affects v1.8 and trunk.
    
    * Don't start ringback on the real and 3-way subchannels when creating the
    3-way conference.  Removing this code is benign on v1.6.2 and earlier.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-03 18:35:19 +00:00
Terry Wilson
6dfc9dddd8 Avoid valgrind warnings for ast_rtp_instance_get_xxx_address
The documentation for ast_rtp_instance_get_(local/remote)_address stated that
they returned 0 for success and -1 on failure. Instead, they returned 0 if the
address structure passed in was already equivalent to the address instance
local/remote address or 1 otherwise. 90% of the calls to these functions
completely ignored the return address and passed in an uninitialized struct,
which would make valgrind complain even though the operation was technically
safe.

This patch fixes the documentation and converts the get_xxx_address functions
to void since all they really do is copy the address and cannot fail.
Additionally two new functions
(ast_rtp_instance_get_and_cmp_(local/remote)_address) are created for the 3
times where the return value was actually checked. The
get_and_cmp_local_address function is currently unused, but exists for the sake
of symmetry.

The only functional change as a result of this change is that we will not do an
ast_sockaddr_cmp() on (mostly uninitialized) addresses before doing the
ast_sockaddr_copy() in the get_*_address functions. So, even though it is an
API change, it shouldn't have a noticeable change in behavior.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-03 18:05:14 +00:00
Jeff Peeler
9a482b0724 Merged revisions 293723 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r293723 | jpeeler | 2010-11-02 18:07:13 -0500 (Tue, 02 Nov 2010) | 15 lines
  
  Merged revisions 293722 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r293722 | jpeeler | 2010-11-02 18:02:51 -0500 (Tue, 02 Nov 2010) | 8 lines
    
    Add enabled/disabled information for rtautoclear sip show settings output.
    
    When setting to zero/"no", the numeric default was shown making it not obvious
    the disabled setting was respected.
    
    (closes issue #18123)
    Reported by: zerohalo
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-02 23:09:06 +00:00
Richard Mudgett
643d500d66 Merged revisions 293647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r293647 | rmudgett | 2010-11-02 16:26:30 -0500 (Tue, 02 Nov 2010) | 13 lines
  
  Merged revisions 293639 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r293639 | rmudgett | 2010-11-02 16:24:13 -0500 (Tue, 02 Nov 2010) | 6 lines
    
    Make warning message have more useful information in it.
    
    Change "Unable to get index, and nullok is not asserted" to "Unable to get
    index for '<channel-name>' on channel <number> (<function>(), line
    <number>)".
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-02 21:29:25 +00:00
Richard Mudgett
ea00bff969 Analog 3-way call would not connect all parties if one was using sig_pri.
Also the "dahdi show channel" would not show the correct 3-way call
status.

* Synchronized the inthreeway flag between chan_dahdi and sig_analog.

* Fixed a my_set_linear_mode() sign error and made take an analog sub
channel enum.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-01 17:29:30 +00:00
Paul Belanger
8b53a54dc3 Use ast_sockaddr_from_sin function not memcpy
This resolves some IAX2 registration issue report on the 
asterisk-users mailing list. 

(closes issue #18202)
Reported by: pabelanger
Patches: 
      update_registry.patch.v2 uploaded by pabelanger (license 224)
Tested by: pabelanger, Nic Colledge (mailing list)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-01 16:09:05 +00:00