<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">thansk for your reply,</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">it is kind of you to help me..</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">please let me paste myconfigurations files here;</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">1-the configuration file /usr/local/freeswitch/conf/dialplan/default/001_luacallduration.xml is like this:</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div><div><include></div><div> <extension name="mainmenuvodsl"></div><div><br></div><div>
<condition field="destination_number" expression="^(00|\+)?(\d{5}.*)$" break="never"></div><div> <action application="odbc_query" data="select cash as cashvalue from accounts where contractid like '${nibble_account}';"/></div><div> <action application="log" data="INFO The value of cashvalue is ${cashvalue}" /><br></div><div> <action application="lua" data="checkcash.lua ${cashvalue}" /><br></div><div> <action application="log" data="INFO The value of nibble_account is ${nibble_account}"/></div><div> <action application="log" data="INFO The value of nibble_rate [before] is ${nibble_rate}"/></div><div>
<!-- RateList Context --></div><div> <action application="lua" data="checkzeroplus.lua ${destination_number:0:2} ${destination_number:0:1}" /></div><div> <action application="execute_extension" data="${destination_number} XML ratelist"/></div><div> <action application="log" data="INFO The value of nibble_rate [after] is ${nibble_rate}"/></div><div> <!-- Check Nibble_rate --></div><div> <action application="lua" data="checknibblerate.lua ${nibble_rate}" /></div><div> <action application="set"
data="divvalue=${expr(floor((${cashvalue}/${nibble_rate}))}" /></div><div> <action application="set" data="modvalue=${expr(mod(${cashvalue},${nibble_rate}))}" /></div><div> <action application="lua" data="checktime.lua ${divvalue} ${modvalue}" /></div><div> <!-- Check ZeroZero , Plus --></div><div> <action application="lua" data="checkzeroplus.lua ${destination_number:0:2} ${destination_number:0:1}" /> </div><div> <!-- Making Calls --></div><div> <action application="odbc_query" data="select callerid as effective_caller_id_number from
accounts where contractid like '${nibble_account}';"/></div><div> <action application="log" data="INFO callerid for Outbound calls ${effective_caller_id_number}"/></div><div> <!-- <action application="set" data="ignore_early_media=true"/></div><div> <action application="answer"/> --></div><div> <action application="enable_heartbeat"/></div><div> </div><div><!-- <param name="disable-transcoding" value="true"/> --></div><div> <!-- <action application="export" data="nolocal:absolute_codec_string=G729,PCMU"/> --></div><div><!-- <action application="set"
data="bridge_early_media=true"/> --></div><div> <!-- <action application="set" data="proxy_media=true"/> --></div><div> <action application="bridge" data="sofia/gateway/cisco/140112${destination_number}"/><br></div><div> <!-- <action application="bridge" data="sofia/gateway/mainasterisk/${destination_number}"/> --></div><div><!-- <action application="bridge" data="sofia/gateway/test/${destination_number}"/> --></div><div> </condition></div><div><br></div><div> </extension></div><div></include></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div></div><div>2-yes, i have enabled "inbound-late-negotiation" in the
(/usr/local/freeswitch/conf/sip_profiles/internal.xml) as follow:</div><div> <param name="inbound-late-negotiation" value="true"/><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">3-the issue of sofia status:</div><div> external::cisco gateway sip:register:false@85.15.0.154 NOREG<br></div><div><br></div><div><br></div><div>4-also , the configuration file for codecs are as follow</div><div>:/usr/local/freeswitch/conf/vars.xml</div><div><br></div><div><div><X-PRE-PROCESS cmd="set"
data="global_codec_prefs=G729,PCMU,PCMA,G7221@32000h,G7221@16000h,G722,GSM"/> </div><div><br></div></div><div><div><X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G729"/></div><div><br></div><div>5- the mod_g729 was loaded </div><div><br></div><div>6-i have enabled the siptrace:</div><div> sofia profile external siptrace on:<br></div><div><span style="background-color: rgb(255, 255, 0);">the siptrace outpout as follow:</span></div><div><br></div><div><div><div>send 1042 bytes to udp/[85.15.0.154]:5060 at 03:53:07.448136:</div><div> ------------------------------------------------------------------------</div><div> INVITE sip:140112971507247227@85.15.0.154 SIP/2.0</div><div> Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS</div><div> Max-Forwards: 69</div><div> From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD</div><div>
To: <sip:140112971507247227@85.15.0.154></div><div> Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9</div><div> CSeq: 29400529 INVITE</div><div> Contact: <sip:gw+cisco@192.168.10.70:5080;transport=udp;gw=cisco></div><div> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY</div><div> Supported: timer, precondition, path, replaces</div><div> Allow-Events: talk, hold, refer</div><div> Content-Type: application/sdp</div><div> Content-Disposition: session</div><div> Content-Length: 234</div><div> X-FS-Support: update_display,send_info</div><div> Remote-Party-ID: "1000" <sip:1000@85.15.0.154>;party=calling;screen=yes;privacy=off</div><div><br></div><div> v=0</div><div> o=FreeSWITCH
1339446571 1339446572 IN IP4 192.168.10.70</div><div> s=FreeSWITCH</div><div> c=IN IP4 192.168.10.70</div><div> t=0 0</div><div> m=audio 26616 RTP/AVP 9 0 8 18 3 101 13</div><div> a=fmtp:18 annexb=yes</div><div> a=rtpmap:101 telephone-event/8000</div><div> a=fmtp:101 0-16</div><div> a=ptime:20</div><div> ------------------------------------------------------------------------</div><div>recv 410 bytes from udp/[85.15.0.154]:5060 at 03:53:07.463921:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 100 Trying</div><div> Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS</div><div> From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD</div><div> To:
<sip:140112971507247227@85.15.0.154>;tag=45785134-1BDE</div><div> Date: Tue, 12 Jun 2012 03:53:15 GMT</div><div> Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9</div><div> Server: Cisco-SIPGateway/IOS-12.x</div><div> CSeq: 29400529 INVITE</div><div> Allow-Events: telephone-event</div><div> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</div><div>recv 927 bytes from udp/[85.15.0.154]:5060 at 03:53:11.004804:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 183 Session Progress</div><div> Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS</div><div> From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD</div><div> To:
<sip:140112971507247227@85.15.0.154>;tag=45785134-1BDE</div><div> Date: Tue, 12 Jun 2012 03:53:15 GMT</div><div> Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9</div><div> Server: Cisco-SIPGateway/IOS-12.x</div><div> CSeq: 29400529 INVITE</div><div> Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER</div><div> Allow-Events: telephone-event</div><div> Contact: <sip:140112971507247227@85.15.0.154:5060></div><div> Content-Disposition: session;handling=required</div><div> Content-Type: application/sdp</div><div> Content-Length: 268</div><div><br></div><div> v=0</div><div> o=CiscoSystemsSIP-GW-UserAgent 7252 5649 IN IP4 85.15.0.154</div><div> s=SIP Call</div><div> c=IN IP4 85.15.0.154</div><div> t=0 0</div><div>
m=audio 18218 RTP/AVP 0 13 101</div><div> c=IN IP4 85.15.0.154</div><div> a=rtpmap:0 PCMU/8000</div><div> a=rtpmap:13 CN/8000</div><div> a=rtpmap:101 telephone-event/8000</div><div> a=fmtp:101 0-15</div><div> a=ptime:20</div><div> ------------------------------------------------------------------------</div><div>recv 425 bytes from udp/[85.15.0.154]:5060 at 03:53:11.005144:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 500 Internal Server Error</div><div> Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS</div><div> From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD</div><div> To: <sip:140112971507247227@85.15.0.154>;tag=45785134-1BDE</div><div> Date: Tue, 12 Jun 2012 03:53:15
GMT</div><div> Call-ID: f61cf067-2ee4-1230-0cad-0050569414f9</div><div> Server: Cisco-SIPGateway/IOS-12.x</div><div> CSeq: 29400529 INVITE</div><div> Allow-Events: telephone-event</div><div> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</div><div>send 350 bytes to udp/[85.15.0.154]:5060 at 03:53:11.005333:</div><div> ------------------------------------------------------------------------</div><div> ACK sip:140112971507247227@85.15.0.154 SIP/2.0</div><div> Via: SIP/2.0/UDP 192.168.10.70:5080;rport;branch=z9hG4bK7vFUZrQK2r8NS</div><div> Max-Forwards: 69</div><div> From: "1000" <sip:register:false@85.15.0.154>;tag=62QN1XNSF6rvD</div><div> To: <sip:140112971507247227@85.15.0.154>;tag=45785134-1BDE</div><div> Call-ID:
f61cf067-2ee4-1230-0cad-0050569414f9</div><div> CSeq: 29400529 ACK</div><div> Content-Length: 0</div><div><br></div></div></div><div><br></div><div>------------------------------------------------------------------------------------------------------------------</div><div><span style="background-color: rgb(255, 255, 0);">when change the configuration file the below:</span></div><div><div><X-PRE-PROCESS cmd="set" data="global_codec_prefs=G729"/></div><div><X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G729"/> <br></div></div><div><br></div><div>the siptrace is like this:</div><div><br></div><div><div>send 1034 bytes to udp/[85.15.0.154]:5060 at 04:01:16.202342:</div><div> ------------------------------------------------------------------------</div><div> INVITE sip:140112971507247227@85.15.0.154 SIP/2.0</div><div> Via: SIP/2.0/UDP
192.168.10.70:5080;rport;branch=z9hG4bKpBa558yUmp0UK</div><div> Max-Forwards: 69</div><div> From: "1000" <sip:register:false@85.15.0.154>;tag=Na0S1Q9mNmS1r</div><div> To: <sip:140112971507247227@85.15.0.154></div><div> Call-ID: 196eea77-2ee6-1230-789e-0050569414f9</div><div> CSeq: 29400774 INVITE</div><div> Contact: <sip:gw+cisco@192.168.10.70:5080;transport=udp;gw=cisco></div><div> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY</div><div> Supported: timer, precondition, path, replaces</div><div> Allow-Events: talk, hold, refer</div><div> Content-Type: application/sdp</div><div> Content-Disposition: session</div><div> Content-Length: 226</div><div> X-FS-Support:
update_display,send_info</div><div> Remote-Party-ID: "1000" <sip:1000@85.15.0.154>;party=calling;screen=yes;privacy=off</div><div><br></div><div> v=0</div><div> o=FreeSWITCH 1339447862 1339447863 IN IP4 192.168.10.70</div><div> s=FreeSWITCH</div><div> c=IN IP4 192.168.10.70</div><div> t=0 0</div><div> m=audio 25814 RTP/AVP 18 101 13</div><div> a=fmtp:18 annexb=yes</div><div> a=rtpmap:101 telephone-event/8000</div><div> a=fmtp:101 0-16</div><div> a=ptime:20</div><div> ------------------------------------------------------------------------</div><div>recv 423 bytes from udp/[85.15.0.154]:5060 at 04:01:16.208118:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 488 Not Acceptable Media</div><div> Via: SIP/2.0/UDP
192.168.10.70:5080;rport;branch=z9hG4bKpBa558yUmp0UK</div><div> From: "1000" <sip:register:false@85.15.0.154>;tag=Na0S1Q9mNmS1r</div><div> To: <sip:140112971507247227@85.15.0.154>;tag=457FC664-6A6</div><div> Date: Tue, 12 Jun 2012 04:01:24 GMT</div><div> Call-ID: 196eea77-2ee6-1230-789e-0050569414f9</div><div> Server: Cisco-SIPGateway/IOS-12.x</div><div> CSeq: 29400774 INVITE</div><div> Allow-Events: telephone-event</div><div> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</div><div>send 349 bytes to udp/[85.15.0.154]:5060 at 04:01:16.208201:</div><div> ------------------------------------------------------------------------</div><div> ACK sip:140112971507247227@85.15.0.154 SIP/2.0</div><div> Via: SIP/2.0/UDP
192.168.10.70:5080;rport;branch=z9hG4bKpBa558yUmp0UK</div><div> Max-Forwards: 69</div><div> From: "1000" <sip:register:false@85.15.0.154>;tag=Na0S1Q9mNmS1r</div><div> To: <sip:140112971507247227@85.15.0.154>;tag=457FC664-6A6</div><div> Call-ID: 196eea77-2ee6-1230-789e-0050569414f9</div><div> CSeq: 29400774 ACK</div><div> Content-Length: 0</div><div><br></div></div><div><br></div><div><br></div><div>plz help,thanks so much</div><div><br></div><div><br></div></div> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Paul Cupis <paul@cupis.co.uk><br> <b><span style="font-weight: bold;">To:</span></b> FreeSWITCH Users Help
<freeswitch-users@lists.freeswitch.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, June 11, 2012 10:51 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] how to use codec g729 on freeswitch ?<br> </font> </div> <br>
On 11/06/12 17:54, Samira Mh wrote:<br>> i want to bridge call using my VOIPgateway so that making calls to<br>> another countries..<br>> but the carrier only support G729 codec and the FS send G722 (set in<br>> vars.xml) to myVoipGateway that is set as an gateway in<br>> /usr/local/freeswitch/sip-profile/external/<br>> and when FS send media to Gateway(using bridge application) the error<br>> occure:unacceptable media,then check VOIPGW and find out the only codec<br>> that<br>> can be pass through VOIPgw is G729, but FS only send G711,G722,... not G729<br><br>Can you provide a SIP or FreeSWITCH trace of a call, please?<br><br>Do you have the following enabled in your SIP profile?<br><br> <param name="inbound-late-negotiation" value="true"/><br><br>Do you have mod_g729 loaded and codec G729 enabled in your
vars.xml?<br><br>Regards,<br><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>Join Us At ClueCon - Aug 7-9, 2012<br><br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><br><br> </div> </div> </div></body></html>