dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

91 Commits

Author SHA1 Message Date
rmudgett 2c6fbf9fc7 Post AMI hold events on PRI spans when the remote party HOLD/RETRIEVEs the call.
Part of JIRA SWP-2687/ABE-2691.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@298288 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-13 22:10:40 +00:00
rmudgett 9e7e5f5c37 Merged revisions 298195 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r298195 | rmudgett | 2010-12-13 11:11:43 -0600 (Mon, 13 Dec 2010) | 33 lines
  
  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: http://svn.digium.com/svn/asterisk/trunk@298201 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-13 17:18:17 +00:00
rmudgett c679006de9 Merged revisions 294823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r294823 | rmudgett | 2010-11-11 20:45:22 -0600 (Thu, 11 Nov 2010) | 25 lines
  
  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: http://svn.digium.com/svn/asterisk/trunk@294824 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-12 02:46:03 +00:00
rmudgett 89f74fccfe Merged revisions 294349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r294349 | rmudgett | 2010-11-09 10:55:32 -0600 (Tue, 09 Nov 2010) | 17 lines
  
  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: http://svn.digium.com/svn/asterisk/trunk@294351 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-09 17:00:07 +00:00
rmudgett 338b36b3a0 Merged revisions 293081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r293081 | rmudgett | 2010-10-26 11:32:59 -0500 (Tue, 26 Oct 2010) | 1 line
  
  No need to define the struct if there are no users.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@293082 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-26 16:33:50 +00:00
rmudgett 37331137c1 Merged revisions 293046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r293046 | rmudgett | 2010-10-26 10:53:58 -0500 (Tue, 26 Oct 2010) | 4 lines
  
  Allow the DAHDI driver to compile, even with a sufficiently older version of libpri.
  
  Fixes our Bamboo builds.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@293047 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-26 16:01:08 +00:00
tilghman 3f67db6d1e Merged revisions 292969 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292969 | tilghman | 2010-10-25 16:15:19 -0500 (Mon, 25 Oct 2010) | 2 lines
  
  Several more defines that need to be altered for compiling against an older version of libpri
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@292970 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-25 21:16:25 +00:00
tilghman 43620dcac8 Merged revisions 292906 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292906 | tilghman | 2010-10-25 14:28:35 -0500 (Mon, 25 Oct 2010) | 4 lines
  
  Allow the DAHDI driver to compile, even with a sufficiently older version of libpri.
  
  Fixes our Bamboo builds.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@292915 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-25 19:30:39 +00:00
rmudgett 47b625b9d0 Merged revisions 292704 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292704 | rmudgett | 2010-10-22 10:47:08 -0500 (Fri, 22 Oct 2010) | 19 lines
  
  Connected line is not updated when chan_dahdi/sig_pri or chan_misdn transfers a call.
  
  When a call is transfered by ECT or implicitly by disconnect in sig_pri or
  implicitly by disconnect in chan_misdn, the connected line information is
  not exchanged.  The connected line interception macros also need to be
  executed if defined.
  
  The CALLER interception macro is executed for the held call.
  The CALLEE interception macro is executed for the active/ringing call.
  
  JIRA ABE-2589
  JIRA SWP-2296
  
  Patches:
        abe_2589_c3bier.patch uploaded by rmudgett (license 664)
        abe_2589_v1.8_v2.patch uploaded by rmudgett (license 664)
  
  Review: https://reviewboard.asterisk.org/r/958/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@292705 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-22 15:47:56 +00:00
rmudgett 56becec03c Merged revisions 292489 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292489 | rmudgett | 2010-10-20 20:02:50 -0500 (Wed, 20 Oct 2010) | 7 lines
  
  Send CONNECT_ACKNOWLEDGE for CIS calls too.
  
  The originator of the Q.SIG call completion signaling link was not changed
  to the active state when the CONNECT message came in.  The T309 processing
  would immediately kill the signaling link because it was not in the active
  state.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@292490 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-21 01:03:42 +00:00
rmudgett e2cfdefadb Merged revisions 289057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r289057 | rmudgett | 2010-09-27 20:04:37 -0500 (Mon, 27 Sep 2010) | 5 lines
  
  Avoid deadlock processing incoming AOC-E messages.
  
  Deadlock avoidance for the owner channel was not done when processing
  incoming AOC-E messages.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@289058 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-28 01:10:25 +00:00
rmudgett 48092cd0e1 Merged revisions 286118 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r286118 | rmudgett | 2010-09-10 15:55:37 -0500 (Fri, 10 Sep 2010) | 25 lines
  
  Merged revisions 286116 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r286116 | rmudgett | 2010-09-10 15:42:44 -0500 (Fri, 10 Sep 2010) | 18 lines
    
    Merged revisions 286113 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r286113 | rmudgett | 2010-09-10 15:33:16 -0500 (Fri, 10 Sep 2010) | 11 lines
      
      An outgoing call may not get hung up if a pre-connect incoming ISDN call is disconnected.
      
      If the ISDN link a pre-connect incoming call is using fails or is reset,
      the outgoing leg may not hang up or be delayed in hanging up.  (Causes:
      PRI_CAUSE_NETWORK_OUT_OF_ORDER, PRI_CAUSE_DESTINATION_OUT_OF_ORDER, and
      PRI_CAUSE_NORMAL_TEMPORARY_FAILURE.)
      
      Just hang up the call if the incoming call leg hangs up before connecting
      for any reason.  It makes no sense to send a BUSY or CONGESTION control
      frame to the outgoing call leg under these circumstances.
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@286119 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-10 21:03:08 +00:00
rmudgett 4ad4edd7b2 Merged revisions 284779-284780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r284779 | rmudgett | 2010-09-02 15:59:12 -0500 (Thu, 02 Sep 2010) | 8 lines
  
  Made output libpri event names if pri debugging is enabled when sig_pri processes them.
  
  * Simplified CLI "pri debug xx span xx" command code and removed redundant
  debugging enabled messages.
  
  * Made CLI "pri debug xx span xx" command only close the debugging log
  file if it was opened.
........
  r284780 | rmudgett | 2010-09-02 16:02:54 -0500 (Thu, 02 Sep 2010) | 2 lines
  
  Simplified pri_dchannel() poll timeout duration code.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@284782 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-02 21:08:41 +00:00
rmudgett 70d83a3585 Merged revisions 283050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r283050 | rmudgett | 2010-08-20 10:35:38 -0500 (Fri, 20 Aug 2010) | 36 lines
  
  Merged revisions 283049 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r283049 | rmudgett | 2010-08-20 10:31:03 -0500 (Fri, 20 Aug 2010) | 29 lines
    
    Merged revisions 283048 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r283048 | rmudgett | 2010-08-20 10:24:36 -0500 (Fri, 20 Aug 2010) | 22 lines
      
      Q931 - Sending PROGRESS after sending ALERTING is a protocol error
      
      The PRI layer in chan_dadhi will check if a PROGRESS message has already
      been sent, and not allow sending another (although that is technically
      allowed by the Q931 spec), however it does not protect against sending an
      ALERTING and then sending a PROGRESS message, which is a violation of the
      specification.
      
      Most switches don't seem to care too deeply about this, but some do, and
      will disconnect the call when receiving this invalid sequence.
      
      Protocol specification reference: T-REC-Q.931-199805-I page 223, "Figure
      A.5/Q.931 -- Overview protocol control (network side) point-point
      (sheet 3 of 8)"
      
      (closes issue #17874)
      Reported by: nic_bellamy
      Patches:
            asterisk-1.4-r282537_no-progress-after-alerting.patch uploaded by nic bellamy (license 299)
            asterisk-1.6.2-r282537_no-progress-after-alerting.patch uploaded by nic bellamy (license 299)
            asterisk-trunk-r282537_no-progress-after-alerting.patch uploaded by nic bellamy (license 299)
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@283051 f38db490-d61c-443f-a65b-d21fe96a405b
2010-08-20 15:39:25 +00:00
tilghman e12c5b73fe Merged revisions 282608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r282608 | tilghman | 2010-08-18 02:49:04 -0500 (Wed, 18 Aug 2010) | 16 lines
  
  Merged revisions 282607 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r282607 | tilghman | 2010-08-18 02:43:14 -0500 (Wed, 18 Aug 2010) | 9 lines
    
    Don't warn on callerid when completely text, instead of numeric with localdialplan prefixes.
    
    (closes issue #16770)
     Reported by: jamicque
     Patches: 
           20100413__issue16770.diff.txt uploaded by tilghman (license 14)
           20100811__issue16770.diff.txt uploaded by tilghman (license 14)
     Tested by: jamicque
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@282609 f38db490-d61c-443f-a65b-d21fe96a405b
2010-08-18 07:50:07 +00:00
seanbright f406265fba Merged revisions 280519 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r280519 | seanbright | 2010-07-29 15:47:16 -0400 (Thu, 29 Jul 2010) | 7 lines
  
  Fix compilation error in chan_dahdi (strdupa -> ast_strdupa).
  
  (closes issue #17751)
  Reported by: b11d
  Patches:
        strdupa_oops.diff uploaded by malcolmd (license 924)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@280520 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-29 19:48:38 +00:00
russell b47c806e2d Merged revisions 279916 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r279916 | russell | 2010-07-27 14:50:56 -0500 (Tue, 27 Jul 2010) | 12 lines
  
  Fix inband DTMF detection on outgoing ISDN calls.
  
  This is a regression from the sig_pri split from chan_dahdi.  When a call is
  first initiated, the inband DTMF detector is not enabled if it's an outgoing
  ISDN call.  However, it needs to be turned on once the media path starts up.
  This handling was put back in the open_media() callback of chan_dahdi.  In
  sig_pri, open_media() calls were added to a few places where it was needed,
  including handling of PRI_EVENT_RINGING, PRI_EVENT_PROGRESS, and
  PRI_EVENT_PROCEEDING.
  
  Thanks to rmudgett for helping me with the patch!
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@279917 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-27 19:55:40 +00:00
rmudgett c74ff9f640 Rename sig_pri_pri to sig_pri_span. More descriptive of concept.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278942 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-23 15:41:44 +00:00
rmudgett 9bc730a1ae Reference correct struct member for unlikely event PRI_EVENT_CONFIG_ERR.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278274 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-20 22:38:13 +00:00
rmudgett d93fa33a75 Expand the caller ANI field to an ast_party_id
Expand the ani field in ast_party_caller and ast_party_connected_line to
an ast_party_id.

This is an extension to the ast_callerid restructuring patch in review:
https://reviewboard.asterisk.org/r/702/

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276393 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 16:58:03 +00:00
rmudgett ad58aa92a2 ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 15:48:36 +00:00
rmudgett 682cc79c92 Merged revisions 272446 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272446 | rmudgett | 2010-06-24 16:58:49 -0500 (Thu, 24 Jun 2010) | 10 lines
  
  ss_thread calls pri_grab without lock during overlap dial
  
  Recent changes to chan_dahdi with relation to overlap dialing call
  pri_grab without first obtaining a lock.
  
  (closes issue #17414)
  Reported by: pdf
  Patches:
        bug17414.patch uploaded by jpeeler (license 325)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@272447 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-24 22:11:26 +00:00
rmudgett 36320e1203 Add digit manipulation tag support to chan_dahdi/sig_pri like chan_misdn.
Add the append_msn_to_cid_tag option to chan_dahdi like chan_misdn.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270219 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-14 15:55:35 +00:00
rmudgett 2384f564ed Extract sig_ss7 out of chan_dahdi.
Extract the SS7 specific code out of chan_dahdi like what was done to
ISDN/PRI and analog signaling.  The new SS7 structures were modeled on
sig_pri.

The changes to sig_pri are an enhancement and a bug fix made possible
because SS7 was extracted.

1) The sig_pri TRANSFERCAPABILITY channel variable should have been set
unconditionally in sig_pri_new_ast_channel().

2) SS7/PRI transfer capability interaction in dahdi_new() fixed because of
SS7 extraction.

3) Module ref count error in dahdi_new() if startpbx failed to start the
PBX for some reason.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@268774 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-07 20:04:42 +00:00
rmudgett ee2e0274f2 Moved AOC request code out of the middle of code parsing the dialed number.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@268734 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-07 19:06:55 +00:00
rmudgett 36f38358f7 Incoming overlap dialing no longer works after sig_pri extraction.
The problem would manifest itself if your dialplan matching could accept
more digits to match than were actually dialed.  The time out waiting for
overlap digits disconnected the call instead of matching any accumulated
digits to the dialplan.

Accidental conversion of a break out of loop as a break out of switch.

(closes issue #17401)
Reported by: avalentin
Patches:
      issue17401_digit_timeout.patch uploaded by rmudgett (license 664)
Tested by: avalentin, rmudgett


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267928 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-04 14:45:03 +00:00
rmudgett 9c2db6ff40 Add ETSI Message Waiting Indication (MWI) support.
Add the ability to report waiting messages to ISDN endpoints (phones).

Relevant specification: EN 300 650 and EN 300 745

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267399 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-03 00:02:14 +00:00
rmudgett e3c619b555 Add ETSI Malicious Call ID support.
Add the ability to report malicious callers as an AMI event in the call
event class.

Relevant specification: EN 300 180

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267350 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02 22:28:58 +00:00
rmudgett c73c9d0c6d Add ETSI Call Waiting support.
Add the ability to announce a call to an endpoint when there are no B
channels available.  A call waiting call is a SETUP message with no B
channel selected.

Relevant specification: EN 300 056, EN 300 057, EN 300 058

For DAHDI/ISDN channels, the CHANNEL() dialplan function now supports the
"no_media_path" option.
* Returns "0" if there is a B channel associated with the call.
* Returns "1" if no B channel is associated with the call.  The call is
either on hold or is a call waiting call.

If you are going to allow incoming call waiting calls then you need to use
CHANNEL(no_media_path) do determine if you must drop a call to accept the
new call.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267261 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02 21:05:32 +00:00
rmudgett 245c5d9eb8 Generic Advice of Charge.
Asterisk Generic AOC Representation
- Generic AOC encode/decode routines.
  (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame)
- AST_CONTROL_AOC frame type to represent generic encoded AOC data
- Manager events for AOC-S, AOC-D, and AOC-E messages

Asterisk App Support
- app_dial AOC-S pass-through support on call setup
- app_queue AOC-S pass-through support on call setup

AOC Unit Tests
- AOC Unit Tests for encode/decode routines
- AOC Unit Test for manager event representation.

SIP AOC Support
- Pass-through of generic AOC-D and AOC-E messages to snom phones via the
  snom AOC specification.
- Creation of chan_sip page3 flags for the addition of the new
  'snom_aoc_enabled' sip.conf option.

IAX AOC Support
- Natively supports AOC pass-through through the use of the new
  AST_CONTROL_AOC frame type

DAHDI AOC Support
- ETSI PRI full AOC Pass-through support
- 'aoc_enable' chan_dahdi.conf option for independently enabling
  pass-through of AOC-S, AOC-D, AOC-E.
- 'aoce_delayhangup' option for retrieving AOC-E on disconnect.
- DAHDI A() dial string option for requesting AOC services.
  example usage:
  ;requests AOC-S, AOC-D, and AOC-E on call setup
  exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e))

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267096 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02 18:10:15 +00:00
rmudgett 66e4294cd7 Add ETSI Advice Of Charge (AOC) event reporting.
This feature generates AMI events in the new aoc event class from the
events passed up by libpri.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267008 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02 17:13:53 +00:00
rmudgett aa138b6e3f Add ETSI Explicit Call Transfer (ECT) support.
Added ability to send and receive ETSI Explicit Call Transfer (ECT)
messages to eliminate tromboned calls.

Note: Asterisk already supported initiating the transfer of calls to
eliminate tromboned calls to libpri so there was nothing to do for the
asterisk portion.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266926 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02 16:14:12 +00:00
rmudgett 1138c05db5 Dialing an invalid extension causes incomplete hangup sequence.
Revision -r1489 of the libpri 1.4 branch corrected a deviation from Q.931
Section 5.3.2.  However, this resulted in an unexpected behaviour change
to the upper layer (Asterisk).

This change uses pri_hangup_fix_enable() to follow Q.931 Section 5.3.2
call hangup better if the version of libpri supports it.

(issue #17104)
Reported by: shawkris
Tested by: rmudgett


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@262569 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-11 23:18:53 +00:00
jpeeler c808b1c546 Fix deadlock in sig_pri when hanging up.
The pri_dchannel thread currently violates locking order by locking the private
and then attempting to queue a frame, which needs to lock the channel. Queueing
a frame is unneccesary though and is actually a regression since sig_pri.
All the places that currently use ast_softhangup_nolock now will just set the
softhangup value directly as before.

(closes issue #17216)
Reported by: lmsteffan
Patches: 
      bug17216.patch uploaded by jpeeler (license 325)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@261866 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-07 15:33:52 +00:00
rmudgett 25c691056b Some code optimizations.
* Made more places use pri_queue_control() instead of pri_queue_frame()
and a local frame variable.

* Made pri_queue_frame() use sig_pri_lock_owner().  pri_queue_frame() no
longer releases the libpri access lock unless it is required.

* Made the pri_queue_frame() and pri_queue_control() parameter list
similar to sig_pri_lock_owner().


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@261822 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-06 23:41:22 +00:00
rmudgett baf4c0a6fe The inalarm flag is not passed up from the sig_analog and sig_pri submodules.
The CLI "dahdi show channel" command was not correctly reporting the
InAlarm status.

The inalarm flag is now consistently passed between chan_dahdi and
submodules.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@261007 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-04 21:10:58 +00:00
rmudgett 57427ca327 Separate the uses of NUM_DCHANS and MAX_CHANNELS into PRI, SS7, and MFCR2 users.
Created
SIG_PRI_MAX_CHANNELS, SIG_PRI_NUM_DCHANS
SIG_SS7_MAX_CHANNELS, SIG_SS7_NUM_DCHANS
SIG_MFCR2_MAX_CHANNELS

Also fixed the declaration of pollers[] in mfcr2_monitor().  It was
dimensioned to the number of bytes in struct dahdi_mfcr2.pvts[] and not to
the same dimension of the struct dahdi_mfcr2.pvts[].


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@260435 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-30 22:24:28 +00:00
mmichelson 0eb1e5407a Merge Call completion support into trunk.
From Reviewboard:
CCSS stands for Call Completion Supplementary Services. An admittedly out-of-date
overview of the architecture can be found in the file doc/CCSS_architecture.pdf
in the CCSS branch. Off the top of my head, the big differences between what is
implemented and what is in the document are as follows:

1. We did not end up modifying the Hangup application at all.
2. The document states that a single call completion monitor may be used across
   multiple calls to the same device. This proved to not be such a good idea
   when implementing protocol-specific monitors, and so we ended up using one
   monitor per-device per-call.
3. There are some configuration options which were conceived after the document
   was written. These are documented in the ccss.conf.sample that is on this
   review request.
		      
For some basic understanding of terminology used throughout this code, see the
ccss.tex document that is on this review.

This implements CCBS and CCNR in several flavors.

First up is a "generic" implementation, which can work over any channel technology
provided that the channel technology can accurately report device state. Call
completion is requested using the dialplan application CallCompletionRequest and can
be canceled using CallCompletionCancel. Device state subscriptions are used in order
to monitor the state of called parties.

Next, there is a SIP-specific implementation of call completion. This method uses the
methods outlined in draft-ietf-bliss-call-completion-06 to implement call completion
using SIP signaling. There are a few things to note here:

* The agent/monitor terminology used throughout Asterisk sometimes is the reverse of
  what is defined in the referenced draft.

* Implementation of the draft required support for SIP PUBLISH. I attempted to write
  this in a generic-enough fashion such that if someone were to want to write PUBLISH
  support for other event packages, such as dialog-state or presence, most of the effort
  would be in writing callbacks specific to the event package.

* A subportion of supporting PUBLISH reception was that we had to implement a PIDF
  parser. The PIDF support added is a bit minimal. I first wrote a validation
  routine to ensure that the PIDF document is formatted properly. The rest of the
  PIDF reading is done in-line in the call-completion-specific PUBLISH-handling
  code. In other words, while there is PIDF support here, it is not in any state
  where it could easily be applied to other event packages as is.

Finally, there are a variety of ISDN-related call completion protocols supported. These
were written by Richard Mudgett, and as such I can't really say much about their
implementation. There are notes in the CHANGES file that indicate the ISDN protocols
over which call completion is supported.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256528 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-09 15:31:32 +00:00
rmudgett f42e29b281 Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.
SWP-1229
ABE-2161

* Ensure chan_local.c:local_call() will not leak cid.cid_dnid when
copying.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256104 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-03 02:12:33 +00:00
rmudgett 090c22992b Simplified dahdi_request() channel selection failed reason/cause code.
Also avoid potential crash because cause could be NULL.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251585 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10 16:55:34 +00:00
rmudgett 8bb352d623 Reduce the amount of database access for HAVE_PRI_SERVICE_MESSAGES.
Rework HAVE_PRI_SERVICE_MESSAGES to not use the active values directly
from the database.  Database access is likely expensive.  Database access
now only happens on initialization, destruction, and when the B channel is
taken in or out of service.

This change is not related to call waiting but it would cause the search
for a call waiting interface to be very expensive and slow down D channel
message servicing.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251538 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10 03:16:50 +00:00
alecdavis 7ee079b5b5 overlap receiving: automatically send CALL PROCEEDING when dialplan starts
Following Q.931 5.2.4
When the user has determined that sufficient call information has been received the 
user shall stop T302 and send CALL PROCEEDING to the network.

Previously timeouts were possible if the dialplan took a long time to issue any
response back to the network.

Verified that our local TELCO also does the same.

(issue #16789)
Reported by: alecdavis
Patches: 
      overlap_receiving_trunk.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249320 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-27 22:49:51 +00:00
alecdavis bbcc57ee3f Update CDR variables as pbx starts
Allows CDR variables added in cdr.c:set_one_cid to become visable during the call,
by executing ast_cdr_update() early in __ast_pbx run.
Reverts sig_pri changes in trunk that are specific to isdn technology only.

(closes issue #16638)
Reported by: alecdavis
Patches: 
      cdr_update.diff3.txt uploaded by alecdavis (license 585)
Tested by: alecdavis



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@241416 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-20 08:18:45 +00:00
alecdavis 4c5831b3e5 Update CDR variables before pbx starts (overlap dial)
Allows CDR variables added in cdr.c:set_one_cid to become visable during the call.

(issue #16638)
Reported by: alecdavis
Patches: 
      cdr_update.diff2.txt uploaded by alecdavis (license 585)
Tested by: alecdavis



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@241187 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-19 00:24:35 +00:00
alecdavis 3b99eea5f4 Update CDR variables before pbx starts
Allows CDR variables added in cdr.c:set_one_cid to become visable during the call.

(closes issue #16638)
Reported by: alecdavis
Patches: 
      cdr_update.diff.txt uploaded by alecdavis (license 585)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@241097 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-18 22:00:24 +00:00
rmudgett 3275e9cd64 Fix using the wrong pointer type in do_idle_thread().
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@238527 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-07 21:24:06 +00:00
rmudgett 8da6746f8b Removed unused parameters from analog_available() and sig_pri_available().
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@237804 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-05 18:57:29 +00:00
kpfleming 09a7be92ae Change all refererences to 1.6.3 to be 1.8, since that will be the next feature release
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@235904 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-21 18:51:17 +00:00
jpeeler 1900a766f7 Fix problem on digital channels due to digital flag not getting set
Changed areas in sig_pri to set the digital flag using a callback that will
also set the corresponding flag in chan_dahdi. Modified dahdi_request slightly
so that if a bearer is marked as digital, that information is available when
creating the new channel.

(closes issue #16151)
Reported by: alecdavis
Patch based on bug_16151.diff.txt uploaded by alecdavis (license 585)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@231058 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-24 17:12:25 +00:00
rmudgett 0f12615286 Created standard location to add options to chan_dahdi for ISDN dialing.
Dial(DAHDI/g1[/extension[/options]])
Current options:
K(<keypad_digits>)
R Reverse charging indication (Collect calls)

The earlier Dial(DAHDI/g1[/K<keypad_digits>][/extension] format was
variable and did not allow for the easy addition of more options.

The earlier 'C' prefix character for reverse charge indiation would
conflict with the a-d DTMF digits if ISDN uses them.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228691 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06 22:32:17 +00:00