README.md in adhearsion-asterisk-1.1.1 vs README.md in adhearsion-asterisk-1.2.0

- old
+ new

@@ -50,48 +50,62 @@ ### Dialplan ```ruby -vm { - voicemail "8000" -} +class Voicemail < Adhearsion::CallController + def run + voicemail "8000" + end +end -echotest { - play 'demo-echotest' - execute 'Echo' - play 'demo-echodone' -} +class EchoTest < Adhearsion::CallController + def run + play 'demo-echotest' + execute 'Echo' + play 'demo-echodone' + end +end -saytime { - t = Time.now - date = t.to_date - date_format = 'ABdY' - execute "SayUnixTime", t.to_i, date_format - play_time date, :format => date_format -} +class SayTime < Adhearsion::CallController + def run + t = Time.now + date = t.to_date + date_format = 'ABdY' + execute "SayUnixTime", t.to_i, date_format + play_time date, :format => date_format + end +end -callqueue { - case extension - when 5001 - queue 'sales' - when 5002 - queue 'support' +class CallQueue < Adhearsion::CallController + def run + case variables[:x_agi_extension] + when 5001 + queue 'sales' + when 5002 + queue 'support' + end end -} +end -salesagent { - queue('sales').join! -} +class SalesAgent < Adhearsion::CallController + def run + queue('sales').join! + end +end -supportagent { - queue('support').join! -} +class SupportAgent < Adhearsion::CallController + def run + queue('support').join! + end +end -operator { - enable_feature :blind_transfer - dial extension, :options => "Tt" -} +class Operator < Adhearsion::CallController + def run + enable_feature :blind_transfer + dial extension, :options => "Tt" + end +end ``` ### Config generation