[Freeswitch-users] Problem with cnam.js?

Michael Jerris mike at jerris.com
Mon Aug 24 12:44:18 PDT 2009


Every page on the wiki should be editable.  If you don't already have  
an account, go to:

http://wiki.freeswitch.org/index.php?title=Special:UserLogin&type=signup

Mike

On Aug 22, 2009, at 12:42 PM, Lars Zeb wrote:

> I think there’s something wrong with the script at http://wiki.freeswitch.org/wiki/Examples_cnam.js 
> .
>
> If you use it as is, it displays “Content-type: text/html” for the  
> effective_caller_id_name. In cnam.pl, the first two output lines are  
> generated by:
>
> if (!$debug) {print "Content-type: text/html\n\n";}
>
> with the actual name in the third line.
>
> So I changed:
>
> fd.open("read");
> buff = fd.readln();
>
> if(buff) {
>    logger(buff, "info");
>    session.setVariable("effective_caller_id_name", buff);
> }
>
> To:
>
> fd.open("read");
> buff = fd.readAll();
>
> if(buff[2]) {
>    logger(buff, "info");
>    session.setVariable("effective_caller_id_name", buff[2]);
> }
>
> Or remove the print statement from cnam.pl.
>
> Sorry for the code, but the page was not editable.
>
> Lars
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- 
> users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090824/e11f594e/attachment-0002.html 


More information about the FreeSWITCH-users mailing list