标签: asterisk

出现错误“使用 -fPIC 重新编译”

之后./configure星号在CentOS的I型make命令,但得到以下错误

/usr/bin/ld: /usr/local/lib/liblua.a(lapi.o): relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/liblua.a: could not read symbols: Bad value
Run Code Online (Sandbox Code Playgroud)

我试过这个,./configure CFLAGS=-fPIC但得到与上面相同的错误。

linux asterisk

4
推荐指数
1
解决办法
1万
查看次数

Powershell - 路径中的 Get-ChildItem 星号通配符 - 使用参数 -File 时出现奇怪的行为

当我使用 Get-ChildItem cmdlet 时,我发现了一种奇怪的行为

文件夹结构:

d:\test\fooA\foo\1-9.txt files
d:\test\fooB\foo\1-9.txt files
d:\test\fooC\foo\1-9.txt files
d:\test\fooD\foo\1-9.txt directories
Run Code Online (Sandbox Code Playgroud)

当我使用以下语法时,我将从所有递归文件夹中获取所有 1-9.txt 文件和目录。它按预期工作。

Get-ChildItem -Filter *.txt -Path D:\test\*\foo -Recurse
Run Code Online (Sandbox Code Playgroud)

当我添加参数 -Directories 时,我仅从示例中的最后一个文件夹中获取目录。它也按预期工作。

Get-ChildItem -Directory -Filter *.txt -Path D:\test\*\foo -Recurse
Run Code Online (Sandbox Code Playgroud)

当我添加参数 -File 而不是 -Directories 时,我什么也得不到。我预计我只会得到文件。

Get-ChildItem -File -Filter *.txt -Path D:\test\*\foo -Recurse
Run Code Online (Sandbox Code Playgroud)

当我使用参数 -File 和 -Directory 时,我也什么也得不到。

Get-ChildItem -Directory -File -Filter *.txt -Path D:\test\*\foo -Recurse
Run Code Online (Sandbox Code Playgroud)

我在不同的 Windows 系统上测试了 PowerShell 版本 5.1 和 7。从我的角度来看,它看起来更像是错误,而不是代码中的问题,或者我对这个 cmdlet 用法的理解,有人可以仔细检查和评论吗?我可以通过额外的编码来解决我的问题,但我不明白为什么它适用于文件夹而不适用于文件。

非常感谢您的任何评论。

windows powershell path asterisk

3
推荐指数
1
解决办法
1002
查看次数

星号 CLI SSH 控制台中突然出现 unicode 字符

我有一个神秘的问题。我连接到运行星号的 Arch Linux 虚拟机。突然间,每当我进入星号 CLI 时,SSH 控制台都会吐出 unicode 字符代码。我在下面显示的是移动箭头的结果。如何恢复正常显示?

aag ~ $ sudo asterisk -r
Connected to Asterisk 13.9.1 currently running on asterisk (pid = 1399)
asterisk*CLI> \U+4B01B\U+4B05B\U+4B041
Run Code Online (Sandbox Code Playgroud)

ssh unicode command-line asterisk

2
推荐指数
1
解决办法
1878
查看次数

cp -R foo/ 和 cp -R foo/* 有什么区别

我注意到,每当我使用命令时,cp -R foo/*我都会复制除文件之外的所有内容,例如.env或可能.gitignore

解决方案是使用cp -R foo/它处理整个目录,但这并没有改变我仍然不理解使用*字符的行为的事实。

为什么一个*角色不会捕获像.env?

操作系统是 Debian

linux unix bash command-line asterisk

2
推荐指数
1
解决办法
1050
查看次数

星号:如果对等方无法访问则转发

我想通过检查是否可以访问特定对等方来响应来电,并相应地拨打适当的号码。

目前我这样做了:

exten => 1200,1,Answer()
same => n,Set(reachable=${SHELL(asterisk -rx "sip show peers" | grep ^cedrich-phone.*OK)})
same => n,GotoIf($["${LEN(${reachable})}" = "0"]?extoffline)
same => n,Dial(SIP/cedrich-phone,20)
same => n(extoffline),Dial(SIP/another-phone,20,tr)
same => n,Hangup()
Run Code Online (Sandbox Code Playgroud)

你能告诉我这是否可以接受,是否可以通过使用最佳实践来改进?

asterisk

1
推荐指数
1
解决办法
8436
查看次数

标签 统计

asterisk ×5

command-line ×2

linux ×2

bash ×1

path ×1

powershell ×1

ssh ×1

unicode ×1

unix ×1

windows ×1