Hello all,<div>I have a setup where Asterisk sends a message to a few jabber users on each incoming call, like:</div><div><br></div><div>exten => s,n,Macro(sendim,"Incoming call from ${CALLERID(all)}")</div><div>
<br></div><div>The macro looks like this:</div><div><br></div><div><div>[macro-sendimuser2]</div><div>exten => s,n,JabberSend(asterisk,<a href="mailto:user2@gmail.com">user2@gmail.com</a>,${ARG1})</div><div>exten => s,n,JabberSend(asterisk,user2@internal.jabber.server.tld,${ARG1})</div>
<div><br></div><div>[macro-sendim]</div><div>exten => s,1,Noop("Holder");</div><div>same => n,Macro(sendimuser1,${ARG1})</div><div>same => n,Macro(sendimuser2,${ARG1})</div></div><div><br></div><div>The issue I'm having, is if the callerID contains a command, such as: Lastname, Firstname, ${CALLERID(all)} turns into "Lastname, Firstname" <number>.</div>
<div><br></div><div>This seems to mess up the quoting, as the macro argument expands to be</div><div>"Incoming call from "Lastname, Firstname" <number>, and the ${ARG1} as the macro sees it is set to "Incoming call from "Lastname</div>
<div><br></div><div>The comma ends up outside the double quotes and then it splits the macro arguments.</div><div><br></div><div>What's the best way to do this right?</div><div><br></div><div><br></div><div>Thanks!!!</div>