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 =&gt; s,n,Macro(sendim,&quot;Incoming call from ${CALLERID(all)}&quot;)</div><div>
<br></div><div>The macro looks like this:</div><div><br></div><div><div>[macro-sendimuser2]</div><div>exten =&gt; s,n,JabberSend(asterisk,<a href="mailto:user2@gmail.com">user2@gmail.com</a>,${ARG1})</div><div>exten =&gt; s,n,JabberSend(asterisk,user2@internal.jabber.server.tld,${ARG1})</div>
<div><br></div><div>[macro-sendim]</div><div>exten =&gt; s,1,Noop(&quot;Holder&quot;);</div><div>same  =&gt; n,Macro(sendimuser1,${ARG1})</div><div>same  =&gt; n,Macro(sendimuser2,${ARG1})</div></div><div><br></div><div>The issue I&#39;m having, is if the callerID contains a command, such as: Lastname, Firstname, ${CALLERID(all)} turns into &quot;Lastname, Firstname&quot; &lt;number&gt;.</div>
<div><br></div><div>This seems to mess up the quoting, as the macro argument expands to be</div><div>&quot;Incoming call from &quot;Lastname, Firstname&quot; &lt;number&gt;, and the ${ARG1} as the macro sees it is set to &quot;Incoming call from &quot;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&#39;s the best way to do this right?</div><div><br></div><div><br></div><div>Thanks!!!</div>