Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Change Asterisk MulticastRTP codec


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
mrmdev at outlook.com
Guest





PostPosted: Wed Sep 30, 2015 12:52 pm    Post subject: [asterisk-users] Change Asterisk MulticastRTP codec Reply with quote

Greetings everyone,

I was wondering if there was a way to change the codec that Asterisk uses when streaming via MulticastRTP. Or perhaps a way to transcode the multicast stream.


In the CLI, when I have a multicast stream in progress, I am typing 'core show channel MulticastRTP/0x7f7........' to get lots of helpful information.


I have noticed that when I do a MULTICAST page and send data from MP3Player, I get no sound on my speakers and get the following from 'core show channel PJSIP/xxx':


NativeFormats: (slin)
WriteFormat: slin
ReadFormat: slin
WriteTranscode: No
ReadTranscode: No



I have noticed that when I do a UNICAST page and send data from MP3Player, everything works flawlessly and I get the following from 'core show channel MulticastRTP':


NativeFormats: (ulaw)
WriteFormat: slin
ReadFormat: slin
WriteTranscode: Yes (slin@8000)->(ulaw@8000)
ReadTranscode: Yes (ulaw@8000)->(slin@8000)





The only thing that is changing is the following line in my extensions.conf file:


; For Multicast Paging
same => n(next),Page(MulticastRTP/basic/239.1.1.2:6061,q)


; For Unicast Paging
same => n(next),Page(PJSIP/107&PJSIP/108,ib(pjsip-auto-answer-header^addheader^1)|p})





Is there any way to get the MP3Player stream to transcode (as it does on the UNICAST stream) when I try to MULTICAST?


Thanks for the help,


--Matt
Back to top
pete at fiberphone.co.nz
Guest





PostPosted: Wed Sep 30, 2015 1:58 pm    Post subject: [asterisk-users] Change Asterisk MulticastRTP codec Reply with quote

Hi Matt

Interesting problem! I'm hoping those with knowledge about the internal workings of the Page app and multicast will chime in, although it might pay to quote your version of Asterisk).


I don't know enough to answer the question itself, but if it were me I would be inclined to just work around it by doing something like piping mp3player through sox before sending the data on to asterisk.


I may be able to help you achieve that, so if that's good enough then please post more of the multicast page config from your extensions.conf.


Pete



On 1/10/2015, at 6:51 AM, Matthew Murphy <mrmdev@outlook.com (mrmdev@outlook.com)> wrote:
Quote:
Greetings everyone,

I was wondering if there was a way to change the codec that Asterisk uses when streaming via MulticastRTP. Or perhaps a way to transcode the multicast stream.


[SNIP]
Is there any way to get the MP3Player stream to transcode (as it does on the UNICAST stream) when I try to MULTICAST?


Back to top
lmoore at omninet.net.au
Guest





PostPosted: Wed Sep 30, 2015 5:15 pm    Post subject: [asterisk-users] Change Asterisk MulticastRTP codec Reply with quote

On my Asterisk 11 system I have the following in extensions.ael for chan_sip.

        8001    => {
                Set(SIP_CODEC=alaw);
                //Dial(MulticastRTP/linksys/224.168.168.168:34567/224.168.168.168:6061);
                Page(MulticastRTP/linksys/224.168.168.168:34567/224.168.168.168:6061,q,5);
                Hangup();
        };


I believe in your case you need to set PJSIP_MEDIA_OFFER(ulaw) in a pre-dial handler prior to making the call.

See https://wiki.asterisk.org/wiki/display/AST/Pre-dial+handlers+Specification.




On 1/10/2015 1:51 AM, Matthew Murphy wrote:

Quote:
Greetings everyone,

I was wondering if there was a way to change the codec that Asterisk uses when streaming via MulticastRTP. Or perhaps a way to transcode the multicast stream.


In the CLI, when I have a multicast stream in progress, I am typing 'core show channel MulticastRTP/0x7f7........' to get lots of helpful information.


I have noticed that when I do a MULTICAST page and send data from MP3Player, I get no sound on my speakers and get the following from 'core show channel PJSIP/xxx':


NativeFormats: (slin)
WriteFormat: slin
ReadFormat: slin
WriteTranscode: No 
ReadTranscode: No 



I have noticed that when I do a UNICAST page and send data from MP3Player, everything works flawlessly and I get the following from 'core show channel MulticastRTP':


NativeFormats: (ulaw)
WriteFormat: slin
ReadFormat: slin
WriteTranscode: Yes (slin@8000)->(ulaw@8000)
ReadTranscode: Yes (ulaw@8000)->(slin@8000)





The only thing that is changing is the following line in my extensions.conf file:


; For Multicast Paging
same => n(next),Page(MulticastRTP/basic/239.1.1.2:6061,q)


; For Unicast Paging
same => n(next),Page(PJSIP/107&PJSIP/108,ib(pjsip-auto-answer-header^addheader^1)|p})





Is there any way to get the MP3Player stream to transcode (as it does on the UNICAST stream) when I try to MULTICAST?


Thanks for the help,


--Matt



Back to top
mrmdev at outlook.com
Guest





PostPosted: Thu Oct 01, 2015 7:39 am    Post subject: [asterisk-users] Change Asterisk MulticastRTP codec Reply with quote

Larry and Pete,

Thanks a bunch for jumping in and giving me some ideas! I am hoping to have something working soon with what you guys have given me. The end game for me is to be able to stream MP3s from a playlist. It appears like both solutions you guys have proposed may give me what I need. I will actually try both and let you know how it goes.


--Matt

From: lmoore@omninet.net.au
To: asterisk-users@lists.digium.com
Date: Thu, 1 Oct 2015 06:15:17 +0800
Subject: Re: [asterisk-users] Change Asterisk MulticastRTP codec

On my Asterisk 11 system I have the following in extensions.ael for chan_sip.

8001 => {
Set(SIP_CODEC=alaw);
//Dial(MulticastRTP/linksys/224.168.168.168:34567/224.168.168.168:6061);
Page(MulticastRTP/linksys/224.168.168.168:34567/224.168.168.168:6061,q,5);
Hangup();
};


I believe in your case you need to set PJSIP_MEDIA_OFFER(ulaw) in a pre-dial handler prior to making the call.

See https://wiki.asterisk.org/wiki/display/AST/Pre-dial+handlers+Specification.




On 1/10/2015 1:51 AM, Matthew Murphy wrote:

Quote:
Greetings everyone,

I was wondering if there was a way to change the codec that Asterisk uses when streaming via MulticastRTP. Or perhaps a way to transcode the multicast stream.


In the CLI, when I have a multicast stream in progress, I am typing 'core show channel MulticastRTP/0x7f7........' to get lots of helpful information.


I have noticed that when I do a MULTICAST page and send data from MP3Player, I get no sound on my speakers and get the following from 'core show channel PJSIP/xxx':


NativeFormats: (slin)
WriteFormat: slin
ReadFormat: slin
WriteTranscode: No
ReadTranscode: No



I have noticed that when I do a UNICAST page and send data from MP3Player, everything works flawlessly and I get the following from 'core show channel MulticastRTP':


NativeFormats: (ulaw)
WriteFormat: slin
ReadFormat: slin
WriteTranscode: Yes (slin@8000)->(ulaw@8000)
ReadTranscode: Yes (ulaw@8000)->(slin@8000)





The only thing that is changing is the following line in my extensions.conf file:


; For Multicast Paging
same => n(next),Page(MulticastRTP/basic/239.1.1.2:6061,q)


; For Unicast Paging
same => n(next),Page(PJSIP/107&PJSIP/108,ib(pjsip-auto-answer-header^addheader^1)|p})





Is there any way to get the MP3Player stream to transcode (as it does on the UNICAST stream) when I try to MULTICAST?


Thanks for the help,


--Matt





-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services