[asterisk-bugs] [JIRA] (ASTERISK-29208) res_pjsip: AMI Action PJSIPShowContacts returns No Contacts found

Diego Busacca (JIRA) noreply at issues.asterisk.org
Wed Sep 14 06:29:09 CDT 2022


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=260204#comment-260204 ] 

Diego Busacca commented on ASTERISK-29208:
------------------------------------------

This issue is still present in 16.28.0.

The static contacts arent displayed by the AMI action {{PJSIPShowContacts}}

On my test server {{pjsip show contacts}} returns 44 contacs and {{PJSIPShowContacts}} only 9.

This issue prevents our software to monitor the qualify status of peers without registration.

{code}
tam*CLI> pjsip show contacts

  Contact:  <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================
...
  Contact:  To_95.1/sip:172.16.95.1:5060                   2532df838c Avail         1.060
...
Objects found: 44
{code}


{{PJSIPShowContacts}}

{code}
<asterisk.ami.response.Response object at 0x7fa6e8732ba8>
Response: Success
ActionID: 1
EventList: start
Message: A listing of Contacts follows, presented as ContactList events
...
Event : ContactListComplete -> {'ActionID': '1', 'EventList': 'Complete', 'ListItems': '9'}

{code}

> res_pjsip: AMI Action PJSIPShowContacts returns No Contacts found
> -----------------------------------------------------------------
>
>                 Key: ASTERISK-29208
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29208
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/ManagerInterface, Resources/res_pjsip
>    Affects Versions: 16.9.0, 16.11.1, 16.15.0
>         Environment: ubuntu 18.04.4
> debian 10
>            Reporter: Mikhail
>            Assignee: Unassigned
>         Attachments: t.18881-brief.txt, t.18881-full.txt, t.18881-info.txt, t.18881-locks.txt, t.18881-thread1.txt
>
>
> Hello. Faced a bug: sending PJSIPShowContacts action from ami libraries (panoramisk, ami-py) says "Message='No Contacts found' Response='Error' content=''>". while asterisk -rx 'pjsip show contacts' - shows contacts.
> script example is here
> from panoramisk import Manager
> import asyncio
> @asyncio.coroutine
> def check_peers():
>     manager = Manager(loop=loop,host='127.0.0.1', port=5038,username='123', secret='123')
>     try:
>         yield from manager.connect()
>         peersobj = yield from manager.send_action({'Action': 'PJSIPShowContacts'})
>         return peersobj
>         manager.close()
>     except:
>         return 'oops...something is wrong'
> loop = asyncio.get_event_loop()
> peers = loop.run_until_complete(check_peers())
> print(peers)
> Other ami-commands (like PJSIPShowEndpoints, etc.) work fine.
> here is nmap output
> T 127.0.0.1:5038 -> 127.0.0.1:44054 [AP] #144
>   Event: SuccessfulAuth..Privilege: security,all..EventTV: 2020-12-10T14:00:04.511+0000..Severity: Informational..Service: AMI..EventVersion: 1..AccountID: flask..SessionID: 0x7f06b806fd8
>   0..LocalAddress: IPV4/TCP/127.0.0.1/5038..RemoteAddress: IPV4/TCP/127.0.0.1/44054..UsingPassword: 0..SessionTV: 2020-12-10T14:00:04.511+0000....
> #
> T 127.0.0.1:44054 -> 127.0.0.1:5038 [AP] #145
>   Action: PJSIPShowContacts..ActionID: 1....
> #
> T 127.0.0.1:5038 -> 127.0.0.1:44054 [AP] #146
>   Response: Error..ActionID: 1..Message: No Contacts found.....



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list