How can free switch initiate a conference by a scheduled time - sip

I've tried to set up conference call using asterisk & free switch as well where my SIP soft phone is XLite. I'm able to do conference using both asterisk & free switch with XLite. Now i'm trying the reverse way that instead of endpoints start the conference,let free switch it self to start a conference at a scheduled time.
As per the research i've done I've wrote a dialplan file to make it work out.
These are some application & API which is useful for my idea,
minute-of-day --> for scheduling a task at a perticular time
conference_set_auto_outcall --> for calling endpoints to join a conference
I've added the below to default.xml of dialplan
<extension name = "scheduling" >
<! -- condition is every day at 10 am start conference-->
<condition minute-of-day= "600">
<!-- do conference as action -->
<!--condition field="destination_number" expression="^(3000)$"-->
<action application="answer"/>
<action application="set" data="conference_auto_outcall_timeout=5"/>
<action application="set" data="conference_auto_outcall_flags=none"/>
<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"/>
<!-- called to my detsination -->
<action application="conference_set_auto_outcall" data="user/1001#$${domain}"/>
<action application="conference_set_auto_outcall" data="user/1002#$${domain}"/>
<action application="conference_set_auto_outcall" data="user/1003#$${domain}"/>
<action application="conference" data="$1#default"/>
</condition>
</extension>
I'm not able to find out why it's not working ?
atleast some actions it should perform at the scheduled time.
After my changes i've reloaded the xml as well in the below way
start fc_cli & then run reloadxml command

The dialplan extension, and therefore the time-routing condition, will not run on it's own. It has to be called, so unless there is a call transversing the dialplan and triggering that 'scheduling' extension, it will not work. Probably the best way to go about this would be to use the originate command to call the users and then bridge them into the conference:
fs_cli -x "originate sofia/internal/1000#$${domain} &conference($1#default)"
fs_cli -x "originate sofia/internal/1001#$${domain} &conference($1#default)"
fs_cli -x "originate sofia/internal/1002#$${domain} &conference($1#default)"
You can put this on a cron to run on the time you want and it should accomplish what you are trying to do above.

Related

Consistent AutoHotkey crashes

all
I've been using AutoHotkey to perform a number of batch processes at work. It's going pretty well, but I keep running into an issue. The scripts (more than one, doing very different things) will all crash after about 4 hours of running. It's pretty consistent with the time, but only kind of consistent with the location in the program where it's running.
I'm not getting an error message. The script will just stop, and when I try to open it up to see the last line, the program closes without any info.
I know it's vague, but any ideas what may be happening?
Edit: added Event Viewer data. Two other crash events were almost identical.
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-10-11T04:20:51.000000000Z" />
<EventRecordID>11519</EventRecordID>
<Channel>Application</Channel>
<Computer>My Computer</Computer>
<Security />
</System>
- <EventData>
<Data>CDR to CGM-PDF 3-0-1.exe</Data>
<Data>1.1.11.2</Data>
<Data>51f4589f</Data>
<Data>CDR to CGM-PDF 3-0-1.exe</Data>
<Data>1.1.11.2</Data>
<Data>51f4589f</Data>
<Data>c00000fd</Data>
<Data>00000000000ca117</Data>
<Data>1c44</Data>
<Data>01cec61d2e612892</Data>
<Data>C:\CDR to CGM-PDF 3-0-1.exe</Data>
<Data>C:\CDR to CGM-PDF 3-0-1.exe</Data>
<Data>82958232-322c-11e3-ab1f-d067e5491d83</Data>
</EventData>
</Event>

Control Scheduling in JasperReports Server

I want to prevent normal users from scheduling a report.
Only administrator will have the right to schedule report.
Is it possible with JasperReports Server?
Yes, it is possible.
You should edit the jasperserver\WEB-INF\actionModel-search.xml file.
You need to find the definition of ScheduleAction action in this file and add the condition for the ROLE_ADMINISTRATOR role:
<context name="resource_menu">
<simpleAction labelKey="RM_BUTTON_RUN" action="invokeRedirectAction" actionArgs="RunResourceAction"
clientTest="canBeRun" className="up"/>
<condition test="isSupportedDevice">
<simpleAction labelKey="RM_BUTTON_RUN_IN_BACKGROUND" action="invokeRedirectAction" actionArgs="RunInBackgroundResourceAction"
clientTest="canBeRunInBackground" className="up"/>
<condition test="checkAuthenticationRoles" testArgs="ROLE_ADMINISTRATOR">
<simpleAction labelKey="RM_BUTTON_SCHEDULE_REPORT" action="invokeRedirectAction" actionArgs="ScheduleAction"
clientTest="canBeScheduled" className="up"/>
</condition>
<simpleAction labelKey="RM_BUTTON_WIZARD" action="invokeRedirectAction" actionArgs="EditResourceAction"
clientTest="canResourceBeEdited" className="up"/>
</condition>
I've just add the <condition test="checkAuthenticationRoles" testArgs="ROLE_ADMINISTRATOR"> for the ScheduleAction action.
After that you should restart the application server (Tomcat).

How to use Custom Action for Condition?

I need to check if some service already installed in system before continue installation.
I.e. I have added
<Condition Message="Svc must be installed">
Installed OR SVC_V1
</Condition>
But I can check if it is installed only by using Custom Action because Svc is Windows Service. How I can use CA for this condition?
Custom Actions set properties that then can be used to evaluate a condition.
Actually you don't need custom action for detecting your service. Services get registered under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ so you can use RegistrySearch:
<Property Id="SVC_V1">
<RegistrySearch Id='RegSampleService'
Type='raw'
Root='HKLM'
Name='ImagePath'
Key="SYSTEM\CurrentControlSet\services\YourService" />
</Property>
Note however that Registry read permissions are required.

jBPM 4.3 Task Notification tag being ignored

I have a task with a notification entry but no emails are being generated and no entries in logs. Emails from mail node work fine. What am I doing wrong? Do I have to do anything special to my custom AssignmentHandler impl for notifications?
<mail g="216,156,80,40" name="Send email">
<to addresses="kevinmoodley#gmail.com" />
<subject>Testing the mail activity</subject>
<text>This message was sent by the jBPM mail activity tester</text>
<transition g="-78,-18" to="User Review" />
</mail>
<task g="210,250,92,52" name="User Review">
<description>User Review Task Description</description>
<assignment-handler
class="com.kevinmoodley.BPMTaskAssignmentHandler">
<description>Review AI Process Failure Assignment Handler</description>
</assignment-handler>
<notification>
<to addresses="kevinmoodley#gmail.com" />
<subject>Testing from task</subject>
<text>This message was sent by the jBPM User Review task</text>
</notification>
<transition g="-42,-18" name="CANCEL" to="end1" />
<transition g="-42,-18" name="RESTART" to="end2" />
</task>
Thanks
Kevin
Nevermind. I figured out that the default MailProducer implementation, called MailProducerImpl, depends on jBPM's internal identity tables. It requires the users be created in these tables and that the task be assigned to a user or user group on those tables before notification emails are sent. Since I am using our existing Active Directory, I do not use the jBMP identity tables and hence get no emails. Solution: write my own implementation of MailProducer

jboss-esb fs-listener jbm message queue overflow

We have a jboss esb server which is reading files from the file system in a scheduled way (schedule frequency of 20sec) and convert them into the esb message then we parse the message.
There are some other providers/listeners (jms) and services configured on the esb servers. When there is an error in one of the services it effects the above process. File system provider (gateway) is working fine but the jms-listener who takes the gateway messages are not working and lots of messages are accumulated in the jbm queue (jbm_msg Oracle DB table).
Here is the problem, when my server is restarted messages in the jbm-queue is parsed in the esb for just 20 seconds which is the scheduled frequency of fs-provider, never process messages again and cpu usage goes up to 100% and stays there. We believe somehow fs-providers interrupts the jms-provider.
Is there any configuration we have been missing out.
Here are the configuration files that we have:
jboss-esb.xml
<?xml version = "1.0" encoding = "UTF-8"?>
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
<fs-provider name="SitaIstProvider">
<fs-bus busid="gw_sita_ist" >
<fs-message-filter
directory="/ikarussita/IST/IN"
input-suffix=".RCV"
work-suffix=".lck"
post-delete="false"
post-directory="/ikarussita/IST/OK"
post-suffix=".ok"
error-delete="false"
error-directory="/ikarussita/IST/ERR"
error-suffix=".err"/>
</fs-bus>
</fs-provider>
<jms-provider name="SitaESBQueue" connection-factory="ConnectionFactory">
<jms-bus busid="esb_sita_queue">
<jms-message-filter dest-type="QUEUE" dest-name="queue/esb_sita_queue"/>
</jms-bus>
</jms-provider>
</providers>
<services>
<service category="SITA" name="SITA_IST" description="SITA Daemon For ISTCOXH">
<listeners>
<fs-listener name="Sita_Ist_Gateway" busidref="gw_sita_ist" is-gateway="true" schedule-frequency="20" />
<jms-listener name="Jms_Sita_EsbAware" busidref="esb_sita_queue" />
</listeners>
<actions mep="OneWay">
<action name="parse_msg" class="com.celebi.integration.action.sita.inbound.SitaHandler" process="parseMessage" />
<action name="send_ikarus" class="com.celebi.integration.action.ikarus.outbound.fis.FlightJmsSender" />
</actions>
</service>
</services>
</jbossesb>
jbm-queue-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.messaging.destination:service=Queue,name=esb_sita_queue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
<server>
deployment.xml
<jbossesb-deployment>
<depends>jboss.messaging.destination:service=Queue,name=esb_sita_queue</depends>
</jbossesb-deployment>
Thanx
Split the service into 2 separate services, one handling the JMS queue, the other the file poller. Specify the same action pipeline. That way you get the same functionality but without the threading issue. Also use max-threads attr on the listener to specify the number of reading threads.