# Getting user agent from serverinfo service

**URL:** <https://community.wowza.com/t/getting-user-agent-from-serverinfo-service/36054>\
**Category:** Wowza Streaming Engine\
**Created:** [June 21, 2016, 10:11am UTC](https://community.wowza.com/t/getting-user-agent-from-serverinfo-service/36054 "2016-06-21T10:11:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luca\_Luca](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@Luca\_Luca](https://community.wowza.com/u/Luca_Luca)\
**Post date:** [June 21, 2016, 10:11am UTC](https://community.wowza.com/t/getting-user-agent-from-serverinfo-service/36054/1 "2016-06-21T10:11:07Z")

</div>

Hi,

is there a way to have the user agent information into the xml generated by the serverinfo service?

In the xml I see tag, but many of them are unknown (probably they are mobile devices or players like vlc).

I need the user agent to see in realtime how many mobile users are connected to a stream.

Probably on Wowza 3 there was the user agent into the xml generated by serverinfo.

Thanks for your help

Luke

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [July 6, 2016, 3:24pm UTC](https://community.wowza.com/t/getting-user-agent-from-serverinfo-service/36054/2 "2016-07-06T15:24:01Z")

</div>

Hi,

This data isn’t available right now. You can see user agent info written to the access log (for HTTP streams) and possibly parse that in real time, maybe using the [Google Analytics](https://www.wowza.com/docs/how-to-send-connection-and-stream-statistics-to-google-analytics-analytics%28ModuleAnalytics%29) module?

We also provide the [source code for the ServerInfo HTTP Provider](http://community.wowza.com/t/-/77) which you are free to use and extend.

Paul

---

<div class="post-metadata">

**Author:** ![Luca\_Luca](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@Luca\_Luca](https://community.wowza.com/u/Luca_Luca)\
**Post date:** [July 17, 2016, 1:24am UTC](https://community.wowza.com/t/getting-user-agent-from-serverinfo-service/36054/3 "2016-07-17T01:24:47Z")

</div>

Thank you Paul for your answer.

I think I’ll try to modify serverinfo http provider adding the user agent info.

Just a question about how to get the user agent from the server.

I see that serverinfo uses client.getIp() to get the ip address and client.getFlashVer() to get the flash player version.

What do I have to use to get the user agent?

Where I can find the list of attributes available using client.getXXXX ?

thanks a lot

Luca

---

<div class="post-metadata">

**Author:** ![Luca\_Luca](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@Luca\_Luca](https://community.wowza.com/u/Luca_Luca)\
**Post date:** [August 19, 2016, 11:15am UTC](https://community.wowza.com/t/getting-user-agent-from-serverinfo-service/36054/4 "2016-08-19T11:15:20Z")

</div>

Thanks Paul,

probably I’m missing something.

I installed on my Mac Eclipse Neon and Wowza IDE.

Then I click on FILE/NEW/OTHER and I select New Wowza Streaming Engine HTTPProvider Class , but I’m not able to go on from here.

Eclipse ask me the path of the source folder, but the box is empty (no entries found) and even if I write a path manually it doesn’t accept the path.

What am I doing wrong?

Luca

> Hi,
> 
> I don’t believe you can obtain the user agent via that method. You could try something like
> 
> ```auto
> String userAgent = httpCupertinoStreamingSession.getUserAgent();
> 
> ```
> 
> to get the HTTP user agent. [This example module](https://www.wowza.com/docs/how-to-control-access-to-apple-hls-streaming-cupertinostreaming%28cupertinostreaming%29) shows how it might be called.
> 
> Regards,
> 
> Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [August 16, 2016, 11:44am UTC](https://community.wowza.com/t/getting-user-agent-from-serverinfo-service/36054/5 "2016-08-16T11:44:17Z")

</div>

Hi,

I don’t believe you can obtain the user agent via that method. You could try something like

```auto
String userAgent = httpCupertinoStreamingSession.getUserAgent();

```

to get the HTTP user agent. [This example module](https://www.wowza.com/docs/how-to-control-access-to-apple-hls-streaming-cupertinostreaming%28cupertinostreaming%29) shows how it might be called.

Regards,

Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [September 13, 2016, 3:32pm UTC](https://community.wowza.com/t/getting-user-agent-from-serverinfo-service/36054/6 "2016-09-13T15:32:42Z")

</div>

Hi Luca,

Unfortunately it’s difficult to say what could be the problem there. I just did a similar test and was able to create a new HTTP Provider class without any further prompting. I suspect your setup is not correct. Do make sure you’ve set up Eclipse as [shown here](https://www.wowza.com/docs/how-to-extend-wowza-streaming-engine-using-the-wowza-ide).

Regards,

Paul
