Freeswitch: transfer b-leg to survey extension after a-leg hangs up - survey

Due to Freeswitch documentation hangup_after_bridge=false means to continue with dialplan when B-leg terminates the call (ext. 180 in this case), but this dialplan fails to transfer A-leg to ext. 913
<extension name="180" continue="false" uuid="d0667b02-b3b8-40e4-a034-edf1ad4850fa">
<condition field="destination_number" expression="^(180)$">
<action application="export" data="call_direction=inbound" inline="true"></action>
<action application="set" data="domain_uuid=368fc039-4fc4-43f1-ac24-2d673dedd18f" inline="true"></action>
<action application="set" data="domain_name=sirhan.sip.sirhan.com" inline="true"></action>
<action application="set" data="hangup_after_bridge=false"></action>
<action application="set" data="continue_on_fail=true"></action>
<action application="transfer" data="180 XML silah.sip.silah.com.sa"></action>
<action application="transfer" data="913 XML silah.sip.silah.com.sa"></action>
</condition>
</extension>

Related

freeswitch dialplan condition not working

I am trying to understand db module.
Here is my dialplan for testing.
Here issue is that my condition is not working. Without condition its working fine.
Anyone please guide that how can i get this working ?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="dialplan" description="Test Dialplan">
<context name="default">
<extension name="919824012345">
<condition field="destination_number" expression="919824012345">
<action application="set" data="effective_destination_number=919824012345"/>
<action application="set" data="bridge_pre_execute_bleg_app=sched_hangup"/>
<action application="set" data="bridge_pre_execute_bleg_data=+6000 normal_clearing"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=TRUE"/>
<action application="set" data="call_processed=internal"/>
<action application="set" data="call_direction=outbound"/>
<action application="set" data="accountname=default"/>
<action application="set" data="origination_rates=ID:2|CODE:^91.*|DESTINATION:|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|CT:|COST:0.20000|INC:60|INITIALBLOCK:1|RATEGROUP:1|MARKUP:0|CI:0|ACCID:24"/>
<action application="set" data="original_caller_id_name=919426223273"/>
<action application="set" data="original_caller_id_number=919824012345"/>
<action application="limit" data="db 24 user_24 1 !SWITCH_CONGESTION"/>
<condition field="${db(exists/realm/account_24)}" expression="^true$"/>
<condition field="${db(select/realm/account_24)}" expression="4"/>
<action application="set" data="var=${db(select/realm/account_24)}"/>
<action application="db" data="insert/realm/account_24/$${var}+1"/>
<anti-action application="hangup" data="${originate_disposition}"/>
</condition>
<anti-action application="db" data="insert/realm/account_24/1"/>
<action application="set" data="execute_on_anwer=transfer OUTBOUNDSERVICE XML default"/>
</condition>
<action application="bridge" data="[leg_timeout=30,absolute_codec_string=^^:PCMA:G729:PCMA]sofia/gateway/mygateway/919824012345"/>
</condition>
</extension>
</context>
</section>
</document>
I would like to achieve below
if exists account_24 then select the value of account_24 key.
If its value 4 or smaller then continue the call and add one more count.
If its value 4 then hangup call.
Once the call will be completed decrease its count up to 0.
In simple language, Count management to know how many calls are running for the customer. It should not more than assign to the customer.
Please, Let me know if required any more helps.

freeswitch recordings during IVR

in last version of freeswitch i got a problem - on stereo records during ivr some noice presnt in b-channel. dialplan:
<extension name="91:1">
<condition field="destination_number" expression="^1203$" require-nested="false">
<action application="export" data="dialed_extension=1203"/>
<action application="set" data="hangup_after_bridge=false"/>
<action application="set" data="session_in_hangup_hook=true"/>
<action application="set" data="RECORD_STEREO=true"/>
<action application="set" data="record_name=$${recordings_dir_tmp}/${strftime(%Y-%m-%d)}/${caller_id_number}.${dialed_extension}.${call_uuid}.wav" />
<action application="record_session" data="${record_name}"/>
<action application="set" data="execute_on_answer=python detect_gp ${record_name}"/>
<action application="set" data="ivr_menu_terminator=*"/>
<action application="ivr" data="91:1"/>
<action application="playback" data="/etc/freeswitch/moh/moh" />
<action application="hangup"/>
</condition>
</extension>
wav file left channel
how i can resolve this problem?
Receiving out of band DTMF (RFC2833 telephone event 101) can interfere with recording. You will get silent spots instead of tones. That might explain why your recording sounds like the audio cuts out or packet loss.

Why onference_auto_outcall_flags doesn't work

I have the following configuration in my dialplan:
<extension name="conference_set_auto_outcall">
<condition field="destination_number" expression="^ds_(.*);(.*);(.*);(.*)$">
<action application="answer"/>
<action application="set" data="conference_auto_outcall_flags=mute"/>
<action application="set" data="conference_auto_outcall_caller_id_name=$${effective_caller_id_name}"/>
<action application="set" data="conference_auto_outcall_caller_id_number=$${effective_caller_id_number}"/>
<action application="set" data="conference_auto_outcall_profile=default"/>
<action application="set" data="conference_auto_outcall_prefix={sip_auto_answer=true,execute_on_answer_1='start_dtmf_generate',execute_on_answer_2='send_dtmf $4'}"/>
<action application="conference_set_auto_outcall" data="{ignore_early_media=true}sofia/gateway/$2/$3"/>
<action application="conference" data="$1+flags{moderator|mute}"/>
</condition>
</extension>
I need to set flags to the members that are joined to the conference by the auto call. Unfortunately none of the flags I set in conference_auto_outcall_flags is propagated to the members. I can hear the called member and
show channels
in fs_cli shows the following information among other staff:
1946#default+flags{}
e.g. flags aren't assigned.
FreeSwitch version 1.6.6
What can be wrong?
FreeSWITCH wiki seems to be outdated. In 1.6.6 source codes the parameter is called
conference_utils_auto_outcall_flags
so the flags need to be specified as
<action application="set" data="conference_utils_auto_outcall_flags=mute"/>

The js files from skin directory not loading in Magento

I am trying to use the magento for ecommerce.
In that i just added some js file which are held on the skin\frontend\default\mytheme\js.
This is my code:
<block type="page/html_head" name="head" as="head">
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>lib/ccard.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>scriptaculous/builder.js</script></action>
<action method="addJs"><script>scriptaculous/effects.js</script></action>
<action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
<action method="addJs"><script>scriptaculous/controls.js</script></action>
<action method="addJs"><script>scriptaculous/slider.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>
<action method="addJs"><script>varien/form.js</script></action>
<action method="addJs"><script>varien/menu.js</script></action>
<action method="addJs"><script>mage/translate.js</script></action>
<action method="addJs"><script>mage/cookies.js</script></action>
<action method="addJs"><script>jscommon/jquery.min.js</script></action>
<block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
<action method="addCss"><stylesheet>css/styles_default.css</stylesheet></action>
<action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
<action method="addCss"><stylesheet>css/style.css</stylesheet></action>
<action method="addCss"><stylesheet>css/dd.css</stylesheet></action>
<action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
<action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
<action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
<action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
<action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
<action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
<!-- <action method="addItem"><type>skin_js</type><name>js/jquery.js</name></action> -->
<action method="addItem"><type>skin_js</type><name>js/jquery.min.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/jqueryNoConf.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/jquery.anythingslider.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/jquery.dd.js</name></action>
<action method="addItem"><type>skin_css</type><name>css/anythingslider.css</name></action>
<!--<action method="addItem"><type>skin_js</type><name>js/scripts.js</name></action>-->
</block>
But from this line <action method="addItem"><type>skin_js</type><name>js/jquery.min.js</name></action> nothing will be loaded in browser. Nothing means even the script loading url not coming...
The code wrote in the page.xml from C:\wamp\www\theme\app\design\frontend\default\biomatrix\template\layout
What is teh problem in my code.
How can i solve this?
You have mentioned that you have kept js files in skin\frontend\default\mytheme\js path.
and you are writing code in page.xml placed in C:\wamp\www\theme\app\design\frontend**default\biomatrix**\template\layout folder
Try to create a path in the root js folder and create a folder like prototype , lib or mage
and call it with
<action method="addJs"><script>your folder/yourjs.js</script></action>

Call faliure: invalid number format (Zoiper Communicator)

Hi I'm working with freeswitch, in my dialplan I have this extension:
<extension name="uk_maxadie_8">
<condition field="destination_number" expression="^447589800001$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
<action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
<action application="set" data="accountcode=aphroditel"/>
<action application="bridge" data="sofia/external/radio#didx.net"/>
</condition>
</extension>
And then from my softphone(Zoiper) I call to the "destination_number" 447589800001 but I get this error message: Call faliure: invalid(incomplete) number format.
I have another extensions where the destination_number are also 12 units long, so i don't know what i did wrong. Any idea?
Thanks!

Resources