Quantcast
Channel: General Help - FreePBX Community Forums
Viewing all articles
Browse latest Browse all 12616

Dialplan help

$
0
0

FreePBX 16
Asterisk 18

When I run the command from the command line:
curl -s https://domain.com/lsw/dir/CallerData -H "Authorization: Basic 123456" -H 'Content-Type: application/json' -d '{"CallingNumber":"6666666666","DialedNumber":"7777777777"}' | jq -r '.result.CIC'

It works and I get back the expected result:
1018000

When I plug this into dialplan:
exten => s,n(default),Set(CICPRE=${SHELL(curl -s https://domain.com/lsw/dir/CallerData -H "Authorization: Basic 123456" -H 'Content-Type: application/json' -d '{"CallingNumber":"6666666666","DialedNumber":"7777777777"}' | jq -r '.result.CIC')})

I see the result, but the log looks wrong when I add a verbose, like its is missing the end double quote, the log entry looks white instead of purple:
VERBOSE[151268][C-0005107f] pbx.c: Executing [s@CIC-bridge:8] Set("SIP/lx-cds-sm-p2-000a20c0", "CICPRE=1018000

image

because of this I cannot concatenate the CICPRE variable with any other variable. As soon as I add CICPRE, it cuts off whatever is behind it. I think what’s happening is likely related. Any ideas on how to fix this?

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 12616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>