bigIncrements('id'); // CDR identifiers $table->string('linkedid', 100)->index(); $table->string('callid', 100); // cdr.uniqueid of the root leg // Timing $table->dateTime('call_time'); $table->date('report_date')->index(); // Agent $table->string('agent_ext', 30)->nullable(); // cdr.cnum (= user ID) $table->string('agent_name', 150)->nullable(); // cdr.cnam // Call details $table->string('called_number', 50)->nullable(); // cdr.dst $table->string('src', 100)->nullable(); // cdr.src (outgoing trunk/channel) $table->integer('duration')->default(0); $table->integer('talktime')->default(0); // cdr.billsec $table->integer('ringtime')->default(0); // duration - billsec // Outcome $table->string('disposition', 20)->nullable(); // ANSWERED/BUSY/NO ANSWER/FAILED $table->string('recordingfile', 255)->nullable(); $table->tinyInteger('done')->default(0)->index(); // reviewed flag (mirrors cdr.userfield) // Optional $table->string('survey', 50)->nullable(); $table->timestamps(); $table->index('call_time'); }); } public function down(): void { Schema::dropIfExists('outbound_reports'); } };