Hwo to send package to AMI in 1 line

Hi, I want to send this command package to ami.

action: login
username: manager
secret: secret
action: Originate
channel: SIP/401
context: default
priority: 1
exten: 403

The application i am using (Gira homeserver 3) can only send one line per connection, so I have to put all on one line. If I do it with a secuence of lines, it works fine, but i get this on the Asterisk consiole:

[May 9 10:44:37] ERROR[26509]: utils.c:966 ast_carefulwrite: write() returned error: Connection reset by peer
[May 9 10:44:37] ERROR[26509]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
[May 9 10:44:39] ERROR[26509]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
[May 9 10:44:39] ERROR[26509]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
[May 9 10:44:39] ERROR[26509]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
== Manager ‘manager’ logged off from 192.168.1.20
– Executing [403@prive:1] Dial(“SIP/401-09c28018”, “SIP/403||tT”) in new stack
– Called 403

This is probably because HomeServer disconnects after every command.

Anybody have any idea’s

I could simply ignore the console output, and use it like this, probably it’s ok then, but it doesn’t look nice

With kind regards,

Mike.

You could try it with “\r\n” after each line - this should work.

action: login \r\n username: manager \r\n secret: secret \r\n …

dont forget the double “\r\n” at the end!