Commit Graph

6441 Commits

Author SHA1 Message Date
Olle Johansson ede3699c6e Merged revisions 227088 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r227088 | oej | 2009-11-03 11:29:59 +0100 (Tis, 03 Nov 2009) | 7 lines

Use proper response code when violating Contact ACL's.

https://reviewboard.asterisk.org/r/415/

Thanks kpfleming for a quick review.
(EDVX-003)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 11:11:15 +00:00
Tilghman Lesher 66579d9d49 Add PacketCable NCS 1.0 support for Docsis/Eurodocsis networks
(closes issue #12950)
 Reported by: alea-soluciones
 Patches: 
       ncs-pktccops-12950-r206803.patch uploaded by alea-soluciones (license 514)
 Tested by: alea-soluciones, adomjan, urtho, nahuelgreco


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 22:29:19 +00:00
David Brooks 2c4d3b3168 SIP channel name uniqueness
SIP channel names were supposed to be unique by way of a name suffix derived from the
pointer to the channel's private data. Uniqueness was preserved on 32-bit systems, but
not on 64-bit systems. This patch, as suggested by kpfleming, replaces this suffix with
a simple incremented unsigned int.

(closes issue #15152)
Reported by: palbrecht

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 20:59:37 +00:00
Richard Mudgett 6406f39594 DAHDI ISDN channel names will not allow device state to work. (Interim solution.)
Since ISDN works like SIP and not analog ports in regard to devices, the
device state based on the ISDN channel number could not work.  This has
not been an issue until the advent of PTMP NT mode.  Previously, ISDN
lines were used as trunks and did not have to keep track of specific
devices.

As an interim solution until device states are properly implemented, the
channel name is being changed to the following format to use the generic
device state support:
DAHDI/i<span>/<number>[:<subaddress>]-<sequence-number>

Dialplan hints would thus be:
exten => xxx,hint,DAHDI/i2/5551212

This will work with the following restrictions:
*  The number of devices/phones cannot exceed the number of B channels.
(i.e., BRI has 2)
*  Each device/phone can only have one number.  No shared MSN's.
*  The phones/devices probably should not use subaddressing.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 17:34:22 +00:00
Matthew Nicholson 93e43578ec This patch adds support for a draft proposal for adding Q.850 reason headers to sip messages.
(closes issue #13385)
Reported by: adomjan
Patches:
      sip.conf.sample-trunk20090929-reason_q850.patch uploaded by adomjan (license 487)
      CHANGES-trunk20090929-reason_q850.patch uploaded by adomjan (license 487)
      chan_sip.c-trunk20090929-reason_q850_atoi_fix.patch uploaded by adomjan (license 487)
      sip-q850-hangupcause1.diff uploaded by mnicholson (license 96)
Tested by: adomjan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 14:57:11 +00:00
Richard Mudgett 7fbd314a88 Cleanup some flags on DAHDI PRI channel hangup.
*  Cleanup some flags on DAHDI PRI channel hangup. (sig_pri split)
*  Make sure the outgoing flag is cleared if a new channel fails to get
created for outgoing calls.
*  Remove some unused flags since sig_pri was split.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-30 23:26:41 +00:00
Joshua Colp b9c370da86 Merged revisions 226531 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r226531 | file | 2009-10-29 15:11:26 -0300 (Thu, 29 Oct 2009) | 6 lines
  
  Add an option to enabling passing music on hold start and stop requests through instead of
  acting on them in chan_local.
  
  (closes issue #14709)
  Reported by: dimas
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-29 18:13:42 +00:00
Olle Johansson 64e8fb465b Doxygen documentation update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-29 12:20:16 +00:00
Joshua Colp 5825f68e8b Add support for receiving unsolicited MWI NOTIFY messages.
This change adds a configuration option to SIP peers, unsolicited_mailbox, which
configures a virtual mailbox to use for received new/old MWI information. This
virtual mailbox can then be used by any device supporting MWI.

(closes issue #13028)
Reported by: AsteriskRocks
Patches:
      bug_13028_chan_sip_external_mwi_20090707.patch uploaded by cmaj (license 830)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-27 13:30:27 +00:00
Kevin P. Fleming ea8b54fb9d Fix building in REF_DEBUG mode.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-26 22:04:04 +00:00
Jeff Peeler ec0a1882c9 ACL check not present for verifying SIP INVITEs
The ACL check in check_peer_ok was missing and has now been restored. The
missing check allowed for calls to be made on prohibited networks where an ACL
was defined in sip.conf and the allowguest option was set to off. See the AST
security advisory below for more information.

Merge code associated with AST-2009-007.

(closes issue #16091)
Reported by: thom4fun


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-26 19:40:26 +00:00
Richard Mudgett 71452322a2 Make conditionals create previous code when libpri/ss7 are present.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-26 16:07:09 +00:00
Tzafrir Cohen 2736168a6b span numbers in pri debug / error messages
Prefix PRI trace messages with the span number. This makes the trace
readable even when you have a multi-port device.

(closes issue #15054)
Reported by: tzafrir
Patches:
      dahdi_pri_debug_spannum.diff uploaded by tzafrir (license 46)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-26 13:29:54 +00:00
Tzafrir Cohen e5a57959eb Re-arange code a bit to build in dev-mode without ss7
No change of functionality here. Just localized a variable and indented
code into blocks.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-26 11:34:06 +00:00
Tzafrir Cohen d36cecd578 Make chan_dahdi build even without PRI / SS7
(Note: still some strange build warnings without SS7 in dev-mode)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-26 09:40:49 +00:00
Kevin P. Fleming fb0196fce6 Improve performance of pedantic mode dialog searching in chan_sip.
This patch changes chan_sip to use the new astobj2 OBJ_MULTIPLE iterator support
to make pedantic mode dialog searching in find_call() not require a linear search
of all dialogs in the list of dialogs. This patch does *not* change the dialog
matching logic (more on that later), just improves the searching performance.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-24 14:40:37 +00:00
Richard Mudgett cff6d02b53 Add to chan_dahdi ISDN HOLD, Call deflection, and keypad facility support.
* Added handling of received HOLD/RETRIEVE messages and the optional ability
  to transfer a held call on disconnect similar to an analog phone.
* Added CallRerouting/CallDeflection support for Q.SIG, ETSI PTP, ETSI PTMP.
  Will reroute/deflect an outgoing call when receive the message.
  Can use the DAHDISendCallreroutingFacility to send the message for the
  supported switches.
* Added ability to send/receive keypad digits in the SETUP message.
  Send keypad digits in SETUP message: Dial(DAHDI/g1[/K<keypad_digits>][/extension])
  Access any received keypad digits in SETUP message by: ${CHANNEL(keypad_digits)}
* Added support for BRI PTMP NT mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-23 16:57:33 +00:00
David Vossel 2208fb171b Fixes an iterator memory leak and uninitialized memory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-23 14:41:50 +00:00
Richard Mudgett 63473616da Search for the subaddress only within the extension section of the dial string.
Dial(DAHDI/(g|G|r|R)<group#(0-63)>[c|r<cadance#>|d][/extension])


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 20:07:55 +00:00
David Vossel 776a14386a SIP TCP/TLS: move client connection setup/write into tcp helper thread, various related locking/memory fixes.
What this patch fixes
1.Moves sip TCP/TLS connection setup into the TCP helper thread:
  Connection setup takes awhile and before this it was being
  done while holding the monitor lock.
2.Moves TCP/TLS writing to the TCP helper thread:  Through the
  use of a packet queue and an alert pipe, the TCP helper thread
  can now be woken up to write data as well as read data.
3.Locking error: sip_xmit returned an XMIT_ERROR without giving
  up the tcptls_session lock.  This lock has been completely removed
  from sip_xmit and placed in the new sip_tcptls_write() function.
4.Memory leak:  When creating a tcptls_client the tls_cfg was alloced
  but never freed unless the tcptls_session failed to start.  Now the
  session_args for a sip client are an ao2 object which frees the
  tls_cfg on destruction.
5.Pointer to stack variable: During sip_prepare_socket the creation
  of a client's ast_tcptls_session_args was done on the stack and
  stored as a pointer in the newly created tcptls_session.  Depending
  on the events that followed, there was a slight possibility that
  pointer could have been accessed after the stack returned.  Given
  the new changes, it is always accessed after the stack returns
  which is why I found it.

Notable code changes
1.I broke tcptls.c's ast_tcptls_client_start() function into two
  functions.  One for creating and allocating the new tcptls_session,
  and a separate one for starting and handling the new connection.
  This allowed me to create the tcptls_session, launch the helper
  thread, and then establish the connection within the helper thread.
2.Writes to a tcptls_session are now done within the helper thread.
  This is done by using an alert pipe to wake up the thread if new
  data needs to be sent.  The thread's sip_threadinfo object contains
  the alert pipe as well as the packet queue.
3.Since the threadinfo object contains the alert pipe, it must now be
  accessed outside of the helper thread for every write (queuing of a
  packet).  For easy lookup, I moved the threadinfo objects from a
  linked list to an ao2_container.

(closes issue #13136)
Reported by: pabelanger
Tested by: dvossel, whys

(closes issue #15894)
Reported by: dvossel
Tested by: dvossel

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 19:55:51 +00:00
Richard Mudgett 1174a61612 Add support for calling and called subaddress. Partial support for COLP subaddress.
The Telecom Specs in NZ suggests that SUB ADDRESS is always on, so doing
"desk to desk" between offices each with an asterisk box over the ISDN
should then be possible, without a whole load of DDI numbers required.

(closes issue #15604)
Reported by: alecdavis
Patches:
      asterisk_subaddr_trunk.diff11.txt uploaded by alecdavis (license 585)
      Some minor modificatons were made.
Tested by: alecdavis, rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 16:33:22 +00:00
David Vossel 3acfd4933c Merged revisions 225243 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r225243 | dvossel | 2009-10-21 15:58:08 -0500 (Wed, 21 Oct 2009) | 13 lines
  
  IAX2: VNAK loop caused by signaling frames with no destination call number
  
  It is possible for the PBX thread to queue up signaling frames before
  a destination call number is received.  This can result in signaling
  frames being sent out with no destination call number. Since recent
  versions of Asterisk require accurate destination callnumbers for all
  Full Frames, this can cause a VNAK loop to occur.  To resolve this
  no signaling frames are sent until a destination callnumber is received,
  and destination call numbers are now only required for iax_pvt matching
  when the frame is an ACK.
  
  Review: https://reviewboard.asterisk.org/r/413/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 21:58:46 +00:00
Kevin P. Fleming 87ff40d3f3 Add 'mohsuggest' configuration option to 'sip show peer' CLI command and
SIPShowPeer AMI action.

(closes issue #15990)
Reported by: _brent_
Patches:
      sip_peer_info_mohsuggest-r3.patch uploaded by brent (license 388)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 21:15:40 +00:00
Joshua Colp 01ab66275a Add support for specifying the IP address to use for media streams in sip.conf
This is the second commit for this and documents the text stream using the configured
IP address and fixes a bug in the original patch where the UDPTL stream would also
use the different IP address.

(closes issue #14729)
Reported by: _brent_
Patches:
      media_address.patch uploaded by brent (license 388)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 15:35:09 +00:00
Joshua Colp a31eb5bb35 Revert media_address commit, I'm going to roll a fix to the SDP generation in the next version.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 15:04:33 +00:00
David Vossel 984d6500ce Merged revisions 225032 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r225032 | dvossel | 2009-10-21 09:37:04 -0500 (Wed, 21 Oct 2009) | 20 lines
  
  IAX/SIP shrinkcallerid option
  
  The shrinking of caller id removes '(', ' ', ')', non-trailing '.',
  and '-' from the string.  This means values such as 555.5555 and
  test-test result in 555555 and testtest.  There are instances,
  such as Skype integration, where a specific value is passed via
  caller id that must be preserved unmodified.  This patch makes
  the shrinking of caller id optional in chan_sip and chan_iax in
  order to support such cases.  By default this option is on to
  preserve previous expected behavior.
  
  (closes issue #15940)
  Reported by: dimas
  Patches:
        v2-15940.patch uploaded by dimas (license 88)
        15940_shrinkcallerid_trunk.c uploaded by dvossel (license 671)
  Tested by: dvossel
  
  Review: https://reviewboard.asterisk.org/r/408/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 14:39:10 +00:00
Joshua Colp 28d0ec5421 Add support for specifying the IP address to use for media streams in sip.conf
(closes issue #14729)
Reported by: _brent_
Patches:
      media_address.patch uploaded by brent (license 388)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 13:34:49 +00:00
Richard Mudgett c5b8e9af7c Make PRI_SUBCMD_xxx handling subaddress friendly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 02:43:36 +00:00
Matthew Nicholson 26638d3a55 Add dynamic range compression support for analog channels.
(closes issue AST-29)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-19 22:02:41 +00:00
Joshua Colp fd9f9ab01e Add a callback to sig_pri which is called when sig_pri is going to queue a control frame on a channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-19 14:32:08 +00:00
Jeff Peeler 03db5ef0e5 fix typo, sorry
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-17 02:01:36 +00:00
Jeff Peeler 53a95d9c84 Merged revisions 224330 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r224330 | jpeeler | 2009-10-16 20:32:47 -0500 (Fri, 16 Oct 2009) | 13 lines
  
  Fix stale caller id data from being reported in AMI NewChannel event
  
  The problem here is that chan_dahdi is designed in such a way to set
  certain values in the dahdi_pvt only once. One of those such values
  is the configured caller id data in chan_dahdi.conf. For PRI, the
  configured caller id data could be overwritten during a call. Instead
  of saving the data and restoring, it was decided that for all non-analog
  channels it was simply best to not set the configured caller id in the
  first place and also clear it at the end of the call.
  
  (closes issue #15883)
  Reported by: jsmith
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-17 01:36:08 +00:00
Richard Mudgett 64a32b3ad0 Merged revisions 224260 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r224260 | rmudgett | 2009-10-16 15:25:23 -0500 (Fri, 16 Oct 2009) | 18 lines
  
  Never released PRI channels when using Busy() or Congestion() dialplan apps.
  
  When the Busy() or Congestion() application is used towards ISDN (an ISDN
  progress is sent), the responding ISDN Disconnect or Release may contain
  the ISDN cause user busy or one of the congestion causes.  In chan_dahdi.c
  these causes will only set the needbusy or needcongestion flags and not
  activate the softhangup procedure.  Unfortunately only the latter can
  interrupt the endless wait loop of Busy()/Congestion().
  
  Result: PRI channels staying in state busy for the rest of asterisk life
  or until the other end times out and forces the call to clear.
  
  (issue #14292)
  Reported by: tomaso
  Patches:
        disc_rel_userbusy.patch uploaded by tomaso (license 564)
        (This patch is unrelated to the issue.)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-16 20:40:57 +00:00
Jeff Peeler e3f473f4f3 Allow for adding message body to the SIP NOTIFY message
Ability has been added to both manager command SIPnotify as well as console
command sip notify. Message body is stored in the "Content" variable. An 
example is present in sip_notify.conf.

(closes issue #13926)
Reported by: jthurman
Patches:
      sip-notify-svn189463.diff uploaded by gareth (license 208)
Tested by: gareth


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-14 17:48:57 +00:00
Kevin P. Fleming e197f85b8c Remove automatic switching from T.38 to voice mode in chan_sip.
chan_sip has some code to automatically switch from T.38 mode to voice mode when
a voice frame is written to the channel while it is in T.38 mode; this was
intended to handle the situation when a FAX transmission has ended and the channel
is not yet hung up, but is causing problems at the beginning of FAX sessions as
well when there are still voice frames 'in flight' at the time the T.38 negotiation
completes. This patch removes the automatic switchover, and changes app_fax to
explicitly switch off T.38 mode when the FAX transmission process ends.

(closes issue #16025)
Reported by: jamicque


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-12 14:25:29 +00:00
Mark Michelson 9e1598b762 Check the proper page for the SENDRPID flag.
If a pending reinvite were sent, we might not properly
send connected party info since we were checking the wrong
flag. This was a rare occurrence, but could still happen
nevertheless.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-11 22:19:22 +00:00
David Vossel fc27da108d Merged revisions 223205 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r223205 | dvossel | 2009-10-09 12:52:35 -0500 (Fri, 09 Oct 2009) | 10 lines
  
  fixes sip registration using authuser in user.conf
  
  (closes issue #14954)
  Reported by: tornblad
  Tested by: mmichelson, tornblad, dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09 17:53:37 +00:00
David Vossel 0a50c512da 'auth=' did not parse md5 secret correctly
(closes issue #15949)
Reported by: ebroad
Patches:
      authparsefix.patch uploaded by ebroad (license 878)
      15949_trunk.diff uploaded by dvossel (license 671)
Tested by: ebroad


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09 16:54:02 +00:00
David Vossel b2a7eecd6e p->peerauth is always empty in transmit_register()
When using callbackextension or specifing the peer name
in a registration string, the peer's specific auth settings
set by the "auth=" strings within the peer definition are not
used by the registration.  Thanks to ebroad for reporting the
issue and providing the patch.

(closes issue #15955)
Reported by: ebroad
Patches:
      regauthfix.patch uploaded by ebroad (license 878)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09 15:49:30 +00:00
David Vossel 799e9962b6 fixed comment line for do_magic_pickup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-08 22:57:53 +00:00
David Vossel c0ee60419d Deadlock between ast_cel_report_event and ast_do_masquerade
chan_sip calls pbx_exec on a pvt's owner channel while only the
pvt lock is held.  Since pbx_exec calls ast_cel_report_event which
attempts to lock the channel, invalid locking order occurs.  Channels
should be locked before pvt's.

(closes issue #15512)
Reported by: lmsteffan
Patches:
      ast_cel_deadlock_15512.diff uploaded by dvossel (license 671)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-08 22:04:41 +00:00
David Vossel b764544641 makes externtcpport and externtlsport static variables
externtcpport and externtlsport need to be declared as static
variables.  Thanks to russell for finding and pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-08 20:53:14 +00:00
Richard Mudgett 890d500287 Merged revisions 222797 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222797 | rmudgett | 2009-10-08 11:33:06 -0500 (Thu, 08 Oct 2009) | 12 lines
  
  Fix memory leak if chan_misdn config parameter is repeated.
  
  Memory leak when the same config option is set more than once in an
  misdn.conf section.  Why must this be considered?  Templates!  Defining a
  template with default port options and later adding to or overriding some
  of them.
  
  Patches:
        memleak-misdn.patch
  
  JIRA ABE-1998
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-08 16:44:33 +00:00
David Vossel 9456ab2724 Deadlock in channel masquerade handling
Channels are stored in an ao2_container.  When accessing an item within
an ao2_container the proper locking order is to first lock the container,
and then the items within it.

In ast_do_masquerade both the clone and original channel must be locked
for the entire duration of the function.  The problem with this is that
it attemptes to unlink and link these channels back into the ao2_container
when one of the channel's name changes.  This is invalid locking order as
the process of unlinking and linking will lock the ao2_container while
the channels are locked!!! Now, both the channels in do_masquerade are
unlinked from the ao2_container and then locked for the entire function.
At the end of the function both channels are unlocked and linked back
into the container with their new names as hash values.

This new method of requiring all channels and tech pvts to be unlocked
before ast_do_masquerade() or ast_change_name() required several
changes throughout the code base.

(closes issue #15911)
Reported by: russell
Patches:
      masq_deadlock_trunk.diff uploaded by dvossel (license 671)
Tested by: dvossel, atis

(closes issue #15618)
Reported by: lmsteffan
Patches:
      deadlock_local_attended_transfers_trunk.diff uploaded by dvossel (license 671)
Tested by: lmsteffan, dvossel

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-07 22:58:38 +00:00
Richard Mudgett 49b90d5e61 Merged revisions 222691 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222691 | rmudgett | 2009-10-07 16:51:24 -0500 (Wed, 07 Oct 2009) | 14 lines
  
  chan_misdn.c:process_ast_dsp() memory leak
  
  misdn.conf: astdtmf must be set to "yes".  With "no", buffer loss does not
  occur.
  
  The translated frame "f2" when passing through ast_dsp_process() is not
  freed whenever it is not used further in process_ast_dsp().  Then in the
  end it is never ever freed.
  
  Patches:
        translate.patch
  
  JIRA ABE-1993
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-07 21:56:36 +00:00
Jeff Peeler 4ae6bee6da Change ringt (ring timeout) styles to be consistent across chan_dahdi.
(closes issue #15684)
Reported by: alecdavis
Patches: 
      chan_dahdi.bug15684.diff2.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-07 20:08:14 +00:00
David Vossel f819ce5b20 Merged revisions 222542 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222542 | dvossel | 2009-10-07 12:41:21 -0500 (Wed, 07 Oct 2009) | 8 lines
  
  crash on transfer
  
  handle_invite_replaces() attempts to uplock a pvt's
  owner channel without first verifing that it exists.
  
  (issue #16027)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-07 17:44:52 +00:00
Jeff Peeler b5eb0449c0 Merged revisions 222462 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222462 | jpeeler | 2009-10-06 18:51:19 -0500 (Tue, 06 Oct 2009) | 8 lines
  
  Add missing unlock(s) in dahdi_read
  
  (two cases in trunk)
  
  (closes issue #15683)
  Reported by: alecdavis
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 23:56:01 +00:00
David Vossel 1d40faebac contact header port ignored transport when using externip
This patch adds support for TCP/TLS in the Contact header when using
NAT, specifically externip or externhost. The original issue was that
Asterisk sent 5060 as the port in the contact header whether TLS was
used or not. Additionally, this patch adds 2 config options to sip.conf,
specifically externtcpport and externtlsport. This allows a user to
specify different external ports for TCP and TLS other than those used
internally, this is especially useful in in a PAT/port redirection setup.
Thanks to ebroad for reporting the issue and providing the patch!

(closes issue #15880)
Reported by: ebroad
Patches:
      portmap.patch uploaded by ebroad (license 878)
      externtXXport_v2.patch uploaded by ebroad (license 878)
Tested by: ebroad

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 22:39:56 +00:00
Jeff Peeler f7fa417130 Fix 222298 (crash during destruction of second channel when variable set with
setvar).

I mistakenly reasoned that setvar would be used on all channels. Since it can
be set per channel, give each dahdi channel a copy of the variable.

(related to #15899)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 20:35:19 +00:00
Jeff Peeler 0c7f4cfb85 Fix crash during destruction of second channel when variable set with setvar.
The setvar line in chan_dahdi.conf is shared among all the channels, so make
sure to only free the resources only when the last channel is destroyed.

(closes issue #15899)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 19:24:59 +00:00
Tzafrir Cohen 0c3cd2ee45 Make sure digit events are not reported as "ERROR"
dahdievent_to_analogevent used a simple switch statement to convert DAHDI
event numbers to "ANALOG_*" event numbers. However "digit" events
(DAHDI_EVENT_PULSEDIGIT, DAHDI_EVENT_DTMFDOWN, DAHDI_EVENT_DTMFUP)
are accompannied by the digit in the low word of the event number.

This fix makes dahdievent_to_analogevent() return the event number as-is
for such an event.

This is also required to fix #15924 (in addition to r222108).  


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 16:17:30 +00:00
Kevin P. Fleming 1c9fe00920 Recorded merge of revisions 222152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222152 | kpfleming | 2009-10-05 20:16:36 -0500 (Mon, 05 Oct 2009) | 20 lines
  
  Fix ao2_iterator API to hold references to containers being iterated.
  
  See Mantis issue for details of what prompted this change.
  
  Additional notes:
  
  This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK
  has become an enum instead of a macro, with a name that fits our
  naming policy; also, it is now necessary to call
  ao2_iterator_destroy() on any iterator that has been
  created. Currently this only releases the reference to the container
  being iterated, but in the future this could also release other
  resources used by the iterator, if the iterator implementation changes
  to use additional resources.
  
  (closes issue #15987)
  Reported by: kpfleming
  
  Review: https://reviewboard.asterisk.org/r/383/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 01:24:24 +00:00
Kevin P. Fleming 20743ec07d Allow non-compliant T.38 endpoints to be supportable via configuration option.
Many T.38 endpoints incorrectly send the maximum IFP frame size they can accept
as the T38FaxMaxDatagram value in their SDP, when in fact this value is
supposed to be the maximum UDPTL payload size (datagram size) they can accept.
If the value they supply is small enough (a commonly supplied value is '72'),
T.38 UDPTL transmissions will likely fail completely because the UDPTL packets
will not have enough room for a primary IFP frame and the redundancy used for
error correction. If this occurs, the Asterisk UDPTL stack will emit log messages
warning that data loss may occur, and that the value may need to be overridden.

This patch extends the 't38pt_udptl' configuration option in sip.conf to allow
the administrator to override the value supplied by the remote endpoint and
supply a value that allows T.38 FAX transmissions to be successful with that
endpoint. In addition, in any SIP call where the override takes effect, a debug
message will be printed to that effect. This patch also removes the
T38FaxMaxDatagram configuration option from udptl.conf.sample, since it has not
actually had any effect for a number of releases.

In addition, this patch cleans up the T.38 documentation in sip.conf.sample
(which incorrectly documented that T.38 support was passthrough only).

(issue #15586)
Reported by: globalnetinc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-05 19:45:00 +00:00
Jeff Peeler 10e8ee1746 Add a few missing events to analog_handle_event.
The reported bug was actually only for pulsedigit, dtmfup, and dtmfdown
handling. Also added recognition for fax events (just some verbose output) and
fixed handling for the ec_disabled_event. In order to make comparing the analog
version of events to the DAHDI events easier, the ordering has been changed to
follow that of the DAHDI events.

(closes issue #15924)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-05 19:20:36 +00:00
David Vossel 3cce68d329 Merged revisions 222026 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222026 | dvossel | 2009-10-02 12:32:13 -0500 (Fri, 02 Oct 2009) | 3 lines
  
  Removes unnecessary unlock, clarifies a memcpy.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-02 17:34:07 +00:00
Richard Mudgett 80f0a242a7 Whitespace change.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-02 01:49:25 +00:00
Richard Mudgett 1a02b4c659 Whitespace change.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-02 01:46:51 +00:00
Richard Mudgett 3b83d2b414 Merged revisions 221769 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r221769 | rmudgett | 2009-10-01 18:18:28 -0500 (Thu, 01 Oct 2009) | 26 lines
  
  Occasionally losing use of B channels in chan_misdn.
  
  I have not been able to reproduce the problem of losing channels.
  However, I have seen in the code a reentrancy problem that might give
  these symptoms.
  
  The reentrancy patch does several things:
  1) Guards B channel and B channel structure allocation.
  2) Makes the B channel structure find routines more precise in locating records.
  3) Never leave a B channel allocated if we received cause 44.
  
  The last item may cause temporary outgoing call problems, but they should
  clear when the line becomes idle.
  
  (closes issue #15490)
  Reported by: slutec18
  Patches:
        issue15490_channel_alloc_reentrancy.patch uploaded by rmudgett (license 664)
  Tested by: rmudgett, slutec18
  
  (closes issue #15458)
  Reported by: FabienToune
  Patches:
        issue15458_channel_alloc_reentrancy.patch uploaded by rmudgett (license 664)
  Tested by: FabienToune, rmudgett, slutec18
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-02 01:09:31 +00:00
Tilghman Lesher c0a884ba29 Revision 220906 (a merge from 1.4) was not merged correctly, causing a problem with non-dynamic peers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-01 20:09:46 +00:00
Richard Mudgett 9c05faf76d Prevent deadlock if chan_dahdi attempts to change PRI channel names.
The PRI channels can no longer change the channel name if a different B
channel is selected during call negotiation.  To prevent using the channel
name to infer what B channel a call is using and to avoid name collisions,
the channel name format is changed.

The new channel naming for PRI channels is:
DAHDI/ISDN-<span>-<sequence-number>


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-01 19:48:58 +00:00
David Vossel aaa7284c00 outbound tls connections were not defaulting to port 5061
(closes issue #15854)
Reported by: dvossel
Patches:
      sip_port_config_trunk.diff uploaded by dvossel (license 671)
Tested by: dvossel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-01 19:33:33 +00:00
Matthew Nicholson da169b2db4 Merged revisions 221588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r221588 | mnicholson | 2009-10-01 10:24:00 -0500 (Thu, 01 Oct 2009) | 2 lines
  
  Use unsigned ints for portinuri flags.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-01 15:26:20 +00:00
Olle Johansson 73697dc2c7 Simplify code for porturi, use TRUE/FALSE constructs when it's just TRUE or FALSE.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-01 07:00:04 +00:00
Matthew Nicholson d043f52a2d Cleaned up merge from r221432
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-30 23:04:03 +00:00
Matthew Nicholson a5eee590f4 Merged revisions 221360 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r221360 | mnicholson | 2009-09-30 14:36:06 -0500 (Wed, 30 Sep 2009) | 10 lines
  
  Fix SRV lookup and Request-URI generation in chan_sip.
  
  This patch adds a new field "portinuri" to the sip dialog struct and the sip peer struct.  That field is used during RURI generation to determine if the port should be included in the RURI.  It is also used in some places to determine if an SRV lookup should occur.
  
  (closes issue #14418)
  Reported by: klaus3000
  Tested by: klaus3000, mnicholson
  
  Review: https://reviewboard.asterisk.org/r/369/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-30 20:40:20 +00:00
Terry Wilson 10ce6cd757 Use rtp properties instead of adding a callback
Thanks, Josh.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-30 18:21:03 +00:00
Terry Wilson 865daf4858 Merged revisions 221086 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r221086 | twilson | 2009-09-30 09:49:11 -0500 (Wed, 30 Sep 2009) | 25 lines
  
  Change the SSRC by default when our media stream changes
  
  Be default, change SSRC when doing an audio stream changes Asterisk doesn't
  honor marker bit when reinvited to already-bridged RTP streams,resulting in
  far-end stack discarding packets with "old" timestamps that areactually part of
  a new stream.  This patch sends AST_CONTROL_SRCUPDATE whenever there is a
  reinvite, unless the 'constantssrc' is set to true in sip.conf.
  
  The original issue reported to Digium support detailed the following situation:
  ITSP <-> Asterisk 1.4.26.2 <-> SIP-based Application Server Call comes in
  fromITSP, Asterisk dials the app server which sends a re-invite back
  toAsterisk--not to negotiate to send media directly to the ITSP, but to
  indicatethat it's changing the stream it's sending to Asterisk.  The app
  servergenerates a new SSRC, sequence numbers, timestamps, and sets the marker
  bit on the new stream.  Asterisk passes through the teimstamp of the new stream,
  butdoes not reset the SSRC, sequence numbers, or set the marker bit.
  
  When the timestamp on the new stream is older than the timestamp on the
  originalstream, the ITSP (which doesn't know there has been any change) discards
  the newframes because it thinks they are too old.  This patch addresses this by
  changing the SSRC on a stream update unless constantssrc=true is set in
  sip.conf.
  
  Review: https://reviewboard.asterisk.org/r/374/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-30 17:52:30 +00:00
Tilghman Lesher 6f5e763fe5 Merged revisions 220873 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r220873 | tilghman | 2009-09-29 12:59:26 -0500 (Tue, 29 Sep 2009) | 9 lines
  
  Reduce CPU usage related to building a peer merely for devicestates.
  This fixes a 100% CPU problem in the SIP driver, found by profiling
  the driver while the problem was occurring.
  (closes issue #14309)
   Reported by: pkempgen
   Patches: 
         20090924__issue14309.diff.txt uploaded by tilghman (license 14)
   Tested by: pkempgen, vrban
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-29 19:57:37 +00:00
Richard Mudgett f3f456f8b6 Miscellaneous minor changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-28 21:02:20 +00:00
Jeff Peeler 05f94a05c2 Fix building of registration entry in build_peer when using callbackextension
Check for remotesecret option was unintentionally always true, which therefore
caused the secret option to never be used. Thanks to dvossel for pointing out
the exact fix.

(closes issue #15943)
Reported by: tpsast



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-28 19:10:10 +00:00
Richard Mudgett 307bf124d2 Locking issues dealing with service_lock.
*  Removed unneeded and uninitialized service_lock.
*  Fixed potential locking imbalance in pri_dchannel():PRI_EVENT_RESTART.
*  Fixed verbose message typo in pri_dchannel():PRI_EVENT_RESTART.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-28 15:27:46 +00:00
Richard Mudgett 146c352144 Reduce indentation in sig_pri_available().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-25 19:56:18 +00:00
Philippe Sultan b11b94a083 Add JABBER_RECEIVE as a dialplan function, implement SendText in Jingle channels
JABBER_RECEIVE (along with JabberSend) makes Asterisk interact with users over
XMPP to process calls.
SendText can be used instead of JabberSend in the context of XMPP based voice
channels (chan_gtalk and chan_jingle).

(closes issue #12569)
Reported by: eech55
Tested by: phsultan, asannucci, lmadsen, jtodd, maxgo

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-25 10:54:42 +00:00
Matthew Nicholson 944b05d51a Ensure the numeric portion of the P-Asserted-Identity header is properly escaped.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-24 16:33:20 +00:00
Tilghman Lesher c68a2d9d30 Add support for 'setvar=' for MGCP device lines, like other channel drivers provide.
(closes issue #14818)
 Reported by: alea-soluciones
 Patches: 
       chan_mgcp-setvars-svn-trunk-r219899.patch uploaded by alea (license 514)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-23 23:38:19 +00:00
David Vossel 9329079bb4 Merged revisions 219720 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219720 | dvossel | 2009-09-21 11:55:53 -0500 (Mon, 21 Sep 2009) | 3 lines
  
  Reverting merge 219520. This change was not necessary.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-21 16:59:05 +00:00
Russell Bryant 5996ab0ee2 Merged revisions 219586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219586 | russell | 2009-09-18 21:51:13 -0500 (Fri, 18 Sep 2009) | 6 lines
  
  Make sure the iax_pvt exists before dereferencing it.
  
  This fixes the latest crash posted on issue 15609.
  
  (issue #15609)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-19 02:59:52 +00:00
David Vossel 95be40493a Merged revisions 219519 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219519 | dvossel | 2009-09-18 18:19:50 -0500 (Fri, 18 Sep 2009) | 9 lines
  
  iax2 frame double free
  
  The iax frame's retrans sched id was written over right
  before iax2_frame_free was called.  In iax2_frame_free that
  retrans id is used to delete the sched item.  By writing over
  the retrans field before the sched item could be deleted, it was
  possible for a retransmit to occur on a freed frame.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-18 23:20:58 +00:00
David Vossel e85e39899f Merged revisions 219450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219450 | dvossel | 2009-09-18 11:19:15 -0500 (Fri, 18 Sep 2009) | 14 lines
  
  via-header branches not updated correctly on INVITE
  
  INVITE requests must always contain a new unique branch id. When
  a new branch id is created for an INVITE, the dialog's invite_branch
  variable must be updated so CANCEL requests use the correct branch id.
  
  (closes issue #15262)
  Reported by: maniax
  Patches:
        asterisk-1.6.1.0-sip-branch.patch uploaded by tweety (license 608)
        invite_new_branch_trunk.diff uploaded by dvossel (license 671)
  Tested by: maniax, dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-18 16:20:41 +00:00
David Vossel 06782af238 fixes deadlock when performing directed pickup w Invite/replaces
(closes issue #15340)
Reported by: lmsteffan
Patches:
      deadlock.patch uploaded by lmsteffan (license 779)
Tested by: lmsteffan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-17 22:37:28 +00:00
Mark Michelson dc6f08e275 Merged revisions 219320 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219320 | mmichelson | 2009-09-17 17:20:50 -0500 (Thu, 17 Sep 2009) | 6 lines
  
  Send a 100 Trying response when we detect a spiral.
  
  This was problematic during spiral tests at SIPit...
  along with some other things as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-17 22:22:01 +00:00
David Vossel 0284951e77 Merged revisions 219303 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219303 | dvossel | 2009-09-17 16:29:37 -0500 (Thu, 17 Sep 2009) | 21 lines
  
  INVITE w/Replaces deadlock fix
  
  This patch cleans up the locking logic in chan_sip.c's
  handle_invite_replaces() function as well as making use
  of ast_do_masquerade() rather than forcing the masquerade
  on an ast_read().  The code had several redundant unlocks
  that would result in 'freed more times than we've locked!'
  errors. I cleaned these up as well as moving all the unlock
  logic to the end of the function.  This patch should also
  resolve the issue people were having with the replacecall
  channel never being unlocked with one legged calls.
  
  (closes issue #15151)
  Reported by: irroot
  Patches:
        invite_w_replaces_1.4.diff uploaded by dvossel (license 671)
  Tested by: irroot, dvossel
  
  Review: https://reviewboard.asterisk.org/r/371/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-17 21:59:21 +00:00
Joshua Colp 8a3f2fff91 Ensure no spaces exist before "refresher=" when doing the comparison.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-17 19:57:39 +00:00
Mark Michelson 19aeff195a Reverse order of args to fread.
This way, we don't always write a null byte into
byte 1 of the buffer

(closes issue #15905)
Reported by: ebroad
Patches:
      freadfix.patch uploaded by ebroad (license 878)
Tested by: ebroad



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-16 19:25:36 +00:00
Joshua Colp 5c52a7a746 On TCP and TLS connections do not attempt to stop retransmission of the packet internally.
This was preventing responses from being properly processed because the packet was not being found
causing handle_response to return prematurely.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-16 18:31:47 +00:00
David Vossel c373c8807e upward bound checking for port string to int conversion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 19:22:37 +00:00
Matthew Nicholson 6f6998fef7 Merged revisions 218578 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r218578 | mnicholson | 2009-09-15 11:03:54 -0500 (Tue, 15 Sep 2009) | 8 lines
  
  Send request contact header field with response to registrer queries instead of the address of record.
  
  (closes issue #14438)
  Reported by: ravindrad
  Patches:
        regquerypatch uploaded by ravindrad (license 684)
  Tested by: ravindrad
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 16:15:02 +00:00
Jeff Peeler 0d5e318cb2 Add some changes related to 218430.
* Remove thread_spawned in handle_init_event since it was never used
* Always check handle_init_event in case a channel is destroyed


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 16:12:49 +00:00
Mark Michelson 15c7e6dea2 Use a better method of ensuring null-termination of the buffer
while reading the SDP when using TCP.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 15:40:14 +00:00
Mark Michelson 579919e831 Ensure that SDP read from TCP socket is null-terminated.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 15:05:53 +00:00
Mark Michelson b72f28ea01 Fix off-by-one error when reading SDP sent over TCP.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 14:59:50 +00:00
Tzafrir Cohen b64beef2f3 Fix false error message on DAHDI_EVENT_REMOVED (RESULT_SUCCESS == 0)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 10:24:55 +00:00
Jeff Peeler 843a724373 Merged revisions 218401 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r218401 | jpeeler | 2009-09-14 16:47:11 -0500 (Mon, 14 Sep 2009) | 11 lines
  
  Fix handling of DAHDI_EVENT_REMOVED event to prevent crash in do_monitor.
  
  After talking to rmudgett about some of his recent iflist locking changes, it
  was determined that the only place that would destroy a channel without being
  explicitly to do so was in handle_init_event. The loop to walk the interface
  list has been modified to wait to destroy the channel until the dahdi_pvt of
  the channel to be destroyed is no longer needed.
  
  (closes issue #15378)
  Reported by: samy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-14 22:38:25 +00:00
Richard Mudgett 6c39ebaa3e Add support for multiple interface lists.
Also unlink the sig_pri_pri.pvts[] pointer in destroy_dahdi_pvt().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-14 20:08:11 +00:00
Tzafrir Cohen adde72d7b1 gcc 4.4: Remove a nop memset size 0 that annoys gcc
This memset doesn't write beyond the end of the buffer.
(tmpbuf has size of 4).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-13 17:34:11 +00:00
Moises Silva 2aa112b4d7 get rid of mfcr2 monitor thread condition, is problematic
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-13 05:51:46 +00:00
Jeff Peeler edb5e6efd9 Cleanup approach in 217804 and don't reach inside the sig_pvt.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 23:49:09 +00:00
Jeff Peeler 3a718192c6 Allow do not disturb to be set on analog channels via the CLI and AMI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 23:29:14 +00:00
Tilghman Lesher 1b147b0094 Make calltoken support work with realtime users and peers.
In the course of this, I also found that the results of ast_gethostbyname
were being used incorrectly in both chan_iax2 and chan_sip, so both have
been fixed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 23:12:16 +00:00
Richard Mudgett 32352265c4 Cleaned up chan_dahdi iflist handling and locking.
*  Fixed walking the iflist so it is always done with the iflock locked.
*  Simplified iflist walking routines.
*  Created chan_dahdi iflist insertion and extraction routines.
*  Fixed duplicate_pseudo() malloc fail handling.
*  Fixed infinite loop in action_dahdishowchannels() when showing a single channel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 22:31:12 +00:00
Richard Mudgett 9a1215989f Miscellaneous minor changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 22:11:17 +00:00
David Vossel e716801ab2 Merged revisions 217806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r217806 | dvossel | 2009-09-10 16:06:07 -0500 (Thu, 10 Sep 2009) | 22 lines
  
  IAX2 encryption regression
  
  The IAX2 Call Token security patch inadvertently broke the use of
  encryption due to the reorganization of code in the socket_process()
  function.  When encryption is used, an incoming full frame must first
  be decrypted before the information elements can be parsed.  The
  security release mistakenly moved IE parsing before decryption in
  order to process the new Call Token IE.  To resolve this, decryption
  of full frames is once again done before looking into the frame.  This
  involves searching for an existing callno, checking the pvt to see if
  encryption is turned on, and decrypting the packet before the internal
  fields of the full frame are accessed.
  
  (closes issue #15834)
  Reported by: karesmakro
  Patches:
        iax2_encryption_fix_1.4.diff uploaded by dvossel (license 671)
  Tested by: dvossel, karesmakro
  
  Review: https://reviewboard.asterisk.org/r/355/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 21:07:47 +00:00
Jeff Peeler f558f01a81 Fix crash during attended transfer over PRI.
The owner pointers in the sig_pri_chan structure were not getting updated
in dahdi_fixup. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 20:52:57 +00:00
Jeff Peeler 5561ba19aa Stop caller id transmission when offhook event detected.
This fixes the problem that would occur if an analog phone was picked up while
the caller id was being sent. The caller id before sent the whole spill even
after pickup and is now corrected.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 20:18:30 +00:00
Olle Johansson 58c4e9506a Don't assign UINT_MAX to an INT.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 18:29:21 +00:00
Olle Johansson c5b0e6e78e Include ActionID in all events that are responsed to AMI Action SIPShowRegistry
(closes issue #15868)
Reported by: nic_bellamy
Patches: 
      manager_SIPshowregistry_actionid.patch uploaded by nic bellamy (license 299)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 12:06:55 +00:00
Richard Mudgett 98d156c5dd Fix available() for SS7, MFC/R2, and pseudo channels.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 00:35:30 +00:00
Moises Silva df7dd574fd ast_log replaced for ast_verbose in MFCR2 event notifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-09 21:48:04 +00:00
Olle Johansson b6122d1a00 Don't report transfer success until we actually know. 1xx messages are not final.
Related to #12713

Patch by oej

A big thank you to file for finally fixing the transfer() dialplan application.
I've been waiting for years for this. Great work!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-09 20:09:31 +00:00
Olle Johansson cc01708520 Not having any TLS session to write to is a serious XMIT_ERROR.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-09 10:39:43 +00:00
Olle Johansson b9b6639694 Formatting and doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-09 10:38:45 +00:00
Richard Mudgett fd561e871f Fix memory leak of sig_xxx private structures.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 23:37:57 +00:00
Richard Mudgett 8562029476 Miscellaneous minor code cleanup in mkintf().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 23:31:27 +00:00
Richard Mudgett 175f609a9e Remove duplicate entry in the sig_pri_pri private pointer array.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 21:17:16 +00:00
David Vossel 7476991786 caller id number empty
parse_uri was not being given the correct scheme's, as
a result, uri parsing did not parse the username correctly.
One of the side effects of this is an empty caller id.

(closes issue #15839)
Reported by: ebroad
Patches:
      blank_cidv2.patch uploaded by ebroad (license 878)
      parse_uri_fix.diff uploaded by dvossel (license 671)
Tested by: ebroad, dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 14:26:30 +00:00
Olle Johansson 730715337e Moving another function declared in the middle of forward declarations.
Please follow the structure of the source code, thanks. Chan_sip is messy enough as it is :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 18:29:45 +00:00
Olle Johansson dce193357f Move "deprecated_username" to a flag like the others - unsigned int blah:1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 18:26:37 +00:00
Olle Johansson 8e37e119f8 - Doxygen additions
- Remove unused string in sip_registry -- "random"
- Someone added a function in the middle of all forward declarations... Weird. Moved it out of that
  section.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 18:24:04 +00:00
Olle Johansson c55469da80 Clean up the "offered_media" code
- Add variable for number of known media streams instead of hardcoding in definition of sip_pvt
- Rename "text" to "codecs" - beacuse it's what it is
- Add documentation for future developers so that we make sure that we define new sdp media types
  for SRTP-variants


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 18:00:48 +00:00
Olle Johansson 42a4b05811 Make sure we reset global_exclude_static at channel reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 16:35:12 +00:00
Olle Johansson b890815521 Move capability into sip_cfg. While at it, make sure we reset it at channel reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 16:31:36 +00:00
Olle Johansson 3b8cec9d32 Move global_regcontext into the sip_cfg structure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 16:26:04 +00:00
Olle Johansson 320b514b18 Move contact_ha to sip_cfg structure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 16:23:39 +00:00
Olle Johansson c20324021d Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 16:16:58 +00:00
Olle Johansson 11574bcfcf Since it's possible to have more than 999 calls, I'm changing the call counter roof to something higher.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 16:08:08 +00:00
Olle Johansson 246e0852a7 add doxygen and remove duplicate declaration of variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 16:00:41 +00:00
Olle Johansson 2e1d7378be After many years, remove VOCAL_DATA_HACK definition
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 15:48:41 +00:00
Olle Johansson 9c63a09344 Remove unneeded header files (tested on Linux and OS/X)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 15:47:40 +00:00
Olle Johansson 5afc513ae3 Don't send MESSAGE with sendtext() if recepient doesn't allow MESSAGE requests
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 14:54:14 +00:00
Olle Johansson 008b7a4ab8 Add some doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 14:21:01 +00:00
Olle Johansson e242e1b2ad Fix typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 14:04:40 +00:00
Olle Johansson e1c711b7de If there is no session timer in the INVITE, set it to default value (not unset minimum = -1)
Patch by oej

closes issue #15621
Reported by: fnordian
Tested by: atis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 13:06:19 +00:00
Olle Johansson 109cab6862 Simplify the code in this function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-07 11:31:19 +00:00
David Vossel 4596fdb788 sip peer matching by address only with TCP/TLS
This patch removes the contact header matching logic and
adds logic to match all tcp/tls connections by ip only.
Thanks to oej for finding the issue and suggesting solutions.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-04 19:32:07 +00:00
Olle Johansson 98f18d56b8 Merged revisions 216430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r216430 | oej | 2009-09-04 15:45:48 +0200 (Fre, 04 Sep 2009) | 27 lines

Make apps send PROGRESS control frame for early media and fix too early media issue in SIP

The issue at hand is that some legacy (dying) PBX systems send empty media frames on PRI
links *before* any call progress. The SIP channel receives these frames and by default
signals 183 Session progress and starts sending media. This will cause phones to 
play silence and ignore the later 180 ringing message. A bad user experience.

The fix is twofold:
- We discovered that asterisk apps that support early media ("noanswer") did not send
  any PROGRESS frame to indicate early media. Fixed.
- We introduce a setting in chan_sip so that users can disable any relay of media frames
  before the outbound channel actually indicates any sort of call progress.
  In 1.4, 1.6.0 and 1.6.1, this will be disabled for backward compatibility. In later versions
  of Asterisk, this will be enabled. We don't assume that it will change your Asterisk
  phone experience - only for the better.

We encourage third-party application developers to make sure that if they have applications
that wants to send early media, add a PROGRESS control frame transmission to make sure that
all channel drivers actually will start sending early media. This has not been the default
in Asterisk previous to this patch, so if you got inspiration from our code, you need to
update accordingly. Sorry for the trouble and thanks for your support.

This code has been running for a few months in a large scale installation (over 250
servers with PRI and/or BRI links to old PBX systems). 
That's no proof that this is an excellent patch, but, well, it's tested :-)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-04 14:02:34 +00:00
Russell Bryant ca23afaf2d Do not treat every SIP peer as if they were configured with insecure=port.
There was a problem in the function responsible for doing peer matching by
IP address and port number such that during the second pass for checking for
a peer configured with insecure=port, it would end up treating every peer as
if it had been configured that way.  These changes fix the logic in the peer
IP and port comparison callback to handle insecure=port checking properly.

This problem was introduced when SIP peers were converted to astobj2.  Many
thanks to dvossel for noticing this while working on another peer matching
issue.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-04 13:14:25 +00:00
Richard Mudgett c2930434f6 Lets try not to use C++ keywords for variable names.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 21:09:46 +00:00
Doug Bailey 8430c87faa Added detection DTMF CID without polarity change alert.
Added detection of DTMF tone energy levels on FXO channels in chan_dahdi
monitoring loop so DTMF CID can be detected without the need of a polarity
change precursor.  

(closes issue #9096)
Reported by: fleed
Patches:
      9096-chan_dahdi-trunk.diff uploaded by dbailey (license 819)
Tested by: cyberplant, sum, maturs


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 19:40:37 +00:00
David Vossel d09f9fd00a Merge code associated with AST-2009-006
(closes issue #12912)
Reported by: rathaus
Tested by: tilghman, russell, dvossel, dbrooks


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 16:31:54 +00:00
Olle Johansson 6d6ce303cb Add known internal IP address when autodomain=yes
(closes issue #14573)
Reported by: pj
Patches: 
      sip-internip-autodomain1.diff uploaded by mnicholson (license 96)
	modified by oej
Tested by: pj



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 13:02:41 +00:00
Tilghman Lesher a6ba2b64b1 Default the callback extension to "s". This is a regression.
(closes issue #15764)
 Reported by: elguero
 Change-type: bugfix


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 03:43:51 +00:00
Terry Wilson f9816a6265 Merged revisions 215682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r215682 | twilson | 2009-09-02 16:41:22 -0500 (Wed, 02 Sep 2009) | 18 lines
  
  Re-send non-100 provisional responses to prevent cancellation
  
  From section 13.3.1.1 of RFC 3261:
  
     If the UAS desires an extended period of time to answer the INVITE,
     it will need to ask for an "extension" in order to prevent proxies
     from canceling the transaction. A proxy has the option of canceling
     a transaction when there is a gap of 3 minutes between responses in a
     transaction. To prevent cancellation, the UAS MUST send a non-100
     provisional response at every minute, to handle the possibility of
     lost provisional responses.
  
  (closes issue #11157)
  Reported by: rjain
  Tested by: twilson
  
  Review: https://reviewboard.asterisk.org/r/315/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 23:31:04 +00:00
Richard Mudgett 595ab444af Made chan_dahdi able to ignore incoming calls that are not in a MSN list for ISDN PTMP CPE spans.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 23:25:33 +00:00
David Vossel a83cf36204 port string to int conversion using sscanf
There are several instances where a port is parsed
from a uri or some other source and converted to
an int value using atoi(), if for some reason the
port string is empty, then a standard port is used.
This logic is used over and over, so I created a function
to handle it in a safer way using sscanf().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 21:39:31 +00:00
Michiel van Baak 0a67bc6610 add Parkinglot info to sip show peer <foo> and skinny show line <foo>
If we had this from the start, debugging the 'parking not using configured parkinglot'
bug would have been easier.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 21:23:17 +00:00
Doug Bailey eff8dd9a2f Fix issue where DTMF CID detect was placing channels into signed linear mode
made analog_set_linear_mode return back the mode that was being overwritten 
so it could be restored later. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 19:49:43 +00:00
David Vossel 5537a4babe SIP uri parsing cleanup
Now, the scheme passed to parse_uri can either be a
single scheme, or a list of schemes ',' delimited.
This gets rid of the whole problem of having to create
two buffers and calling parse_uri twice to check for
separate schemes.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 17:26:40 +00:00
Michiel van Baak d7f27e6705 like in chan_sip's sip_new skinny should copy the configured parkinglot from a line to the newly created channel.
This makes callparking honor the configured parkinglot for skinny lines as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 16:20:23 +00:00
David Vossel b5dc4efb58 SIP support for keep-alive event
keep-alive events are used by Sipura/Linksys for NAT keepalive.
There currently don't appear to be any problems with NAT, but
everytime a keep-alive event is received, Asterisk responds with a
"489 Bad event".  This error may indicate to a user that NAT
problems exist just because this even is not supported.  Now,
rather than respond with an error, the packet is consumed and
a "200 ok" is sent just to indicate we received the packet.

(issue #15084)
Patches:
      chan_sip.keepalive.v1.diff uploaded by IgorG (license 20)




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 16:08:00 +00:00
Michiel van Baak 7e7081439a Honor configured parkinglot when parking and retrieving parked calls
Thank oej for pointing out the fact that sip_new did not copy parkinglot from the peer
into the newly created channel.

(closes issue #15538)
Reported by: gracedman
Patches:
      2009090100_sipnewparkinglot-161.diff.txt uploaded by mvanbaak (license 7)
	  With mod by me to also fix callparking as well (this uploaded patch only fixed retrieving a parked call)
Tested by: gracedman, mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 15:56:46 +00:00
Tilghman Lesher 2cfddf8cb6 Add MASTER_CHANNEL() dialplan function, as well as a useful usage.
(closes issue #13140)
 Reported by: cpina
 Patches: 
       20090807__issue13140.diff.txt uploaded by tilghman (license 14)
 Tested by: lmadsen
 Change-type: feature


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-01 23:41:06 +00:00
Tilghman Lesher 4af7d0c949 Fix register such that lines with a transport string, but without an authuser, parse correctly.
(AST-228)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-01 21:19:40 +00:00
Olle Johansson 8c56b871de Removing whitespace that causes red dots in reviewboard
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-01 14:40:42 +00:00
Tilghman Lesher afe7034e19 Merged revisions 214940 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r214940 | tilghman | 2009-08-31 11:16:52 -0500 (Mon, 31 Aug 2009) | 7 lines
  
  Also unlock the "other" channel, when returning, due to glare.
  (closes issue #15787)
   Reported by: tim_ringenbach
   Patches: 
         chan_local.diff uploaded by tim ringenbach (license 540)
   Tested by: tim_ringenbach
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-31 16:18:33 +00:00
Richard Mudgett f199054c88 Move discardremoteholdretrieval test so it applies only to the specific notification indicator values.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-28 19:13:53 +00:00
Tilghman Lesher 552b1aa17d Typo fix ("SIP/2.0 XXX" is 11 chars, not 10)
(closes issue #15362)
 Reported by: klaus3000
 Patches: 
       chan_sip.c_logmessagefix_patch.txt uploaded by klaus3000 (license 65)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-26 16:53:03 +00:00
Moises Silva 3b1682bfe5 improve handling of openr2_chan_disconnect_call API failure, unlikely, but happened on openr2 library bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-24 04:46:28 +00:00
Richard Mudgett 4ae5535d8f Update configure script for libpri COLP feature dependency requirements.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 23:18:16 +00:00
Tilghman Lesher c28fb2bf19 Clarifying comments in sip_register, and removing a dead section
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 22:36:39 +00:00
David Vossel 06ff8023f5 Register request line contains wrong address when user domain and register host differ
(closes issue #15539)
Reported by: Nick_Lewis
Patches:
      chan_sip.c-registraraddr.patch uploaded by Nick (license 657)
      register_domain_fix_1.6.2 uploaded by dvossel (license 671)
Tested by: Nick_Lewis, dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 22:22:11 +00:00
David Vossel 1f81e544c0 fixes sip register parsing when user@domain is used
(issue #15008)
(issue #15672)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 21:02:50 +00:00
Moises Silva 1c14bd4bfd increment the mfcr2 monitor count when clearing the call request
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 04:09:26 +00:00
Moises Silva 8a2302e118 fixed bug caused by calling ast_request without calling ast_call on an R2 channel, ie, CHANISAVAIL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-20 03:26:59 +00:00
Tilghman Lesher 3028e257bb Better parsing for the "register" line
Allows characters that are otherwise used as delimiters to be used within
certain fields (like the secret).
(closes issue #15008, closes issue #15672)
 Reported by: tilghman
 Patches: 
       20090818__issue15008.diff.txt uploaded by tilghman (license 14)
 Tested by: lmadsen, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-19 21:05:17 +00:00
Tilghman Lesher 68b255eedc If we have realtime caching enabled, 'sip reload' must purge users/peers, even if the config files haven't changed.
(closes issue #12869)
 Reported by: bcnit
 Patches: 
       20090819__issue12869__2.diff.txt uploaded by tilghman (license 14)
 Tested by: lasko


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-19 20:29:41 +00:00
Richard Mudgett 39c9838d77 Add COLP support to chan_dahdi/sig_pri.
Add Connected Line Presentation (COLP) support to chan_dahdi/libpri as an
addition to issue 8824.  This is the chan_dahdi/sig_pri portion.  COLP
support is now available for any switch for which libpri supports COLP
(currently ETSI PTP, ETSI PTMP, and Q.SIG) with this patch.

(closes issue #14068)
Tested by: rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 23:53:55 +00:00
Richard Mudgett 66f146e8cf Merged revisions 212727 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r212727 | rmudgett | 2009-08-18 11:00:56 -0500 (Tue, 18 Aug 2009) | 1 line
  
  Removed some deadwood and added some doxygen comments.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 16:29:47 +00:00
Sean Bright 4c47fce62e Correct spelling of AGENTACCEPTDTMF in chan_agent.
(closes issue #15668)
Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 18:50:24 +00:00
Jeff Peeler 36b38525a1 Merged revisions 212498 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r212498 | jpeeler | 2009-08-17 11:34:56 -0500 (Mon, 17 Aug 2009) | 12 lines
  
  Fix segfault when reloading chan_misdn.
  
  If more ports were specified than configured in misdn.conf a reload would crash
  asterisk. The problem was the unconfigured port was using data from the
  previously configured port. When the data for an unconfigured port was freed a
  crash would result from the double free.
  
  (closes issue #12113)
  Reported by: agupta
  Patches:
        bug12113.patch uploaded by jpeeler (license 325)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 16:50:45 +00:00
Richard Mudgett 0d2ef8ac5c Merged revisions 212430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

Fix uninitialized variable causing random MWI indications.

(closes issue #15727)
Reported by: doda
Patches:
      dahdi_changes.patch uploaded by doda (license 853)

........
  r212430 | rmudgett | 2009-08-17 10:36:28 -0500 (Mon, 17 Aug 2009) | 1 line
  
  Fix uninitialized variable.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 15:42:51 +00:00
Jeff Peeler e60773a298 Add braces where missing and a few whitespace fixes in sig_analog
(closes issue #15678)
Reported by: alecdavis
Patches:
      sig_analog_mainly_braces.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-14 23:07:51 +00:00
Jeff Peeler 132204459c More code that somehow got left out of sig_analog
* confirmanswer option now respected
* check and set waiting for dialtone timer
* unneeded needcallerid flag removed from analog_subchannel
* ss_astchan does not need to be a void pointer
* swap_channels callback updated to trunk
* analog_hangup now resets channel to default law


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-14 22:39:11 +00:00
Richard Mudgett a305b52fc8 Send a generic return result when we receive a CallDeflection facility message in chan_misdn.
ETSI 300-196 implies that a facility return result without arguments does
not have the operation-value.  This fact implies for ETSI that you can
only use the invoke-id to match requests with responses.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-13 17:33:44 +00:00
Kevin P. Fleming c3bc5cf567 Ensure that T38FaxVersion is put into outgoing SDP in the proper case.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-13 15:46:25 +00:00
Joshua Colp 47220d3506 Check an actual populated variable when seeing if we need to do video or not.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-13 13:51:04 +00:00
Matthew Nicholson 5583a4e955 This patch adds support for choosing a realm based on the domain in the From or To header in the incoming request. Eligible domains are taken from the domains list in the config file. This functionality is enabled when domainsasrealm is enabled in the config file.
(closes issue #11361)
Reported by: arkadia
Patches:
      sip_realm_mnich_to_added_2.patch uploaded by arkadia (license 233)
Tested by: arkadia


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 22:18:09 +00:00
Jeff Peeler b65c0edd52 Fix chan_dahdi option ringtimeout
dahdi_read relies on the dahdi_pvt copy of ringt which was not getting set
in sig_analog. This patch adds a callback to do so.

(closes issue #15288)
Reported by: alecdavis
Patches:
      chan_dahdi.ringtimeout.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 20:47:45 +00:00
Matthew Nicholson 56110dd4f1 Make asterisk handle 423 Interval Too Short messages better.
This change uses separate values for the acceptable minimum expiry provided by the 423 error and the expiry value stored in the configuration file.  Previously, the value pulled from the configuration file would be overwritten.

(closes issue #14366)
Reported by: Nick_Lewis
Patches:
      sip-expiry-fix1.diff uploaded by mnicholson (license 96)
      chan_sip.c-reqexpiry.patch uploaded by Nick (license 657)
Tested by: mnicholson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 19:53:14 +00:00
Russell Bryant 0ff53eddef Always specify which RTP engine is desired for a new RTP instance.
This fixes a crash reported in #asterisk-dev where chan_mgcp unexpectedly
allocated an RTP instance from res_rtp_multicast, since by not specifying an
engine, you get the first one in the list of engines.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 10:11:36 +00:00
Richard Mudgett 148d49e362 Encapsulate testing for which signaling styles are used by sig_pri.
Created the dahdi_sig_pri_lib_handles() function and
SIG_PRI_LIB_HANDLE_CASES macro to simplify testing for which signaling
styles are handled by sig_pri.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 23:21:57 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Michiel van Baak 41894bea92 add manager events when a skinny device registers/unregisters
like we have in chan_sip

(closes issue #15499)
Reported by: arifzaman
Patches:
      2009072600-skinnymanagerevents.diff.txt uploaded by mvanbaak (license 7)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 18:01:47 +00:00
Jeff Peeler 93b6a46fde Fix PRI/BRI channels when in alarm condition to only be marked for hangup if
T309 is not enabled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 17:17:06 +00:00
Richard Mudgett bc0a3453cd Restoring some code to sig_pri. Not sure if it is really needed.
Putting some DSP code back into sig_pri that was removed by the
chan_dahdi/sig_pri reorganization.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 15:53:23 +00:00
Joshua Colp 6391976270 Fix retrieval of the port used for the video stream when adding SDP to a SIP message.
(closes issue #15121)
Reported by: jsmith


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 14:07:44 +00:00
Richard Mudgett 4f80468245 Fixed some unsafe down cast pointer operations for sig_pri.
You cannot cast the struct dahdi_pvt.sig_pvt pointer to a specific
signaling private pointer without first checking that it is in fact
pointing to the correct signaling private structure.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-07 23:30:32 +00:00
Richard Mudgett ed5940b306 Fix static on line when PRI does overlap dialing.
The wrong encoding law was used because = was used when it should
have been ==.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-07 23:17:41 +00:00
Richard Mudgett d669ba24d7 Miscellaneous minor fixes to sig_analog.
*  Sanity adjustments to __analog_ss_thread for sig_analog environment.
*  Deleted some duplicated code.
*  Fixed analog_ss_thread_start passing the wrong pointer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06 20:15:11 +00:00
Richard Mudgett d7fa19a999 Sanity adjustments to pri_ss_thread for sig_pri environment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06 19:52:11 +00:00
Joshua Colp 3bf326b898 Accept additional T.38 reinvites after an initial one has been handled.
Discussion of this subject has yielded that it is not actually acceptable to change
T.38 parameters after the initial reinvite but declining is harsh and can cause the
fax to fail when it may be possible to allow it to continue. This patch changes things
so that additional T.38 reinvites are accepted but parameter changes ignored. This gives
the fax a fighting chance.

(closes issue #15610)
Reported by: huangtx2009


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06 17:47:04 +00:00
Richard Mudgett 0eab85b39e Fix potential deadlock issue with USERUSERINFO channel variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-05 23:44:39 +00:00
Richard Mudgett 53ea9a0576 More changes from chan_dahdi that did not make it into sig_pri.
*  Q.SIG channel mapping option.
*  discardremoteholdretrieval option.
*  libPRI debug defines.
*  pri_set_overlapdial() now set correctly.
*  pthread creation of pri_ss_thread now matches.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-05 22:46:37 +00:00
Richard Mudgett 59c62be7f5 Merged revisions 210575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r210575 | rmudgett | 2009-08-05 14:18:56 -0500 (Wed, 05 Aug 2009) | 14 lines
  
  Dialplan starts execution before the channel setup is complete.
  
  *  Issue 15655: For the case where dialing is complete for an incoming
  call, dahdi_new() was asked to start the PBX and then the code set more
  channel variables.  If the dialplan hungup before these channel variables
  got set, asterisk would likely crash.
  *  Fixed potential for overlap incoming call to erroneously set channel
  variables as global dialplan variables if the ast_channel structure failed
  to get allocated.
  *  Added missing set of CALLINGSUBADDR in the dialing is complete case.
  
  (closes issue #15655)
  Reported by: alecdavis
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-05 19:40:03 +00:00
Richard Mudgett ff91b378e0 Fix CALLERID() values for sig_pri on incoming calls.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-04 17:46:03 +00:00
Richard Mudgett e5b19910ed Removed some dead code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-04 16:36:03 +00:00
Kevin P. Fleming e9d22f802e Rename 'canreinvite' option to 'directmedia', with backwards compatibility.
It is clear from multiple mailing list, forum, wiki and other sorts of posts
that users don't really understand the effects that the 'canreinvite' config
option actually has, and that in some cases they think that setting it to 'no'
will actually cause various other features (T.38, MOH, etc.) to not work properly,
when in fact this is not the case. This patch changes the proper name of the
option to what it should have been from the beginning ('directmedia'), but
preserves backwards compatibility for existing configurations.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03 20:48:48 +00:00
Richard Mudgett 070de85e56 Changes from chan_dahdi that did not make it into sig_pri.
*  Moved SUPPORT_USERUSER to sig_pri.c
*  Fix PRI_DEADLOCK_AVOIDANCE parameter.
*  Whitespace changes.
*  Added missing unlock in pri_dchannel():PRI_EVENT_RING case.
*  Balanced curly braces.
*  ast_debug/ast_log changes from chan_dahdi.
*  sig_pri_indicate() should default to return -1 if the indication is not
handled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03 18:05:46 +00:00
Richard Mudgett 95d037edad Trim trailing whitespace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03 16:24:13 +00:00
Kevin P. Fleming ed2a3cedd1 Merged revisions 209759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r209759 | kpfleming | 2009-07-31 19:52:00 -0500 (Fri, 31 Jul 2009) | 7 lines
  
  Minor changes inspired by testing with latest GCC.
  
  The latest GCC (what will become 4.5.x) has a few new warnings, that in these
  cases found some either downright buggy code, or at least seriously poorly
  designed code that could be improved.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-01 01:03:07 +00:00