Sofia late-negotiation on re-INVITE (codec-modification)

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sofia late-negotiation on re-INVITE (codec-modification)

Visciano Giovanni
Sofia late-negotiation on re-INVITE (codec-modification)

Basic call SIP vs SIP with:

<param name="inbound-late-negotiation" value="true"/>
<action application="set" data="inherit_codec=true"/>
<param name="renegotiate-codec-on-reinvite" value="true"/>

This help to avoid FS transcoding, the SIP endpoints negotiate codec end-to-end.
FS still in the media path but no transcoding applied.

INVITE [pcma,g729] ---> FS ---> INVITE [pcma,g729]
200 OK [pcma]      <--- FS ---> 200 OK [pcma]



If a SIP ep send a re-INVITE for codec modification, sofia negotiate the new codec on that leg without "asking" the remote party. This result in transcoding and since I have mod_g729 only in passthrough mode the call is released by the core.

re-INVITE [g729] ---> FS
200 OK    [g729] <--- FS


*************
It seems that "late_negotiation + inherit_codec" doesn't apply to a codec modification.
Do I miss some configuration options in the SIP profile?
(Note: I cannot use proxy-media/no-media mode in my configuration)
*************


Regards
Giovanni

 

Internet Email Confidentiality Footer

********************************************************************************************************************************************

La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
********************************************************************************************************************************************


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sofia late-negotiation on re-INVITE (codec-modification)

Brian West
You do realize that those param's are sofia profile params and not dialplan XML right?

/b

On Nov 25, 2011, at 12:27 AM, Visciano Giovanni wrote:

<param name="inbound-late-negotiation" value="true"/>
<action application="set" data="inherit_codec=true"/>
<param name="renegotiate-codec-on-reinvite" value="true"/>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sofia late-negotiation on re-INVITE(codec-modification)

Visciano Giovanni
> You do realize that those param's are sofia profile params and not dialplan XML right?

Hi Brian, sure I know that.
So:

In sofia SIP profile I have:
  <param name="inbound-late-negotiation" value="true"/>
  <param name="renegotiate-codec-on-reinvite" value="true"/>

and in my dialplan XML I hit:
  <action application="set" data="inherit_codec=true"/>


I repeated my test scenario, sorry what I described was with
inherit_codec=false.
If I set inherit_codec=true (this is my purpose) sofia behavior is this:

INVITE [pcma,g729]    ---> FS ---> INVITE [pcma,g729]
200 OK [pcma]         <--- FS ---> 200 OK [pcma]
re-INVITE [g729]      ---> FS
Reinvite Codec Error! <--- FS

Here the call is release and from the log I see that sofia just negotiatiate
localy and compare the codec list in the new offer only with PCMA.
With inherit_codec=false it compare the codec list with the codec loaded
in the core so it match G729 (but damn it's a passthrought codec and I cannot
do transcoding!).

Here is an extract off the log, that show the error.
Now I do not have with me the complete session log, I will send it tomorrow.
Do you think it's a bug?

1970-01-01 23:10:28.600056 [DEBUG] switch_core_session.c:857 Send signal sofia/external/[hidden email] [BREAK]
1970-01-01 23:10:28.600056 [DEBUG] switch_core_session.c:857 Send signal sofia/external/[hidden email] [BREAK]
1970-01-01 23:10:28.620894 [DEBUG] sofia.c:5143 Channel sofia/external/[hidden email] entering state [received][100]
1970-01-01 23:10:28.620894 [DEBUG] sofia.c:5154 Remote SDP:
v=0
o=- 0 1 IN IP4 10.50.185.16
s=IMSS
c=IN IP4 10.50.185.16
t=0 0
m=audio 10992 RTP/AVP 18 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
1970-01-01 23:10:28.620894 [DEBUG] sofia_glue.c:4731 Audio Codec Compare [G729:18:8000:20:8000]/[PCMA:8:8000:20:64000]
1970-01-01 23:10:28.620894 [DEBUG] sofia_glue.c:4731 Audio Codec Compare [telephone-event:101:8000:20:0]/[PCMA:8:8000:20:64000]
1970-01-01 23:10:28.620894 [DEBUG] sofia_glue.c:4845 Set 2833 dtmf send/recv payload to 101
1970-01-01 23:10:28.620894 [ERR] sofia.c:5611 Reinvite Codec Error!


Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
-----------------------------------------------------------------------------------------------------


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

winmail.dat (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sofia late-negotiation on re-INVITE (codec-modification)

voiper2
In reply to this post by Brian West
Visciano: they have to be sofia profile params, because otherwise, the codec is already negotiated by the time it gets to the dialplan.
-Avi


On Sat, Nov 26, 2011 at 12:39 AM, Brian West <[hidden email]> wrote:
You do realize that those param's are sofia profile params and not dialplan XML right?

/b

On Nov 25, 2011, at 12:27 AM, Visciano Giovanni wrote:

<param name="inbound-late-negotiation" value="true"/>
<action application="set" data="inherit_codec=true"/>
<param name="renegotiate-codec-on-reinvite" value="true"/>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

R: Sofia late-negotiation on re-INVITE(codec-modification)

Visciano Giovanni
In reply to this post by Visciano Giovanni
R: [Freeswitch-users] Sofia late-negotiation on re-INVITE(codec-modification)

Finally we are back to our test.
I updated my FS installation to last GIT
(FreeSWITCH Version 1.0.head (git-eae86e0 2011-11-30 18-14-24 -0600))

TEST
----
SIP vs SIP basic audio call, then re-INVITE for codec modification.
FS configuration B2B, avoid transcoding.

CONF
----
In sofia SIP profile I have:
  <param name="inbound-late-negotiation" value="true"/>
  <param name="renegotiate-codec-on-reinvite" value="true"/>

and in my dialplan XML I hit:
  <action application="set" data="inherit_codec=true"/>

Loaded codec modules:
freeswitch@internal> show codec
type,name,ikey
codec,G.711 alaw,CORE_PCM_MODULE
codec,G.711 ulaw,CORE_PCM_MODULE
codec,G.729,mod_g729
codec,PROXY PASS-THROUGH,CORE_PCM_MODULE
codec,PROXY VIDEO PASS-THROUGH,CORE_PCM_MODULE
codec,RAW Signed Linear (16 bit),CORE_PCM_MODULE


TEST 1)
-------
1001  ----invite(pcma)----> FS --invite(pcma)-->  1000
1001  <----200OK(pcma)----  FS <--200OK(pcma)--   1000
1001  --re/invite(g729)---> FS
1001  <----488------------  FS

Full log: http://pastebin.freeswitch.org/17906

Note: FS does not negotiate end to end the reINVITE O/A codec modification.
It is closed locally on the 1001->FS leg. From the log I see
2011-12-01 15:54:13.871332 [DEBUG] sofia_glue.c:4767 Audio Codec Compare [G729:18:8000:20:8000]/[PCMA:8:8000:20:64000]
2011-12-01 15:54:13.871332 [DEBUG] sofia_glue.c:4767 Audio Codec Compare [telephone-event:101:8000:20:0]/[PCMA:8:8000:20:64000]
2011-12-01 15:54:13.871332 [ERR] sofia.c:5876 Reinvite Codec Error!



TEST 2)
-------
1000  ----invite(pcma)----> FS --invite(pcma)-->   1001
1000  <----200OK(pcma)----  FS <--200OK(pcma)--    1001
1000                        FS <--re/invite(g729)- 1001
1000                        FS ------------------> 1001

Full log: http://pastebin.freeswitch.org/17907

Note: FS does not negotiate end to end the reINVITE O/A codec modification.
It is closed locally on the 1001->FS leg. FS select locally G729 but this result in transcoding!
I hate transcoding!
>From the log I see
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:4767 Audio Codec Compare [G729:18:8000:20:8000]/[PCMA:8:8000:20:64000]
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:4767 Audio Codec Compare [G729:18:8000:20:8000]/[G729:18:8000:20:8000]
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:2806 Changing Codec from PCMA@20ms@8000hz to G729@20ms@8000hz
2011-12-01 16:00:13.011337 [DEBUG] sofia_glue.c:2888 Set Codec sofia/internal/1001@138.132.110.64:5070 G729/8000 20 ms 160 samples 8000 bits
2011-12-01 16:00:13.011337 [DEBUG] switch_core_codec.c:116 sofia/internal/1001@138.132.110.64:5070 Push codec G729:18
2011-12-01 16:00:13.031252 [ERR] mod_g729.c:102 This codec is only usable in passthrough mode!
2011-12-01 16:00:13.031252 [ERR] switch_core_io.c:1077 Codec G.729 encoder error!

Regard,
Giovanni

PS: next week I won't be at work. My collegue Nevio will follow
the problem, so if you need more data/details just tell us.

 

Internet Email Confidentiality Footer

********************************************************************************************************************************************

La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
********************************************************************************************************************************************


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: R: Sofia late-negotiation on re-INVITE(codec-modification)

Alessandro Illiano
Hi All,
I've some issue,
B send a re-invite changing the codec and fs hangup the call with 488 ,
Without reinvite a-leg….

Regards,
Alessandro


Da: Visciano Giovanni <[hidden email]>
Risposta: FreeSWITCH Users Help <[hidden email]>
Data: Thu, 1 Dec 2011 16:35:54 +0100
A: FreeSWITCH Users Help <[hidden email]>
Oggetto: [Freeswitch-users] R: Sofia late-negotiation on re-INVITE(codec-modification)

R: [Freeswitch-users] Sofia late-negotiation on re-INVITE(codec-modification)

Finally we are back to our test.
I updated my FS installation to last GIT
(FreeSWITCH Version 1.0.head (git-eae86e0 2011-11-30 18-14-24 -0600))

TEST
----
SIP vs SIP basic audio call, then re-INVITE for codec modification.
FS configuration B2B, avoid transcoding.

CONF
----
In sofia SIP profile I have:
  <param name="inbound-late-negotiation" value="true"/>
  <param name="renegotiate-codec-on-reinvite" value="true"/>

and in my dialplan XML I hit:
  <action application="set" data="inherit_codec=true"/>

Loaded codec modules:
freeswitch@internal> show codec
type,name,ikey
codec,G.711 alaw,CORE_PCM_MODULE
codec,G.711 ulaw,CORE_PCM_MODULE
codec,G.729,mod_g729
codec,PROXY PASS-THROUGH,CORE_PCM_MODULE
codec,PROXY VIDEO PASS-THROUGH,CORE_PCM_MODULE
codec,RAW Signed Linear (16 bit),CORE_PCM_MODULE


TEST 1)
-------
1001  ----invite(pcma)----> FS --invite(pcma)-->  1000
1001  <----200OK(pcma)----  FS <--200OK(pcma)--   1000
1001  --re/invite(g729)---> FS
1001  <----488------------  FS

Full log: http://pastebin.freeswitch.org/17906

Note: FS does not negotiate end to end the reINVITE O/A codec modification.
It is closed locally on the 1001->FS leg. From the log I see
2011-12-01 15:54:13.871332 [DEBUG] sofia_glue.c:4767 Audio Codec Compare [G729:18:8000:20:8000]/[PCMA:8:8000:20:64000]
2011-12-01 15:54:13.871332 [DEBUG] sofia_glue.c:4767 Audio Codec Compare [telephone-event:101:8000:20:0]/[PCMA:8:8000:20:64000]
2011-12-01 15:54:13.871332 [ERR] sofia.c:5876 Reinvite Codec Error!



TEST 2)
-------
1000  ----invite(pcma)----> FS --invite(pcma)-->   1001
1000  <----200OK(pcma)----  FS <--200OK(pcma)--    1001
1000                        FS <--re/invite(g729)- 1001
1000                        FS ------------------> 1001

Full log: http://pastebin.freeswitch.org/17907

Note: FS does not negotiate end to end the reINVITE O/A codec modification.
It is closed locally on the 1001->FS leg. FS select locally G729 but this result in transcoding!
I hate transcoding!
>From the log I see
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:4767 Audio Codec Compare [G729:18:8000:20:8000]/[PCMA:8:8000:20:64000]
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:4767 Audio Codec Compare [G729:18:8000:20:8000]/[G729:18:8000:20:8000]
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:2806 Changing Codec from PCMA@20ms@8000hz to G729@20ms@8000hz
2011-12-01 16:00:13.011337 [DEBUG] sofia_glue.c:2888 Set Codec [hidden email]:5070 G729/8000 20 ms 160 samples 8000 bits
2011-12-01 16:00:13.011337 [DEBUG] switch_core_codec.c:116 [hidden email]:5070 Push codec G729:18
2011-12-01 16:00:13.031252 [ERR] mod_g729.c:102 This codec is only usable in passthrough mode!
2011-12-01 16:00:13.031252 [ERR] switch_core_io.c:1077 Codec G.729 encoder error!

Regard,
Giovanni

PS: next week I won't be at work. My collegue Nevio will follow
the problem, so if you need more data/details just tell us.

 

Internet Email Confidentiality Footer

********************************************************************************************************************************************

La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
********************************************************************************************************************************************

_________________________________________________________________________ Professional FreeSWITCH Consulting Services: [hidden email] http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list [hidden email] http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: R: Sofia late-negotiation on re-INVITE(codec-modification)

Visciano Giovanni
I've opened a BUG.
http://jira.freeswitch.org/browse/FS-3739

I don't know what's you FS configuration.
What I know is:
- SIP "media proxy mode" is OK.
- re-INVITE for codec modification to image T.38 (t38-passthrough) is OK in all SIP "media mode".

The "late_negotiation" + "inherit_codec" trick to avoid transcoding in a Back2Back
(that is no media proxy) configuration works only for the very first call setup SDP offer/answer.
http://wiki.freeswitch.org/wiki/Codec_negotiation

Once the call is established, further codec modification via re-INVITE are usually closed on
each leg (except for t38) and this can led to transcoding (and obvious errors if you can't or don't want
to transcode).

Hope this helps you find out your problem.

Giovanni

-----Original Message-----
From: [hidden email] on behalf of Alessandro Illiano
Sent: Wed 12/21/2011 1:15 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] R: Sofia late-negotiation on re-INVITE(codec-modification)
 
Hi All,
I've some issue,
B send a re-invite changing the codec and fs hangup the call with 488 ,
Without reinvite a-legS.

Regards,
Alessandro


Da:  Visciano Giovanni <[hidden email]>
Risposta:  FreeSWITCH Users Help <[hidden email]>
Data:  Thu, 1 Dec 2011 16:35:54 +0100
A:  FreeSWITCH Users Help <[hidden email]>
Oggetto:  [Freeswitch-users] R: Sofia late-negotiation on
re-INVITE(codec-modification)

R: [Freeswitch-users] Sofia late-negotiation on
re-INVITE(codec-modification)
Finally we are back to our test.
I updated my FS installation to last GIT
(FreeSWITCH Version 1.0.head (git-eae86e0 2011-11-30 18-14-24 -0600))

TEST
----
SIP vs SIP basic audio call, then re-INVITE for codec modification.
FS configuration B2B, avoid transcoding.

CONF
----
In sofia SIP profile I have:
  <param name="inbound-late-negotiation" value="true"/>
  <param name="renegotiate-codec-on-reinvite" value="true"/>

and in my dialplan XML I hit:
  <action application="set" data="inherit_codec=true"/>

Loaded codec modules:
freeswitch@internal> show codec
type,name,ikey
codec,G.711 alaw,CORE_PCM_MODULE
codec,G.711 ulaw,CORE_PCM_MODULE
codec,G.729,mod_g729
codec,PROXY PASS-THROUGH,CORE_PCM_MODULE
codec,PROXY VIDEO PASS-THROUGH,CORE_PCM_MODULE
codec,RAW Signed Linear (16 bit),CORE_PCM_MODULE


TEST 1)
-------
1001  ----invite(pcma)----> FS --invite(pcma)-->  1000
1001  <----200OK(pcma)----  FS <--200OK(pcma)--   1000
1001  --re/invite(g729)---> FS
1001  <----488------------  FS

Full log: http://pastebin.freeswitch.org/17906

Note: FS does not negotiate end to end the reINVITE O/A codec modification.
It is closed locally on the 1001->FS leg. From the log I see
2011-12-01 15:54:13.871332 [DEBUG] sofia_glue.c:4767 Audio Codec Compare
[G729:18:8000:20:8000]/[PCMA:8:8000:20:64000]
2011-12-01 15:54:13.871332 [DEBUG] sofia_glue.c:4767 Audio Codec Compare
[telephone-event:101:8000:20:0]/[PCMA:8:8000:20:64000]
2011-12-01 15:54:13.871332 [ERR] sofia.c:5876 Reinvite Codec Error!



TEST 2)
-------
1000  ----invite(pcma)----> FS --invite(pcma)-->   1001
1000  <----200OK(pcma)----  FS <--200OK(pcma)--    1001
1000                        FS <--re/invite(g729)- 1001
1000                        FS ------------------> 1001

Full log: http://pastebin.freeswitch.org/17907

Note: FS does not negotiate end to end the reINVITE O/A codec modification.
It is closed locally on the 1001->FS leg. FS select locally G729 but this
result in transcoding!
I hate transcoding!
>From the log I see
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:4767 Audio Codec Compare
[G729:18:8000:20:8000]/[PCMA:8:8000:20:64000]
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:4767 Audio Codec Compare
[G729:18:8000:20:8000]/[G729:18:8000:20:8000]
2011-12-01 16:00:12.971244 [DEBUG] sofia_glue.c:2806 Changing Codec from
PCMA@20ms@8000hz to G729@20ms@8000hz
2011-12-01 16:00:13.011337 [DEBUG] sofia_glue.c:2888 Set Codec
sofia/internal/1001@138.132.110.64:5070 G729/8000 20 ms 160 samples 8000
bits
2011-12-01 16:00:13.011337 [DEBUG] switch_core_codec.c:116
sofia/internal/1001@138.132.110.64:5070 Push codec G729:18
2011-12-01 16:00:13.031252 [ERR] mod_g729.c:102 This codec is only usable in
passthrough mode!
2011-12-01 16:00:13.031252 [ERR] switch_core_io.c:1077 Codec G.729 encoder
error!

Regard,
Giovanni

PS: next week I won't be at work. My collegue Nevio will follow
the problem, so if you need more data/details just tell us.

 

Internet Email Confidentiality Footer

****************************************************************************
****************************************************************

La presente comunicazione, con le informazioni in essa contenute e ogni
documento o file allegato, e' rivolta unicamente alla/e persona/e cui e'
indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete
i destinatari/autorizzati siete avvisati che qualsiasi azione, copia,
comunicazione, divulgazione o simili basate sul contenuto di tali
informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P.,
D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se
avete ricevuto questa comunicazione per errore, vi preghiamo di darne
immediata notizia al mittente e di distruggere il messaggio originale e ogni
file allegato senza farne copia alcuna o riprodurne in alcun modo il
contenuto.

This e-mail and its attachments are intended for the addressee(s) only and
are confidential and/or may contain legally privileged information. If you
have received this message by mistake or are not one of the addressees
above, you may take no action based on it, and you may not copy or show it
to anyone; please reply to this e-mail and point out the error which has
occurred.
****************************************************************************
****************************************************************
_________________________________________________________________________
Professional FreeSWITCH Consulting Services: [hidden email]
http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel
Communication Server http://www.cudatel.com Official FreeSWITCH Sites
http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list [hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

winmail.dat (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sofia late-negotiation on re-INVITE(codec-modification)

Brian West
I don't think this is a bug... I think its by design.

/b

On Dec 21, 2011, at 11:26 AM, Visciano Giovanni wrote:

I've opened a BUG.
http://jira.freeswitch.org/browse/FS-3739

I don't know what's you FS configuration.
What I know is:
- SIP "media proxy mode" is OK.
- re-INVITE for codec modification to image T.38 (t38-passthrough) is OK in all SIP "media mode".

The "late_negotiation" + "inherit_codec" trick to avoid transcoding in a Back2Back
(that is no media proxy) configuration works only for the very first call setup SDP offer/answer.
http://wiki.freeswitch.org/wiki/Codec_negotiation

Once the call is established, further codec modification via re-INVITE are usually closed on
each leg (except for t38) and this can led to transcoding (and obvious errors if you can't or don't want
to transcode).

Hope this helps you find out your problem.

Giovanni

-- 
Brian West 
FreeSWITCH Solutions, LLC
Phone: +1 (918) 420-9266 
Fax:   +1 (918) 420-9267


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sofia late-negotiation onre-INVITE(codec-modification)

Visciano Giovanni
I used to say to my boss:
... it's not a bug it's a feature! I'm kidding :)

By the way, even in this "design choice", al least the first test scenario is a bug
(described in the first half on the Jira BUG):
http://pastebin.freeswitch.org/17906

Moreover this "by design" behavior create some problem not only for
transcoding issue but also for fax upspeed codec modification (no T38).

Years ago, when hardware resources where poor, I had a lot of discussions with
my colleagues to avoid the allocation of transcoding resources on our softswitch
and we always ended up to use a transcoding resource if and only if it's really needed,
if the endpoints can speak the same language let them do all the stuff. I know
easy to say but ...

Back to FS, what I think is we miss an endpoint independent codec negotiation signaling.
I mean something like we have in the call setup phase via "absolute_codec_string"
/ "ep_codec_string" / SWITCH_ORIGINATOR_CODEC_VARIABLE.

As I'm playing/prototyping a new endpoint module I used these channel variable to
successfully interworking with SIP endpoint gateway in codec passthrough...
but now that the test-suite is going over the SIP basic call codec modification I found
that "by design problem".

In the (working) spare time I'm trying to write a patch to extend the core interworking
opening the way I suggested few lines over. As I'm very new to FS, for now it's a very
embryonal and poor implementation in my opinion, but enough for the endpoint module
prototype evaluation.
I hope to give that back to you if I can find more time to move the patch to a presentable level.

Giovanni

-----Original Message-----
From: [hidden email] on behalf of Brian West
Sent: Wed 12/21/2011 6:30 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Sofia late-negotiation onre-INVITE(codec-modification)
 
I don't think this is a bug... I think its by design.

/b

On Dec 21, 2011, at 11:26 AM, Visciano Giovanni wrote:

> I've opened a BUG.
> http://jira.freeswitch.org/browse/FS-3739
>
> I don't know what's you FS configuration.
> What I know is:
> - SIP "media proxy mode" is OK.
> - re-INVITE for codec modification to image T.38 (t38-passthrough) is OK in all SIP "media mode".
>
> The "late_negotiation" + "inherit_codec" trick to avoid transcoding in a Back2Back
> (that is no media proxy) configuration works only for the very first call setup SDP offer/answer.
> http://wiki.freeswitch.org/wiki/Codec_negotiation
>
> Once the call is established, further codec modification via re-INVITE are usually closed on
> each leg (except for t38) and this can led to transcoding (and obvious errors if you can't or don't want
> to transcode).
>
> Hope this helps you find out your problem.
>
> Giovanni
--
Brian West
FreeSWITCH Solutions, LLC
Phone: +1 (918) 420-9266
Fax:   +1 (918) 420-9267
[hidden email]
http://www.freeswitch.org



Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
-----------------------------------------------------------------------------------------------------


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

winmail.dat (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sofia late-negotiation onre-INVITE(codec-modification)

clegoux
This post has NOT been accepted by the mailing list yet.
How did you go with this issue?
I know this is an old thread but I am experiencing the exact same issue which is a lot of pain.
I don't want freeswitch to touch anything on the SDP it should be transparent. At the moment it is transparent for the first invite but not on the reInvite which breaks our product
Loading...