# Problems with astmanproxy

**URL:** <https://community.asterisk.org/t/problems-with-astmanproxy/13636>\
**Category:** Asterisk Support\
**Created:** [April 10, 2007, 7:20am UTC](https://community.asterisk.org/t/problems-with-astmanproxy/13636 "2007-04-10T07:20:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![konabi](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@konabi](https://community.asterisk.org/u/konabi)\
**Post date:** [April 10, 2007, 7:20am UTC](https://community.asterisk.org/t/problems-with-astmanproxy/13636/1 "2007-04-10T07:20:02Z")

</div>

Helo,  
I am new with astmanproxy but not with asterisk.

I will display informations about my sippeers in my browser using manager. So I installed astmanproxy so I have a single connection to manager. My php script is connecting to astmanproxy.

the script:

```auto
<PRE>
<?php

 echo "Verbunden mit Astmanproxy<br><br>";
 $socket = fsockopen("192.168.255.250",1234, $errno, $errstr, 30);
 fputs($socket, "Action: sippeers\r\n\r\n");
 fputs($socket, "Action: Logoff\r\n\r\n");

 while (!feof($socket)) {
 $dbentries .= fread($socket, 8192);
 }

 fclose($socket);
 echo $dbentries;

?>
</PRE>

```

But my Browser shows only:

```auto
Verbunden mit Astmanproxy

Asterisk Call Manager Proxy/1.21
Goodbye: Y'all come back now, y'hear?
```

If I do not use astmanproxy and connect direct to mananger the output is ok:

```auto
Verbunden mit Manager direkt

Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted

Response: Success
Message: Peer status list will follow

Event: PeerEntry
Channeltype: SIP
ObjectName: strato-out
ChanObjectType: peer
IPaddress: 194.97.40.217
IPport: 5060
Dynamic: no
Natsupport: yes
VideoSupport: no
ACL: no
Status: OK (70 ms)
RealtimeDevice: no

Event: PeerEntry
Channeltype: SIP
ObjectName: sipgate-out
ChanObjectType: peer
IPaddress: 217.10.79.9
IPport: 5060
Dynamic: no
Natsupport: yes
VideoSupport: no
ACL: no
Status: OK (75 ms)
RealtimeDevice: no

Event: PeerlistComplete
ListItems: 2

Response: Goodbye
Message: Thanks for all the fish.
```

here the script:

```auto

<PRE>
<?php

 echo "Verbunden mit Manager direkt<br><br>";
 $socket = fsockopen("192.168.255.250",5038, $errno, $errstr, 30);
 fputs($socket, "Action: Login\r\n");
 fputs($socket, "UserName: xxxx\r\n");
 fputs($socket, "Secret: xxxxx\r\n\r\n");
 fputs($socket, "Action: sippeers\r\n\r\n");
 fputs($socket, "Action: Logoff\r\n\r\n");

while (!feof($socket)) {
$dbentries .= fread($socket, 8192);
}

fclose($socket);
echo $dbentries;

?>
</PRE>

```

I’ll be thanksfully for any help.

Sven
