[Asterisk-Users] Setting Callerid in callout file problem
Kyle Hagan
info at quadrasoftware.com
Thu Jul 14 12:22:28 MST 2005
Here is the perl that writes the callout file. And it works ok, mostly.
But the callerid is NOT being set on the call out.
If I set it to dial through the dial plan: Channel: Local/111111111 at rca
i can set it there. But I would think
it should be set already in the callout file shown.
What is happening is what ever the callerid was the last time the line
was used is going out. So If I call in and my caller id is 123-123-1234
after I hangup and a call goes out on the same channel using the callout
file the callerid is set at 123-123-1234.
qx(echo "Context: rca" > /tmp/$filename;);
qx(echo "Callerid: 1111111111" >> /tmp/$filename;);
qx(echo "WaitTime: 14">> /tmp/$filename;);
qx(echo "Maxretries: 1" >> /tmp/$filename;);
qx(echo "Extension: 1111" >> /tmp/$filename;);
qx(echo "Channel: Zap/r2/$phone">> /tmp/$filename;);
qx(echo "SetVar: cdata=$cdata" >> /tmp/$filename;);
qx(cp -f /tmp/$filename /tmp/lastcall);
qx(mv -f /tmp/$filename /var/spool/asterisk/outgoing/);
Kyle
More information about the asterisk-users
mailing list