# Getting Stream name from edge

**URL:** https://community.wowza.com/t/getting-stream-name-from-edge/40145
**Category:** Wowza Streaming Engine
**Created:** [September 24, 2014, 5:04am UTC](https://community.wowza.com/t/getting-stream-name-from-edge/40145 "2014-09-24T05:04:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dogan\_dogan](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@dogan\_dogan](https://community.wowza.com/u/dogan_dogan)
#### Post date: [September 24, 2014, 5:04am UTC](https://community.wowza.com/t/getting-stream-name-from-edge/40145/1 "2014-09-24T05:04:54Z")

</div>

Dear Wowza Community,

iam trying to **get the Stream name from my edge** ( in my edge, module). But the Streamlistener class which implements the **“IMediaStreamActionNotify3” or “IMediaStreamActionNotify2” doenst work.**

the methods **onPlay or OnPublish etc. are not even triggered when the stream starts playing.**

my question:

**how can i get the stream name from the stream it plays?**

thank you very much for your time and help.

kind regards

---

<div class="post-metadata">

### Author: ![dogan\_dogan](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@dogan\_dogan](https://community.wowza.com/u/dogan_dogan)
#### Post date: [September 25, 2014, 2:41am UTC](https://community.wowza.com/t/getting-stream-name-from-edge/40145/2 "2014-09-25T02:41:06Z")

</div>

Does any body has an idea? I need the stream name in my edge module and want to do a database entry like i did in my origin application with the “onPlay and OnPublish” Methods.

thank you for your time and help.

---

<div class="post-metadata">

### Author: ![dogan\_dogan](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@dogan\_dogan](https://community.wowza.com/u/dogan_dogan)
#### Post date: [September 25, 2014, 3:50am UTC](https://community.wowza.com/t/getting-stream-name-from-edge/40145/3 "2014-09-25T03:50:08Z")

</div>

Hi letheasoftware,

first of all thank your for your help.

I am using Wowza 4.1.0. I want to get the stream name for RTMP.

---

<div class="post-metadata">

### Author: ![Emre\_Karatasoglu\_Adv](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@Emre\_Karatasoglu\_Adv](https://community.wowza.com/u/Emre_Karatasoglu_Adv)
#### Post date: [September 25, 2014, 12:25pm UTC](https://community.wowza.com/t/getting-stream-name-from-edge/40145/4 "2014-09-25T12:25:17Z")

</div>

Which wowza version do you use ?

Did you add the module to your modules in conf/xx\_aplication.xml ?

For getting the stream name while the client starts to play you need to override some methods.

ie : for http playback

you need to override

> public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
> 
> this.ip = httpSession.getIpAddress();
> 
> this.streamname = httpSession.getStreamName();
> 
> }

---

<div class="post-metadata">

### Author: ![Emre\_Karatasoglu\_Adv](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@Emre\_Karatasoglu\_Adv](https://community.wowza.com/u/Emre_Karatasoglu_Adv)
#### Post date: [September 25, 2014, 3:43pm UTC](https://community.wowza.com/t/getting-stream-name-from-edge/40145/5 "2014-09-25T15:43:49Z")

</div>

Hi oomworld, there is two way to solve this problem .

One of them I know and this one is walking around.

If you generate the stream url dynamically ,

all you need to add the stream name as a query string.

For rtmp query string is like that

rtmp://ip/loadbalance-origin?queryString=streamName/streamName

with this way

you can reach the query string via client on onConnect method .

here is sample code

> public void onConnect(IClient client, RequestFunction function,
> 
> AMFDataList params) {
> 
> this.qs = client.getQueryStr();

and I found another way to get the stream name but not tested yet , I can guess it will work

> List Names = client.getPlayStreams();
> 
> Iterator iter = Names.iterator();
> 
> with the iter.next you can reach , but as I told before , I’ve not worked on it yet.
