1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

Merge branch 'develop' of github.com:chatopera/cosin into develop

This commit is contained in:
Kyle 2018-09-17 19:29:36 +08:00
commit 40e7bf0f0f
No known key found for this signature in database
GPG Key ID: E9D96D736A2D3F3C
2 changed files with 6 additions and 4 deletions

View File

@ -12,8 +12,8 @@ const MINIO_END_POINT = 'localhost';
const MINIO_ACCESS_KEY = 'key';
const MINIO_SECRET_KEY = 'secret';
const REDIS_HOST = '192.168.2.217';
const REDIS_PORT = 9763;
const REDIS_HOST = 'localhost';
const REDIS_PORT = 6379;
const config = {
PBX_CHANNEL_ID,

View File

@ -93,7 +93,7 @@ const callOut = phone =>
new Promise((resolve, reject) => {
debug('拨打电话: %s', phone);
conn.bgapi(`originate sofia/gateway/goipx/${phone} &park`, ({ body }) => {
conn.bgapi(`originate sofia/gateway/goipx/0${phone} &park`, ({ body }) => {
let match = body.match(/([a-f\d]{8}(-[a-f\d]{4}){3}-[a-f\d]{12}?)/i);
if (match) {
resolve(match[1]);
@ -255,7 +255,9 @@ class FreeSwitch extends EventEmitter {
variable_sip_to_user: sip_to_user,
variable_call_uuid,
} = event;
let match = variable_bridge_channel.match(/sofia\/internal\/(\d+)@/);
let match =
variable_bridge_channel &&
variable_bridge_channel.match(/sofia\/internal\/(\d+)@/);
if (match) {
let sip_from_user = match[1];
let call = new CallOut(