On Mon, Jan 09, 2006 at 11:10:59PM -0800, Somesh S Shanbhag wrote: > Hi Asterisk-users, > > I am working with Aterisk Manager API's. > I can login successfuly with the following. > > char buff[256]; > strcpy(buff, "Action: Login\r\nUsername: admin\r\nSecret: unix\r\n\r\n"); > send(msock, buff, 255);
You can save yourself a bounch of troubles by using: telnet localhost 5038 and type that. You'll be able to see whatever is returned. Or, alternatively, create a text file, and: cat text_file | nc localhost 5038 Or pipe in the output of a simple shell script Or maybe even: cat text_file > /dev/tcp/localhost/5038 (this fake device is "generated" by bash. Debian turns this feature off in the package bash) And as a rule of thumb: no need to do in C whatever you could easily do in the shell. You can also file unix2dos handy . -- Tzafrir Cohen | [EMAIL PROTECTED] | VIM is http://tzafrir.org.il | | a Mutt's [EMAIL PROTECTED] | | best ICQ# 16849755 | | friend _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
