修改分机呼叫状态为小写

This commit is contained in:
lilong@dgg.net 2021-04-01 09:34:43 +08:00
parent b7c4ae4a5f
commit c9ed1b967d
2 changed files with 3 additions and 3 deletions

View File

@ -57,11 +57,11 @@ class EslCustom extends Command
switch ($eventname) {
//注册
case 'sofia::register':
Sip::query()->where('username', $username)->update(['status' => 1, 'state' => 'DOWN']);
Sip::query()->where('username', $username)->update(['status' => 1, 'state' => 'down']);
break;
//注销
case 'sofia::unregister':
Sip::query()->where('username', $username)->update(['status' => 0, 'state' => 'DOWN']);
Sip::query()->where('username', $username)->update(['status' => 0, 'state' => 'down']);
break;
default:
break;

View File

@ -17,7 +17,7 @@ class Sip extends Migration
$table->bigIncrements('id');
$table->string('username')->unique()->comment('分机号');
$table->string('password')->comment('分机密码');
$table->string('state')->default('DOWN')->comment('呼叫状态,\'DOWN\' => \'空闲\',\'RINGING\' => \'响铃\',\'ACTIVE\' => \'通话中\',\'HANGUP\' => \'已挂断\',');
$table->string('state')->default('down')->comment('呼叫状态,\'down\' => \'空闲\',\'ringing\' => \'响铃\',\'active\' => \'通话中\'');
$table->tinyInteger('status')->default(0)->comment('注册状态0未注册1已注册');
$table->unsignedBigInteger('gateway_id')->default(0)->nullable()->comment('网关ID');
$table->timestamps();