Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel data is not shown in asterisk CLI #31

Open
badrik91 opened this issue Oct 1, 2020 · 1 comment
Open

Channel data is not shown in asterisk CLI #31

badrik91 opened this issue Oct 1, 2020 · 1 comment

Comments

@badrik91
Copy link

badrik91 commented Oct 1, 2020

Hello sir,
I have used this library and its working great,make strong concept.But i have one question which is shown below
how to take channel data in asterisk cli terminal through Python-ARI?
is there any method to get channel data with out this method:
channel = client.channels.get(channelId=channel_id)
this works fine,display channel details on terminal but i want details on asterisk cli .
Is there any method for this??
please give replay as soon as possible.

@ldo
Copy link

ldo commented Dec 15, 2022

You mean, the equivalent of issuing the AMI command “core show channels concise”? The ARI GET /channels request seems to return a lot of this info, e.g. with a command like

rest GET /channels

(the rest command comes from my seaskirt_examples repo), I get output that looks like:

response = [{'id': '1671069148.434', 'name': 'PJSIP/test-client-000000c1', 'state': 'Up', 'protocol_id': 'af4fa446-b329-4f00-9ae9-ceb9ecf0d5b2', 'caller': {'name': '', 'number': ''}, 'connected': {'name': '', 'number': ''}, 'accountcode': '', 'dialplan': {'context': 'time', 'exten': '11', 'priority': 30004, 'app_name': 'SayUnixTime', 'app_data': '1671069163,Zulu,HNS'}, 'creationtime': '2022-12-15T14:52:28.605+1300', 'language': 'en'}]

I haven’t tried yet, but perhaps GET /channels/{channelid} will return even more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants