[asterisk-commits] murf: branch murf/RFCs r159852 - /team/murf/RFCs/CDRfix2.rfc.txt

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 29 12:30:37 CST 2008


Author: murf
Date: Sat Nov 29 12:30:37 2008
New Revision: 159852

URL: http://svn.digium.com/view/asterisk?view=rev&rev=159852
Log:
Clean a few things up; give a few more mixed scenario examples; looking coherent; Please, folks, review this and help clean it up, find loopholes and flaw, etc.

Modified:
    team/murf/RFCs/CDRfix2.rfc.txt

Modified: team/murf/RFCs/CDRfix2.rfc.txt
URL: http://svn.digium.com/view/asterisk/team/murf/RFCs/CDRfix2.rfc.txt?view=diff&rev=159852&r1=159851&r2=159852
==============================================================================
--- team/murf/RFCs/CDRfix2.rfc.txt (original)
+++ team/murf/RFCs/CDRfix2.rfc.txt Sat Nov 29 12:30:37 2008
@@ -2,6 +2,9 @@
 large gaps, QUESTIONS brought up, things to INVESTIGATE, etc.
 Feel free to send corrections and fill in the gaps!
 
+The author reserves the right to modify this document until a
+couple of different successful working billing implementations
+are completed and tested!
 
 My previous idea of moving to a bridge-based CDR has proved over the
 last year to be bankrupt. As we go further down that road, the
@@ -23,7 +26,7 @@
 So, I'm going to spec out my changes completely before I change one
 line of code. I want/need to see the end of the journey before I take
 the first step this time.  And when I do change the code, all the
-changes will be optional via a compile option.
+changes will be optional via a compile or config option.
 
 CHANGE: add a 'make menuselect" option (in Compiler Options) to set
         CDR_HANDLING_INLINE option. All current behavior is preserved 
@@ -102,6 +105,37 @@
 append or prepend a system name to the number, so that if multiple 
 machines file CDR's to the same database, you can separate them out.
 
+------------------------------
+INTERNAL vs. EXTERNAL calling:
+------------------------------
+
+Asterisk has no way to decide what's internal vs. external.
+Thus, all scenarios in this document make no distinction between
+the two. This is purely "Business Logic", and must be set up
+by the poor schmoe who has to build a billing package. Whether
+he/she/they determine external lines by channel or device name,
+by billing account codes, whatever, is up to him/her/them.
+
+I would imagine that all the example scenarios could be viewed 
+in in this kind of fashion:
+
+              |   B internal     |   B external
+--------------|------------------|--------------------
+              |                  |
+A internal    |                  |                     
+              |                  |
+--------------|------------------|--------------------
+              |                  |
+A external    |                  |                     
+              |                  |
+------------------------------------------------------
+
+And you have to decide what needs to be done in each of the
+4 cases.
+
+When xfers involve 3 channels, you probably will have to decide
+what happens in 8 cases; each case involving either C internal
+or external... best of luck!
 
 ----------------------------------
 CDR BEHAVIOR in various situations
@@ -167,7 +201,7 @@
 Attended Xfer:
 ===========================================================
 
-Attended Xfers Involve 3 parties, but can involve 3-ways.
+Attended Xfers Involve 3 parties, and can involve 3-ways.
 3 ways are either handled by the phone, or the channel
 driver. For instance on phones with Dahdi interfaces,
 you can do 3-ways using hookflashes. SIP phones provide 
@@ -281,18 +315,18 @@
    A initiates xfer:
 
      CDR1:  A -> B; start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A linkedid: zzz33
-     CDR2:  B       start: e3              end: e4   type: HOLD                Party: A linkedid: zzz33
+     CDR2:  B       start: e3              end: e5   type: HOLD                Party: A linkedid: zzz33
      CDR3:  A -> C; start: e3     ans: e4  end: e5   type: AXFER1 Disp: ANSW   Party: A linkedid: zzz33
-     CDR3:  A -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
-     CDR4:  A -> C; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: B linkedid: zzz33 Hung: A
+     CDR4:  A -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
+     CDR5:  A -> C; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: B linkedid: zzz33 Hung: A
 
    B initiates xfer:
 
      CDR1:  A -> B; start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A linkedid: zzz33
-     CDR2:  A       start: e3              end: e4   type: HOLD                Party: B linkedid: zzz33
+     CDR2:  A       start: e3              end: e5   type: HOLD                Party: B linkedid: zzz33
      CDR3:  B -> C; start: e3     ans: e4  end: e6   type: AXFER1 Disp: ANSW   Party: B linkedid: zzz33
-     CDR3:  B -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: A linkedid: zzz33
-     CDR4:  B -> C; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: A linkedid: zzz33 Hung: B
+     CDR4:  B -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: A linkedid: zzz33
+     CDR5:  B -> C; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: A linkedid: zzz33 Hung: B
 
 <?> The question mark on answer times indicates that we could just leave the answer time NULL.
 
@@ -303,15 +337,15 @@
    A initiates xfer:
 
      CDR1:  A -> B; start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A linkedid: zzz33
-     CDR2:  B       start: e3              end: e4   type: HOLD                Party: A linkedid: zzz33
+     CDR2:  B       start: e3              end: e5   type: HOLD                Party: A linkedid: zzz33
      CDR3:  A -> C; start: e3     ans: e4  end: e5   type: AXFER1 Disp: ANSW   Party: A linkedid: zzz33
-     CDR3:  A -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
-     CDR4:  A -> B; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: B linkedid: zzz33 Hung: C
+     CDR4:  A -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
+     CDR5:  A -> B; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: B linkedid: zzz33 Hung: C
 
    B initiates xfer:
 
      CDR1:  A -> B; start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A linkedid: zzz33
-     CDR2:  A       start: e3              end: e4   type: HOLD                Party: B linkedid: zzz33
+     CDR2:  A       start: e3              end: e5   type: HOLD                Party: B linkedid: zzz33
      CDR3:  B -> C; start: e3     ans: e4  end: e6   type: AXFER1 Disp: ANSW   Party: B linkedid: zzz33
      CDR3:  B -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: A linkedid: zzz33
      CDR4:  B -> A; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: A linkedid: zzz33 Hung: C
@@ -327,18 +361,18 @@
    A initiates xfer:
 
      CDR1:  A -> B; start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A linkedid: zzz33
-     CDR2:  B       start: e3              end: e4   type: HOLD                Party: A linkedid: zzz33
+     CDR2:  B       start: e3              end: e5   type: HOLD                Party: A linkedid: zzz33
      CDR3:  A -> C; start: e3     ans: e4  end: e5   type: AXFER1 Disp: ANSW   Party: A linkedid: zzz33
-     CDR3:  A -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
-     CDR4:  A -> C; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: A linkedid: zzz33 Hung: B
+     CDR4:  A -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
+     CDR5:  A -> C; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: A linkedid: zzz33 Hung: B
 
    B initiates xfer:
 
      CDR1:  A -> B; start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A linkedid: zzz33
-     CDR2:  A       start: e3              end: e4   type: HOLD                Party: B linkedid: zzz33
+     CDR2:  A       start: e3              end: e5   type: HOLD                Party: B linkedid: zzz33
      CDR3:  B -> C; start: e3     ans: e4  end: e6   type: AXFER1 Disp: ANSW   Party: B linkedid: zzz33
-     CDR3:  B -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: A linkedid: zzz33
-     CDR4:  A -> C; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: A linkedid: zzz33 Hung: A
+     CDR4:  B -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: A linkedid: zzz33
+     CDR5:  A -> C; start: e6     ans: e6? end: e7   type: AXFER2 Disp: ANSW   Party: A linkedid: zzz33 Hung: A
 
 <?> The question mark on answer times indicates that we could just leave the answer time NULL.
 
@@ -450,8 +484,108 @@
 
 This stuff isn't going to do us any good unless
 it can smoothly represent complicated, mixed 
-scenarios properly. So, let's invent a few, and
+scenarios properly. So, let's invent a few, andA internal    |                  |                     
+
 see if it holds up nicely.
+
+(1) Dahdi Burlington Pile-On:
+
+(I call it this, because you need Dahdi hardware and
+channel driver, and the kids in Burlington, WY are
+fabled to build large conferences this way)
+
+A Calls B; A Hookflashes, dials C, C answers,
+A hookflashes again to make a 3-way. 
+Then B hookflashes, dials D, D answers, B hookflashes
+again to make another 3-way.
+
+Order of hangup: A, B, C, D
+
+event list:
+ e1: A picks up phone
+ e2: B ans
+ e3: A hookflashes (then dials C) (B gets moh)
+ e4: C ans, A & C converse
+ e5: A hookflashes (3-way begins)
+ e6: B hookflashes (then dials D) (A&C get moh)
+ e7: D ans, B & D converse
+ e8: B hookflashes (3-way begins [well, 2 3-ways make a 4-way!])
+ 
+ e90: A hangs up. (B & C & D left to converse)
+ e91: B hangs up. (C & D left to converse)
+ e92: C hangs up. (D gets congestion, is also hung up)
+
+
+     CDR1:  A -> B; start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A linkedid: zzz33
+     CDR2:  B       start: e3              end: e5   type: HOLD                Party: A linkedid: zzz33
+     CDR3:  A -> C; start: e3     ans: e4  end: e5   type: AXFER1 Disp: ANSW   Party: A linkedid: zzz33
+     CDR4:  A -> C; start: e5     ans: e5? end: e6   type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
+     CDR5:  A       start: e6              end: e8   type: HOLD                Party: B linkedid: zzz33
+     CDR6:  B -> D; start: e6     ans: e7  end: e8   type: AXFER1 Disp: ANSW   Party: B linkedid: zzz33
+     CDR7:  B -> D; start: e8     ans: e8? end: e90  type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
+     CDR8:  A -> B; start: e90    ans: e90?end: e92  type: AXFER2 Disp: ANSW   Party: C linkedid: zzz33 Hung: A
+     CDR9:  B -> D; start: e91    ans: e91?end: e92  type: AXFER2 Disp: ANSW   Party: A linkedid: zzz33 Hung: B
+
+
+(2) Mixed xfer/Park
+
+A calls B; B blind transfers A to C; C parks A;
+B picks up A; B attended transfers A to C;
+C blind xfers A to D; D parks A; C picks up A;
+A hangs up.
+
+event list:
+ e1:  A picks up phone (gets dialtone) dials B
+ e2:  B ans
+ e3:  B hits '#' (blind xfer feature) (A gets MOH), B dials C; get congestion; hangs up
+ e4:  C ans, A & C converse
+ e5:  C hits '*3', or whatever it takes to park A; (A gets MOH), C gets announcement (701), cong., C is hung up.
+ e6:  B picks up phone; dials 701 to pick up A.
+ e7:  B completes picking up A from parking; B & A converse.
+ e8:  B hits '*2', or whatever to attended xfer A; (A gets MOH), B gets dialtone and dials C
+ e9:  C answers; B & C converse
+ e10: B hangs up; A is connected to C; they converse
+ e11: C hits '#' (blind xfer feature) (A gets MOH), C dials D
+ e12: D answers; A and D are connected; 
+ e13: D hits '*3', or whatever it takes to park A; (A gets MOH), D gets announcement (701)
+ e14: C pick up phone (gets dialtone) dials 701 to retrieve A from parking
+ e15: C completes picking up A from parking; they are connected
+ e16: A hangs up.
+
+     CDR1:  A -> B  start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A  linkedid: yhj47
+     CDR2:  A       start: e3              end: e4   type: HOLD                Party: B  linkedid: yhj47
+     CDR3:  B -> C  start: e3     ans: e4  end: e5   type: BXFER               Party: A  linkedid: yhj47
+	 CDR4:  A       start: e5     ans:     end: e7   type: PARK                Party: C  linkedid: yhj47 ParkingStall: 701 at default
+	 CDR5:  B -> A  start: e6     ans: e7  end: e8   type: CALL                Party: B  linkedid: yhj47
+     CDR6:  A       start: e8              end: e10  type: HOLD                Party: B  linkedid: yhj47
+     CDR7:  B -> C  start: e8     ans: e9  end: e10  type: AXFER1 Disp: ANSW   Party: B  linkedid: yhj47
+     CDR8:  B -> C  start: e10    ans:     end: e11  type: AXFER2 Disp: ANSW   Party: A  linkedid: yhj47 Hung: B
+     CDR9:  A       start: e11             end: e12  type: HOLD                Party: C  linkedid: yhj47
+     CDR10: C -> D  start: e11    ans: e12 end: e13  type: BXFER               Party: A  linkedid: yhj47
+	 CDR11: A       start: e13    ans:     end: e15  type: PARK                Party: D  linkedid: yhj47 ParkingStall: 701 at default
+	 CDR12: C -> A  start: e14    ans: e15 end: e16  type: CALL                Party: C  linkedid: yhj47
+
+
+(3) The original dialer drops out, but the conversation continues...
+
+A calls B; B att. transfers A to C, forming a 3 way. A hangs up,
+but B and C continue talking.
+
+event list:
+ e1:  A picks up phone (gets dialtone) dials B
+ e2:  B ans
+ e3:  B hookflashes to attended xfer A; (A gets MOH), B gets dialtone and dials C
+ e4:  C answers; B & C converse
+ e5:  B hookflashes 2nd time; A is connected to B and C to form a 3-way
+ e6:  A hangs up. B&C converse
+ e7:  B or C hang up.
+
+     CDR1:  A -> B  start: e1     ans: e2  end: e3   type: CALL   Disp: ANSW   Party: A  linkedid: yhj47
+     CDR2:  A       start: e3              end: e5   type: HOLD                Party: A linkedid: zzz33
+     CDR3:  A -> C; start: e3     ans: e4  end: e5   type: AXFER1 Disp: ANSW   Party: A linkedid: zzz33
+     CDR4:  A -> C; start: e5     ans:     end: e6   type: 3WAY   Disp: ANSW   Party: B linkedid: zzz33
+     CDR5:  A -> C; start: e6     ans:     end: e7   type: AXFER2 Disp: ANSW   Party: B linkedid: zzz33 Hung: A
+
 
 
 
@@ -494,6 +628,7 @@
 
 HOLD      A state where the src is being played nothing but music on hold;
           this occurs during assisted xfers, and possibly in other scenarios.
+		  Party contains who put this channel on hold.
 
 3WAY      src, dest, and Party are all conferenced together via Asterisk. This
           most commonly occurred in dahdi channels, that can handle it. SIP phones
@@ -518,7 +653,7 @@
           channel doing the whispering. Dest is the channel being whispered to.
 
 
-QUESTION: What other kinds of inter-channel interactions are possible? RESEARCH: go
+QUESTION: What other kinds of inter-channel interactions are possible? INVESTIGATE: go
           thru apps & funcs and find possible interactions.
 
 




More information about the asterisk-commits mailing list