Commit 6a68f898b830c6951579c432fd0c20d53e6289f2
1 parent
726439d3
cleaning the code
Showing
2 changed files
with
10 additions
and
22 deletions
Show diff stats
asterisk/ami.anubis
| @@ -10,9 +10,9 @@ read system/string.anubis | @@ -10,9 +10,9 @@ read system/string.anubis | ||
| 10 | read tools/basis.anubis | 10 | read tools/basis.anubis |
| 11 | read tools/connections.anubis | 11 | read tools/connections.anubis |
| 12 | 12 | ||
| 13 | -read asterisk/ami_types.anubis | ||
| 14 | -read asterisk/ami_commands.anubis | ||
| 15 | -read web/CXM_http_get_common.anubis | 13 | +read calexium_lib/asterisk/ami_types.anubis |
| 14 | +read calexium_lib/asterisk/ami_commands.anubis | ||
| 15 | +read calexium_lib/web/CXM_http_get_common.anubis | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -34,23 +34,11 @@ define Maybe(One) | @@ -34,23 +34,11 @@ define Maybe(One) | ||
| 34 | with ami_response = to_string(ba), | 34 | with ami_response = to_string(ba), |
| 35 | // typed_response = xml_rpc_get_response(xml_response), | 35 | // typed_response = xml_rpc_get_response(xml_response), |
| 36 | if print_dump then | 36 | if print_dump then |
| 37 | - | ||
| 38 | - success(println("=== ASTERISK SERVER answer ==="+crlf +"["+ ami_response + "]" )) | ||
| 39 | - //println("=== XML_RPC Anubis interpretation ==="); | ||
| 40 | - | ||
| 41 | - /* if typed_response is | ||
| 42 | - { | ||
| 43 | - failure then println("Interpretation error"), | ||
| 44 | - success(result) then | ||
| 45 | - if result is | ||
| 46 | - { | ||
| 47 | - ok(ok_res) then println(format_xml_rpc_parameters(ok_res,1)), | ||
| 48 | - fault(fault) then println(format_xml_rpc_fault(fault,1)) | ||
| 49 | - } | ||
| 50 | - | ||
| 51 | - } */ | ||
| 52 | - | ||
| 53 | - else success(unique) | 37 | + println("=== ASTERISK SERVER answer ==="+crlf +"["+ ami_response + "]" ); |
| 38 | + receive(print_dump, conn) | ||
| 39 | + | ||
| 40 | + else | ||
| 41 | + receive(print_dump, conn) | ||
| 54 | } | 42 | } |
| 55 | . | 43 | . |
| 56 | 44 | ||
| @@ -158,7 +146,7 @@ global define One | @@ -158,7 +146,7 @@ global define One | ||
| 158 | ( | 146 | ( |
| 159 | List(String) args | 147 | List(String) args |
| 160 | )= | 148 | )= |
| 161 | - if asterisk_new_client("192.168.3.20:5038", auth("admin","admin")) is | 149 | + if asterisk_new_client("192.168.3.118:5038", auth("anubix","anubix")) is |
| 162 | { | 150 | { |
| 163 | failure then println(" asterisk new client failure"), | 151 | failure then println(" asterisk new client failure"), |
| 164 | success(ami_client) then unique | 152 | success(ami_client) then unique |
asterisk/ami_commands.anubis
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | -read asterisk/ami_types.anubis | 9 | +read calexium_lib/asterisk/ami_types.anubis |
| 10 | 10 | ||
| 11 | public define AMI_Action ami_login(String user, String password, Bool events) = | 11 | public define AMI_Action ami_login(String user, String password, Bool events) = |
| 12 | action("Login", [ | 12 | action("Login", [ |