Created
February 15, 2015 05:22
-
-
Save debojitkakoti/908417a5db25f456dd1c to your computer and use it in GitHub Desktop.
Hangup cause in asterisk using phpagi
This file contains 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
<?php | |
require_once('phpagi.php'); | |
$agi = new AGI(); | |
$clid = $agi->request['agi_callerid']; // -Caller ID | |
$dest = $agi->request['agi_dnid']; // -Destination id | |
$uid = $agi->request['agi_uniqueid']; | |
$rdnis =$agi->request['agi_rdnis']; //Redirected Dialed Number Information Service | |
$hangupcause_string=$agi->get_variable("HANGUPCAUSE_KEYS()"); | |
$hangupcause_string_data = $hangupcause_string['data']; | |
$hanupcause_code=$agi->get_variable("HANGUPCAUSE($hangupcause_string_data,tech)"); | |
$hangupcause_code_data = $hanupcause_code['data']; | |
$hangupcause_ast=$agi->get_variable("HANGUPCAUSE($hangupcause_string_data,ast)"); | |
$hangupcause_ast_data = $hangupcause_ast['data']; | |
$agi->set_variable("HANGUPPPPPPPPPCAUSE STRING DATA",$hangupcause_string_data); | |
$agi->set_variable("HANGUPPPPPPPPPCAUSE CODE DATA",$hangupcause_code_data); | |
$agi->set_variable("HANGUPPPPPPPPPCAUSE AST DATA",$hangupcause_ast_data); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment