Commas Is Variables Problem
Hi,
I’m running into a strange problem with commas is variables. I have the following contexts:
[messages]
exten => _+.,1,Noop(External SMS)
same => n,Set(ACTUALTO=${CUT(CUT(MESSAGE(to),@,1),:,2)})
same => n,Macro(goip_sendsms,${ACTUALTO},”${MESSAGE(body)}”)
same => n,Hangup()
[macro-goip_sendsms] ;Call Macro(goip_sendsms,number,message)
exten => s,1,Noop(SMS via GOIP)
same => n,Set(MESSAGE(body)=”${URIDECODE(${ARG1}%0A${ARG2})}”)
same => n,MessageSend(sip:goip)
When I send
Test,test through this, the receiver gets an SMS saying
“Test”
The console shows
— Executing [+3584172xxxxx@messages:1]
NoOp(“Message/ast_msg_queue”, “External SMS”) in new stack
— Executing [+3584172xxxxx@messages:2] Set(“Message/ast_msg_queue”,
“ACTUALTO=+3584172xxxxx”) in new stack
— Executing [+3584172xxxxx@messages:3]
Macro(“Message/ast_msg_queue”, “goip_sendsms,+3584172xxxxx,”Test,test””)
in new stack
— Executing [s@macro-goip_sendsms:1] NoOp(“Message/ast_msg_queue”,
“SMS via GOIP”) in new stack
— Executing [s@macro-goip_sendsms:2] Set(“Message/ast_msg_queue”,
“MESSAGE(body)=”+3584172xxxxx
— “Test””) in new stack
— Executing [s@macro-goip_sendsms:3]
MessageSend(“Message/ast_msg_queue”, “sip:goip”) in new stack
— Executing [+3584172xxxxx@messages:4]
Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (messages, +3584172xxxxx, 4) exited non-zero on
‘Message/ast_msg_queue’
Is there a way to make * ignore the comma in the string here?
-S