Re: [Freeswitch-users] G723-Wrong ptime
Turn off scrooge mode Define it as g723_1@30i in the config On Sep 18, 2010 8:27 AM, "gamalsa" <gamalsa@hotmail.com> wrote: I don't get any message from FS, i just hear a distorted voice when using g.723. and from the debug output i see that freeswitch compares 120 ms p-time to 20 ms p-time on the other end (and chooses 120ms), while the other end is using p-time 30 ms. It is strange because g.723 uses p-time 30 ms by default. Is there any way to force FS to use g723 with p-time 30 ms with this specific provider? This problem doesn't exist when using g729 codec. I'm using the last svn of freeswitch. thanks -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p554... Sent from the freeswitch-users mailing list archive at Nabble.com. ________________________________...
when setting g723_1@30i in the external sip profile of the provider, same behaviour. when set in the vars.xml, the call doesn't complete and got error [incompatible destination] I think g.723 is working only in 120 ms ptime (don't know why) and from my other post >> I post an earlier topic about wrong ptime in g723. However after going into more troubleshooting, I found that FS uses only p-time 120 ms no matter what, even when calling internal extension or voice mail in FS using g.723 it uses always p-time 120 ms. The g.723 module loads fine with 30, 60, 90, and 120 ms, so I have no explanation of whats going wrong. Please Help.. Thanks Update: looking into FS source files ( mod_g723_1.c ) can't find g723.h or g729.h not in the source tree of freeswitch ... might be the problem ! I don't know -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p554... Sent from the freeswitch-users mailing list archive at Nabble.com.
we don't implement the codec because it's illegal to do so without a license. There is no .h file because the module is a stub only capable of doing passthrough unless you are entitled to the license or doing so academically without our involvement. I think you should post a debug log +siptrace of the call setup because what you are saying makes no sense, we would not choose 120 ms for no reason. console loglevel debug sofia profile internal siptrace on On Sat, Sep 18, 2010 at 7:56 PM, gamalsa <gamalsa@hotmail.com> wrote:
when setting g723_1@30i in the external sip profile of the provider, same behaviour. when set in the vars.xml, the call doesn't complete and got error [incompatible destination]
I think g.723 is working only in 120 ms ptime (don't know why)
and from my other post >>
I post an earlier topic about wrong ptime in g723. However after going into more troubleshooting, I found that FS uses only p-time 120 ms no matter what, even when calling internal extension or voice mail in FS using g.723 it uses always p-time 120 ms.
The g.723 module loads fine with 30, 60, 90, and 120 ms, so I have no explanation of whats going wrong.
Please Help..
Thanks
Update: looking into FS source files ( mod_g723_1.c ) can't find g723.h or g729.h not in the source tree of freeswitch ... might be the problem ! I don't know
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p554... Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Here is the link for the post: http://pastebin.freeswitch.org/13949 -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
NB: - g723:20 ms is included in the codec comparison! strange ! - I'm connecting from outside FS network using ext:2001 to place the call to outside FS too. - attempts from other customers gateways thro' FS gives same problem. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
The G723:20ms is the one proposed by your phone (you can see that the left part of the comparisons is always the same, it's the leg A part). As your phone does not send ptime, it means the default ptime is used, and it is 20ms. On the right part of the comparisons, you see the inbound codecs of your profile, and there, it's 120ms everywhere. I really think something is screwed in your config files. David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 20/09/2010 à 22:09, gamalsa a écrit :
NB:
- g723:20 ms is included in the codec comparison! strange ! - I'm connecting from outside FS network using ext:2001 to place the call to outside FS too. - attempts from other customers gateways thro' FS gives same problem. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
g723.1 can't have 20ms... its only multiples of 30ms. /b On Sep 20, 2010, at 3:34 PM, David Ponzone wrote:
The G723:20ms is the one proposed by your phone (you can see that the left part of the comparisons is always the same, it's the leg A part). As your phone does not send ptime, it means the default ptime is used, and it is 20ms. On the right part of the comparisons, you see the inbound codecs of your profile, and there, it's 120ms everywhere. I really think something is screwed in your config files.
when using g729 it chooses ptime 20 ms and the call goes fine. 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[G723:4:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[G729:18:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[PCMU:0:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[PCMA:8:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[GSM:3:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3915 Substituting codec G729@20i@8000h a=silenceSupp:off - - - - a=ptime:20 nothing in the config special for g723 and nothing on setting ptime 120, as u see g729 uses 20ms Fs is on freebsd 8 box, amd64 from external.xml <!----> <!-- This could be set to "passive" --> <!-- --> from vars.xml <!-- Codecs --> <X-PRE-PROCESS cmd="set" data="global_codec_prefs=G723,G729,PCMU,PCMA,GSM"/> <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G723,G729,PCMU,PCMA,GSM"/> <!-- Defaults --> <X-PRE-PROCESS cmd="set" data="use_profile=internal"/> <X-PRE-PROCESS cmd="set" data="call_debug=false"/> -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
Brian just told us you can't have 20ms with g723. It's probably why FS is choosing 120ms. Try to use 30ms. David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 20/09/2010 à 23:15, gamalsa a écrit :
when using g729 it chooses ptime 20 ms and the call goes fine.
2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[G723:4:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[G729:18:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[PCMU:0:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[PCMA:8:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3867 Audio Codec Compare [G729:18:8000:20]/[GSM:3:8000:120] 2010-09-20 14:57:21.016200 [DEBUG] sofia_glue.c:3915 Substituting codec G729@20i@8000h
a=silenceSupp:off - - - - a=ptime:20
nothing in the config special for g723 and nothing on setting ptime 120, as u see g729 uses 20ms
Fs is on freebsd 8 box, amd64
from external.xml
<!----> <!-- This could be set to "passive" -->
<!-- -->
from vars.xml <!-- Codecs --> <X-PRE-PROCESS cmd="set" data="global_codec_prefs=G723,G729,PCMU,PCMA,GSM"/> <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G723,G729,PCMU,PCMA,GSM"/> <!-- Defaults --> <X-PRE-PROCESS cmd="set" data="use_profile=internal"/> <X-PRE-PROCESS cmd="set" data="call_debug=false"/>
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi David, On 09/21/2010 05:22 AM, David Ponzone wrote:
Brian just told us you can't have 20ms with g723. It's probably why FS is choosing 120ms. Try to use 30ms. If you are just going to say things at random, without understanding the problem, it really just makes things more confusing. The other end doesn't specify a ptime. So, for G.723.1 FS should be using multiples of 30ms. It should *never* be making a comparison against G.723.1 at 20ms. Even if the far end said G.723.1 and ptime 20ms, FS should be saying that's stupid, and taking some remedial action.
Steve
The fix is to allow G723@30i /b On Sep 20, 2010, at 8:02 PM, Steve Underwood wrote:
If you are just going to say things at random, without understanding the problem, it really just makes things more confusing. The other end doesn't specify a ptime. So, for G.723.1 FS should be using multiples of 30ms. It should *never* be making a comparison against G.723.1 at 20ms. Even if the far end said G.723.1 and ptime 20ms, FS should be saying that's stupid, and taking some remedial action.
Steve
Brian I tried that too, I specifically specified g723_1@30i on the external profile, but still the problem exist.. no matter what, g723 chooses 120ms ptime. do u think it might be a bug ?? I don't know, checked every thing, looks normal and the problem remains.... -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
update to latest git HEAD. I added a patch to improve the codec negotiation in this case because it was easier than dealing with this never-ending thread....... On Mon, Sep 20, 2010 at 11:19 PM, gamalsa <gamalsa@hotmail.com> wrote:
Brian
I tried that too, I specifically specified g723_1@30i on the external profile, but still the problem exist.. no matter what, g723 chooses 120ms ptime. do u think it might be a bug ?? I don't know, checked every thing, looks normal and the problem remains....
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Anthony updated to the last git ....and horrey!!!! the problem solved .... Working now and g723 now uses ptime 30 ms as default Thanks a lot for your support... and for all of u guys ..... -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
May you please give us some useful details about your config, particularly the codec settings in vars.xml and in external.xml ? It looks like you configured your FreeSWITCH for 120ms for all codecs. Are you using latest git version ? David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 20/09/2010 à 21:25, gamalsa a écrit :
Here is the link for the post:
http://pastebin.freeswitch.org/13949 -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
also repeat the trace with the siptrace enabled for any other sip profiles involved in the call and include console output of "sofia status profile <x>" once for each profile 2010/9/20 David Ponzone <david.ponzone@ipeva.fr>:
May you please give us some useful details about your config, particularly the codec settings in vars.xml and in external.xml ? It looks like you configured your FreeSWITCH for 120ms for all codecs. Are you using latest git version ? David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.
Le 20/09/2010 à 21:25, gamalsa a écrit :
Here is the link for the post:
http://pastebin.freeswitch.org/13949 -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
The only profile involved is external profile, I hit it from IP 2.2.2.2 extension 2001 and use external GW to place the call, here is the output for sofia status external profile: sofia status profile external ================================================================================================= Name external Domain Name N/A Auto-NAT false DBName sofia_reg_external Pres Hosts Dialplan XML Context public Challenge Realm auto_to RTP-IP 1.1.1.1 Ext-RTP-IP 1.1.1.1 SIP-IP 1.1.1.1 Ext-SIP-IP 1.1.1.1 URL sip:mod_sofia@1.1.1.1:5060 BIND-URL sip:mod_sofia@1.1.1.1:5060;maddr=1.1.1.1 HOLD-MUSIC local_stream://moh OUTBOUND-PROXY N/A CODECS IN G723,G729,PCMU,PCMA,GSM CODECS OUT G723,G729,PCMU,PCMA,GSM TEL-EVENT 101 DTMF-MODE rfc2833 CNG 13 SESSION-TO 0 MAX-DIALOG 0 NOMEDIA false LATE-NEG false PROXY-MEDIA false AGGRESSIVENAT false STUN-ENABLED true STUN-AUTO-DISABLE false CALLS-IN 1 FAILED-CALLS-IN 1 CALLS-OUT 1 FAILED-CALLS-OUT 1 Registrations: ================================================================================================= Call-ID: 10305b5a3eb34746abcdca185fc69cca User: 2001@1.1.1.1 Contact: "2001" <sip:2001@2.2.2.2:53004;transport=UDP> Agent: sipLite Status: Registered(UDP)(unknown) EXP(2010-09-20 15:21:24) EXPSECS(116) Host: ssw1.xyz.com IP: 2.2.2.2 Port: 53004 Auth-User: 2001 Auth-Realm: 1.1.1.1 MWI-Account: 2001@1.1.1.1 please note that g729 is working fine and there is no special setting for g723 in the config -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/G723-Wrong-ptime-tp5543130p555... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (5)
-
Anthony Minessale
-
Brian West
-
David Ponzone
-
gamalsa
-
Steve Underwood