Author Topic: Transcoding alaw to g729  (Read 6980 times)

jakubbednar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Transcoding alaw to g729
« on: October 19, 2013, 09:15:24 AM »
Hi, I am using Yate 4.3 and I have problem with transcoding. I make it simple... I have a clean isntallation of Yate and very basic config.

Regfile.conf

[username]
[1000]
password=
format=alaw
[1001]
password=
format=g729


ysipchan.conf

[codecs]
alaw=enable
g729=enable


and after reading yate docs from http://docs.yate.ro/wiki/Transcoding , I added these two lines to regexroute:

regexroute.conf

[contexts]

.*=;oformats=$(transcode,,${formats})

[default]

${rtp_forward}^yes$^=;formats=${oformats}


But its not working... it makes call but both legs uses alaw codec or both g729, so yate doesnt perform transcoding. See attached log.

I tried a lot of things, searched in yate archive and also in this forum, but I am not able to force Yate to transcode and I really need it, becouse I need it for testig performance during transcoding with abacus test system. Any answer will be helpfull.

Thanks



marian

  • Hero Member
  • *****
  • Posts: 502
    • View Profile
Re: Transcoding alaw to g729
« Reply #1 on: October 21, 2013, 01:23:39 AM »
What protocol are you using?
Why do you need to force transcoding?
Can you give us an example?

jakubbednar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Transcoding alaw to g729
« Reply #2 on: October 21, 2013, 06:43:35 AM »
I am using SIP protocol.

And I need it for testing performance for my diploma thesis. I am testing Yate on differnet HW configurations. I have to measure and compatre max. call volume that can Yate handle with transcoding and without transcoding.

thanks for any help

marian

  • Hero Member
  • *****
  • Posts: 502
    • View Profile
Re: Transcoding alaw to g729
« Reply #3 on: October 22, 2013, 01:05:57 AM »
It is not easy to force transcoding.
Usually people want to avoid it.

Configure the calling party not to offer alaw.
Set the formats when routing:
.*=;formats=alaw

I suppose you do have a G729 data translator module for yate.
The transcoding won't work otherwise.


The incoming channel media won't change.
The outgoing channel format will be set to alaw.


jakubbednar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Transcoding alaw to g729
« Reply #4 on: October 22, 2013, 04:00:48 AM »
What do you mean with : "Configure the calling party not to offer alaw."  ? Where and what to change ?

And yes I have compiled and loaded g729 module a and I can make calls when both legs uses g729, but I need to find out how to transcode :)

Thanks a lot for your help

marian

  • Hero Member
  • *****
  • Posts: 502
    • View Profile
Re: Transcoding alaw to g729
« Reply #5 on: October 23, 2013, 12:58:55 AM »
When you are routing a call in regexroute it came from somewhere.
The application you are using to make the call is the calling party.

jakubbednar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Transcoding alaw to g729
« Reply #6 on: October 23, 2013, 01:33:28 PM »
I use regfile for routing calls, becouse I have only internal sip users in regfile. So I dont use regexroute to route calls. So I have to use regexroute for route calls or is there any chance transcode codecs when routing trough regfile module?

If I have to use regexroute, can you show me example of simple rule for route calls through regexroute? Only for two users for example :

regfile.conf

[1000]
password=

[1001]
password=

I was serching and find something like this : ^1000$=sip/sip:${called};line=[1000]    , but this doesnt work.


Thanks again for your time and help

marian

  • Hero Member
  • *****
  • Posts: 502
    • View Profile
Re: Transcoding alaw to g729
« Reply #7 on: October 24, 2013, 08:13:12 AM »
To test it you need a calling application and a called application.
Just configure supported codecs to be different in both applications.
Yate will automatically transcode if caller/called party have different codecs.

jakubbednar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Transcoding alaw to g729
« Reply #8 on: October 24, 2013, 09:44:28 AM »
Yes, I am testing it with one app configured for one codec and second app configured for different codec. I tried alaw-g729,  alaw-gsm, and many others combinations of codecs, but result still the same, call is canceled with warning (see the attached log): "No suitable codec for remote offer (PJMEDIA_SDPNEG_NOANSCODEC)" , so I dont know what to do, how to setup yate to transcode.


Thanks

cc08

  • Guest
Re: Transcoding alaw to g729
« Reply #9 on: October 25, 2013, 12:00:47 AM »
Jakubbednar,
try ti reset your configs to default and change next
regfie.conf
Code: [Select]
[general]
route=90
[1000]
password=
[1001]
password=

regexroute.conf
Code: [Select]
[contexts]
.*=default;formats=alaw,ulaw

And, set to the client configs only g729(caller which) , and at the called - only 711
can be obtained ...

2 Marian,
which module generates these messages ?
Code: [Select]
notification: More than two wideband layers found. The stream is corrupted.
notification: Invalid mode encountered. The stream is corrupted.
notification: More than two wideband layers found. The stream is corrupted.

Thanks

marian

  • Hero Member
  • *****
  • Posts: 502
    • View Profile
Re: Transcoding alaw to g729
« Reply #10 on: October 25, 2013, 01:23:33 AM »
cc08: the message is put by speex library used in speexcodec.cpp

jakubbednar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Transcoding alaw to g729
« Reply #11 on: October 28, 2013, 03:34:37 PM »
to cc08: Thnx man its workig  ;)

So once more big thnaks to cc08 and also marian for your help.