Created
July 28, 2010 11:54
-
-
Save benlangfeld/494212 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command :set?, :execute?, :node => "create" do |command| | |
# Send empty form | |
r = command.reply | |
r.status = :executing | |
r.new_sessionid! | |
r.allowed_actions = [:cancel, :execute] | |
r.primary_allowed_action = :execute | |
r.form | |
r.form.type = :form | |
r.form.title = "Create Call" | |
r.form.instructions = "Enter the SIP address of the caller and callee." | |
r.form.fields = [ | |
{:label => 'From', :type => 'text-single', :var => 'from', :required => true}, | |
{:label => 'To', :type => 'text-single', :var => 'to', :required => true}, | |
{:label => 'Call Setup ID', :type => 'text-single', :var => 'call-setup-id'} | |
] | |
write_to_stream r | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iq from="commands.active-calls.messaging.studiotalker.com" type="result" to="[email protected]/desktop" id="aaf8a" lang="en" > | |
<command xmlns="http://jabber.org/protocol/commands" status="executing" node="create" sessionid="6ac909a3bd407cb21c8a30943854a2ad14a02bd6" > | |
<actions execute="execute" > | |
<cancel/> | |
<execute/> | |
</actions> | |
<x xmlns="jabber:x:data"/> | |
<x xmlns="jabber:x:data" type="form" /> | |
<x xmlns="jabber:x:data"> | |
<title>Create Call</title> | |
</x> | |
<x xmlns="jabber:x:data"> | |
<instructions>Enter the SIP address of the caller and callee.</instructions> | |
</x> | |
<x xmlns="jabber:x:data"> | |
<field type="text-single" label="From" var="from" > | |
<required/> | |
<option/> | |
</field> | |
<field type="text-single" label="To" var="to" > | |
<required/> | |
<option/> | |
</field> | |
<field type="text-single" label="Call Setup ID" var="call-setup-id" > | |
<option/> | |
</field> | |
</x> | |
</command> | |
</iq> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment