Also in your first example you say you set the codec preferences in vars.conf.xml to G729, but only PCMU was offered. CODECS OUT only lists PCMU on your external profile. That means you've either not reloaded mod_sofia since editing the file, or you have PCMU listed in the sip_profiles/external.xml Steve On 12 June 2012 05:13, Samira Mh <saami_mh@ymail.com> wrote:
sorry i forgot to paste codec on internal and external:
freeswitch@internal> sofia status profile internal
================================================================================================= Name internal Domain Name N/A Auto-NAT false DBName sofia_reg_internal Pres Hosts 192.168.10.70,192.168.10.70 Dialplan XML Context public Challenge Realm auto_from RTP-IP 192.168.10.70 SIP-IP 192.168.10.70 URL sip:mod_sofia@192.168.10.70:5060 BIND-URL sip:mod_sofia@192.168.10.70:5060 HOLD-MUSIC local_stream://moh OUTBOUND-PROXY N/A CODECS IN G729 CODECS OUT G729 TEL-EVENT 101 DTMF-MODE rfc2833 CNG 13 SESSION-TO 0 MAX-DIALOG 0 NOMEDIA false LATE-NEG true PROXY-MEDIA false ZRTP-PASSTHRU false AGGRESSIVENAT false STUN-ENABLED true STUN-AUTO-DISABLE false CALLS-IN 0 FAILED-CALLS-IN 0 CALLS-OUT 0 FAILED-CALLS-OUT 0 REGISTRATIONS 3
--------------------------------------------------------------------------------- freeswitch@internal> 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 192.168.10.70 Ext-RTP-IP 192.168.10.70 SIP-IP 192.168.10.70 Ext-SIP-IP 192.168.10.70 URL sip:mod_sofia@192.168.10.70:5080 BIND-URL sip:mod_sofia@192.168.10.70:5080 ;maddr=192.168.10.70 HOLD-MUSIC local_stream://moh OUTBOUND-PROXY N/A CODECS IN G729 CODECS OUT PCMU TEL-EVENT 101 DTMF-MODE rfc2833 CNG 13 SESSION-TO 0 MAX-DIALOG 0 NOMEDIA false LATE-NEG false PROXY-MEDIA false ZRTP-PASSTHRU false AGGRESSIVENAT false STUN-ENABLED true STUN-AUTO-DISABLE false CALLS-IN 0 FAILED-CALLS-IN 0 CALLS-OUT 0 FAILED-CALLS-OUT 0 REGISTRATIONS 0
------------------------------ *From:* Samira Mh <saami_mh@ymail.com>
*To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, June 12, 2012 8:36 AM
*Subject:* Re: [Freeswitch-users] how to use codec g729 on freeswitch ?
thansk for your reply, it is kind of you to help me.. please let me paste myconfigurations files here; 1-the configuration file /usr/local/freeswitch/conf/dialplan/default/001_luacallduration.xml is like this:
<include> <extension name="mainmenuvodsl">
<condition field="destination_number" expression="^(00|\+)?(\d{5}.*)$" break="never"> <action application="odbc_query" data="select cash as cashvalue from accounts where contractid like '${nibble_account}';"/> <action application="log" data="INFO The value of cashvalue is ${cashvalue}" /> <action application="lua" data="checkcash.lua ${cashvalue}" /> <action application="log" data="INFO The value of nibble_account is ${nibble_account}"/> <action application="log" data="INFO The value of nibble_rate [before] is ${nibble_rate}"/> <!-- RateList Context --> <action application="lua" data="checkzeroplus.lua ${destination_number:0:2} ${destination_number:0:1}" /> <action application="execute_extension" data="${destination_number} XML ratelist"/> <action application="log" data="INFO The value of nibble_rate [after] is ${nibble_rate}"/> <!-- Check Nibble_rate --> <action application="lua" data="checknibblerate.lua ${nibble_rate}" /> <action application="set" data="divvalue=${expr(floor((${cashvalue}/${nibble_rate}))}" /> <action application="set" data="modvalue=${expr(mod(${cashvalue},${nibble_rate}))}" /> <action application="lua" data="checktime.lua ${divvalue} ${modvalue}" /> <!-- Check ZeroZero , Plus --> <action application="lua" data="checkzeroplus.lua ${destination_number:0:2} ${destination_number:0:1}" /> <!-- Making Calls --> <action application="odbc_query" data="select callerid as effective_caller_id_number from accounts where contractid like '${nibble_account}';"/> <action application="log" data="INFO callerid for Outbound calls ${effective_caller_id_number}"/> <!-- <action application="set" data="ignore_early_media=true"/> <action application="answer"/> --> <action application="enable_heartbeat"/>
<!-- <param name="disable-transcoding" value="true"/> --> <!-- <action application="export" data="nolocal:absolute_codec_string=G729,PCMU"/> --> <!-- <action application="set" data="bridge_early_media=true"/> --> <!-- <action application="set" data="proxy_media=true"/> --> <action application="bridge" data="sofia/gateway/cisco/140112${destination_number}"/> <!-- <action application="bridge" data="sofia/gateway/mainasterisk/${destination_number}"/> --> <!-- <action application="bridge" data="sofia/gateway/test/${destination_number}"/> --> </condition>
</extension> </include>
2-yes, i have enabled "inbound-late-negotiation" in the (/usr/local/freeswitch/conf/sip_profiles/internal.xml) as follow: <param name="inbound-late-negotiation" value="true"/>
3-the issue of sofia status: external::cisco gateway sip:register:false@85.15.0.154 NOREG
4-also , the configuration file for codecs are as follow :/usr/local/freeswitch/conf/vars.xml
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=G729,PCMU,PCMA,G7221@32000h,G7221@16000h ,G722,GSM"/>
<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G729"/>
5- the mod_g729 was loaded
6-i have enabled the siptrace: sofia profile external siptrace on: the siptrace outpout as follow:
send 1042 bytes to udp/[85.15.0.154]:5060 at 03:53:07.448136: ------------------------------------------------------------------------ INVITE sip:140112971507247227@85.15.0.154 SIP/2.0 Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS Max-Forwards: 69 From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD To: <sip:140112971507247227@85.15.0.154> Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9 CSeq: 29400529 INVITE Contact: <sip:gw+cisco@192.168.10.70:5080;transport=udp;gw=cisco> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY Supported: timer, precondition, path, replaces Allow-Events: talk, hold, refer Content-Type: application/sdp Content-Disposition: session Content-Length: 234 X-FS-Support: update_display,send_info Remote-Party-ID: "1000" <sip:1000@85.15.0.154
;party=calling;screen=yes;privacy=off
v=0 o=FreeSWITCH 1339446571 1339446572 IN IP4 192.168.10.70 s=FreeSWITCH c=IN IP4 192.168.10.70 t=0 0 m=audio 26616 RTP/AVP 9 0 8 18 3 101 13 a=fmtp:18 annexb=yes a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 ------------------------------------------------------------------------ recv 410 bytes from udp/[85.15.0.154]:5060 at 03:53:07.463921: ------------------------------------------------------------------------ SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD To: <sip:140112971507247227@85.15.0.154>;tag=45785134-1BDE Date: Tue, 12 Jun 2012 03:53:15 GMT Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9 Server: Cisco-SIPGateway/IOS-12.x CSeq: 29400529 INVITE Allow-Events: telephone-event Content-Length: 0
------------------------------------------------------------------------ recv 927 bytes from udp/[85.15.0.154]:5060 at 03:53:11.004804: ------------------------------------------------------------------------ SIP/2.0 183 Session Progress Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD To: <sip:140112971507247227@85.15.0.154>;tag=45785134-1BDE Date: Tue, 12 Jun 2012 03:53:15 GMT Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9 Server: Cisco-SIPGateway/IOS-12.x CSeq: 29400529 INVITE Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER Allow-Events: telephone-event Contact: <sip:140112971507247227@85.15.0.154:5060> Content-Disposition: session;handling=required Content-Type: application/sdp Content-Length: 268
v=0 o=CiscoSystemsSIP-GW-UserAgent 7252 5649 IN IP4 85.15.0.154 s=SIP Call c=IN IP4 85.15.0.154 t=0 0 m=audio 18218 RTP/AVP 0 13 101 c=IN IP4 85.15.0.154 a=rtpmap:0 PCMU/8000 a=rtpmap:13 CN/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:20 ------------------------------------------------------------------------ recv 425 bytes from udp/[85.15.0.154]:5060 at 03:53:11.005144: ------------------------------------------------------------------------ SIP/2.0 500 Internal Server Error Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD To: <sip:140112971507247227@85.15.0.154>;tag=45785134-1BDE Date: Tue, 12 Jun 2012 03:53:15 GMT Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9 Server: Cisco-SIPGateway/IOS-12.x CSeq: 29400529 INVITE Allow-Events: telephone-event Content-Length: 0
------------------------------------------------------------------------ send 350 bytes to udp/[85.15.0.154]:5060 at 03:53:11.005333: ------------------------------------------------------------------------ ACK sip:140112971507247227@85.15.0.154 SIP/2.0 Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS Max-Forwards: 69 From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD To: <sip:140112971507247227@85.15.0.154>;tag=45785134-1BDE Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9 CSeq: 29400529 ACK Content-Length: 0
------------------------------------------------------------------------------------------------------------------ when change the configuration file the below: <X-PRE-PROCESS cmd="set" data="global_codec_prefs=G729"/> <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G729"/>
the siptrace is like this:
send 1034 bytes to udp/[85.15.0.154]:5060 at 04:01:16.202342: ------------------------------------------------------------------------ INVITE sip:140112971507247227@85.15.0.154 SIP/2.0 Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bKpBa558yUmp0UK Max-Forwards: 69 From: "1000" <sip:register:false@85.15.0.154>;tag=Na0S1Q9mNmS1r To: <sip:140112971507247227@85.15.0.154> Call-ID: 196eea77-2ee6-1230-789e-0050569414f9 CSeq: 29400774 INVITE Contact: <sip:gw+cisco@192.168.10.70:5080;transport=udp;gw=cisco> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY Supported: timer, precondition, path, replaces Allow-Events: talk, hold, refer Content-Type: application/sdp Content-Disposition: session Content-Length: 226 X-FS-Support: update_display,send_info Remote-Party-ID: "1000" <sip:1000@85.15.0.154
;party=calling;screen=yes;privacy=off
v=0 o=FreeSWITCH 1339447862 1339447863 IN IP4 192.168.10.70 s=FreeSWITCH c=IN IP4 192.168.10.70 t=0 0 m=audio 25814 RTP/AVP 18 101 13 a=fmtp:18 annexb=yes a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 ------------------------------------------------------------------------ recv 423 bytes from udp/[85.15.0.154]:5060 at 04:01:16.208118: ------------------------------------------------------------------------ SIP/2.0 488 Not Acceptable Media Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bKpBa558yUmp0UK From: "1000" <sip:register:false@85.15.0.154>;tag=Na0S1Q9mNmS1r To: <sip:140112971507247227@85.15.0.154>;tag=457FC664-6A6 Date: Tue, 12 Jun 2012 04:01:24 GMT Call-ID: 196eea77-2ee6-1230-789e-0050569414f9 Server: Cisco-SIPGateway/IOS-12.x CSeq: 29400774 INVITE Allow-Events: telephone-event Content-Length: 0
------------------------------------------------------------------------ send 349 bytes to udp/[85.15.0.154]:5060 at 04:01:16.208201: ------------------------------------------------------------------------ ACK sip:140112971507247227@85.15.0.154 SIP/2.0 Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bKpBa558yUmp0UK Max-Forwards: 69 From: "1000" <sip:register:false@85.15.0.154>;tag=Na0S1Q9mNmS1r To: <sip:140112971507247227@85.15.0.154>;tag=457FC664-6A6 Call-ID: 196eea77-2ee6-1230-789e-0050569414f9 CSeq: 29400774 ACK Content-Length: 0
plz help,thanks so much
------------------------------ *From:* Paul Cupis <paul@cupis.co.uk> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Monday, June 11, 2012 10:51 PM *Subject:* Re: [Freeswitch-users] how to use codec g729 on freeswitch ?
On 11/06/12 17:54, Samira Mh wrote:
i want to bridge call using my VOIPgateway so that making calls to another countries.. but the carrier only support G729 codec and the FS send G722 (set in vars.xml) to myVoipGateway that is set as an gateway in /usr/local/freeswitch/sip-profile/external/ and when FS send media to Gateway(using bridge application) the error occure:unacceptable media,then check VOIPGW and find out the only codec that can be pass through VOIPgw is G729, but FS only send G711,G722,... not G729
Can you provide a SIP or FreeSWITCH trace of a call, please?
Do you have the following enabled in your SIP profile?
<param name="inbound-late-negotiation" value="true"/>
Do you have mod_g729 loaded and codec G729 enabled in your vars.xml?
Regards,
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org 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
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org 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
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org 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
Join Us At ClueCon - Aug 7-9, 2012
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