Find Jobs
Hire Freelancers

Asterisk PBX String manipulation

$30-5000 USD

已关闭
已发布将近 18 年前

$30-5000 USD

货到付款
Below is the dial plan. Basicly it writes a record to MYSQL, which works fine, until I try to insert the ${CALLFILENAME}. My guess is the Asterisk Parser is not handling the back slashes very well. Looking for function/marco that will covert the string to a Asterisk friendly string, so then when I do SQL statements dont have to muck around with using \. So basicly the function would look at a string, if there was a: --> space ----> Make it \ space --> commar ----> Make it \ commar etc The same issue is why I create ssqlA, ssqlB and ssqlC below. With this function you create, we should be able to drop this, and just have one simple line. Thanks James I have this currently in the dial plan: exten => _32XX,1,SetVar(CALLFILENAME=/var/spool/asterisk/monitor/32xx/CallTo-${EXTEN:1}-${TIMESTAMP}) exten => _32XX,n,Monitor(gsm,${CALLFILENAME},m) exten => _32XX,n,Set(ssqlA=INSERT INTO p060_Rev_Tx) exten => _32XX,n,Set(ssqlB=p060_Type\, p060_Status1\, p060_Text02\, p060_Text03\, p060_Text04\, p060_Text05) exten => _32XX,n,Set(ssqlC=SELECT \'CALL\'\, \'PENDINGREV\'\, \'${EXTEN:1}\'\, \'${EXTEN:1}\'\, \'${CALLERID}\'\, \'${CALLFILENAME}\';) exten => _32XX,n,MYSQL(Connect connid [login to view URL] rlm2 rlm2 rlm2) exten => _32XX,n,MYSQL(Query resultid ${connid} ${ssqlA} (${ssqlB}) ${ssqlC}) exten => _32XX,n,MYSQL(Fetch fetchid ${resultid} aa bb cc) exten => _32XX,n,MYSQL(Clear ${resultid}) exten => _32XX,n,MYSQL(Disconnect ${connid}) exten => _32XX,n,Noop(OK) exten => _32XX,n,Dial(ZAP/g4/1111${EXTEN:1}) exten => _32XX,n,Congestion ## Deliverables Will probably be donating this back to the wiki. ## Platform Asterisk ( [[login to view URL]][1]) Linux
项目 ID: 3701593

关于此项目

1条提案
远程项目
活跃18 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
1威客以均价$425 USD来参与此工作竞标
用户头像
See private message.
$425 USD 在2天之内
5.0 (4条评论)
4.4
4.4

关于客户

AUSTRALIA的国旗
Australia
5.0
43
会员自7月 12, 2006起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。