Created
November 9, 2011 18:20
-
-
Save johntdyer/1352339 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ccxml xmlns="http://www.w3.org/2002/09/ccxml" version="1.0"> | |
| <var name="conn_id" expr="''"/> | |
| <var name="statevar" expr="'state0'"/> | |
| <script> | |
| var Hints = new Object(); | |
| Hints.headers = new Object(); | |
| Hints.headers['FROM'] = event$.connection.protocol.sip.headers.From; | |
| </script> | |
| <eventprocessor statevariable="statevar"> | |
| <transition state="state0" event="connection.alerting"> | |
| <assign name="statevar" expr="'state1'"/> | |
| <assign name="conn_id" expr="event$.connectionid"/> | |
| <log expr="'*** Redirecting the connection ***'"/> | |
| <redirect connectionid="conn_id" dest="'sip:9996146899@sip.voxeo.net'" hints="Hints"/> | |
| </transition> | |
| <transition state="state0" event="connection.redirected"> | |
| <log expr="'Redirect successful!'"/> | |
| <exit/> | |
| </transition> | |
| <transition event="connection.redirect.failed"> | |
| <log expr="'The redirect failed...'"/> | |
| <exit/> | |
| </transition> | |
| <transition event="error.*"> | |
| <log expr="'An error occurred: ' + event$.reason"/> | |
| <exit/> | |
| </transition> | |
| </eventprocessor> | |
| </ccxml> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment