我在.call文件中播放多個聲音文件(.wav)時遇到問題。 我在變量中傳遞了很多聲音文件(SetVar:Sound = custom/1_Messages0201 & custom/20c & ...) 問題是字符串大小。當尺寸小於240個字符時,所有聲音文件均可正常播放。 240個字符之後的所有文件都被修剪,並出現錯誤星號 - 在.call文件中播放多個聲音文件的最佳做法
pbx_spool.c: Syntax error at line 10 of /var/spool/asterisk/outgoing/333.call
我讀了限制撥號串lenght
注:截至幷包括Asterisk的1.2撥號字符串的長度不能超過約240個字符(任何超出的字符將被截斷)。除非您在編譯選項中設置了LOW_MEMORY,否則Asterisk 1.4中刪除了此限制。
是否有任何方法可以刪除此限制或增加撥號字符串大小。 也許任何人都可以建議我任何其他更好的主意。
Asterisk的版本:
Asterisk 11.2.1 built by root @ ip-XX-XXX-XXX-XXX on a x86_64 running Linux
撥號方案:
exten => 123,1,AGI(monitor.php,outgoing,Outgoing_UNLIMITED,${CALLERID(num)},${EXTEN},Set(CALLERID (num)=XXXXXXXXX))
exten => 123,1,Dial(SIP/6845987568/${EXTEN:0},30,T)
exten => 123,2,Set(CDR(userfield)=${NumberDialed})
exten => 123,3,Playback(${Sound})
呼叫文件:
Channel: SIP/XXXXX/XXXXXX
CallerID: XXXXXXX
MaxRetries: 2
RetryTime: 15
Context: XXXXXX
Extension: 123
Priority: 1
Account: XXXXXX
SetVar: Sound=custom/1_Messages0201&custom/20c&custom/i&custom/1om&custom/March&custom/2c&custom/hiliadi&custom/i&custom/13of&custom/godina&custom/1_Messages0202&custom/3c&custom/3c&custom/3c&custom/3c&custom/3c&custom/3c&custom/3c&custom/3c&custom/1_Messages0203&custom/200c&custom/50c&custom/i&custom/6c&custom/leva&custom/i&custom/70c&custom/i&custom/8c&custom/stotinki&custom/1_Messages0204
SetVar: NumberDialed=XXXXXXXX
我會盡力,謝謝 – 2013-03-23 05:25:49