SIP client card, as intercom

OK, so I am using the Addon and integration. Everything is configured and no errors. I am now trying to call from a softphone to the card or the card to the softphone. I can call both ways, but the other device doesn’t seem to ring. I am getting the following log. Do I have a Codec issue?

[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:4180 session_on_tsx_state:  111 TSX State: Proceeding  Inv State: INCOMING
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:4184 session_on_tsx_state:  Topology: Pending: (null topology)  Active: (null topology)
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:4189 session_on_tsx_state:  
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:769 handle_incoming_sdp:  111: Media count: 1
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:495 ast_sip_session_media_state_add:  111 Adding position 0
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:541 ast_sip_session_media_state_add:  Creating new media session
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:584 ast_sip_session_media_state_add:  Setting media session as default for audio
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:589 ast_sip_session_media_state_add:  Done
[May 11 16:01:41] DEBUG[907]: res_pjsip_sdp_rtp.c:1504 negotiate_incoming_sdp_stream:  111
[May 11 16:01:41] DEBUG[907]: res_pjsip_sdp_rtp.c:1508 negotiate_incoming_sdp_stream: Endpoint has no codecs for media type 'audio', declining stream
[May 11 16:01:41] DEBUG[907]: res_pjsip_sdp_rtp.c:1510 negotiate_incoming_sdp_stream:  Endpoint has no codecs
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:960 handle_incoming_sdp:  111: Handled? no
[May 11 16:01:41] DEBUG[907]: res_pjsip_session.c:4514 handle_outgoing_response:  111: Method is INVITE, Response is 488 Not Acceptable Here

Finally, some progress is achieved :slight_smile: All my persons are identified if “main” integration version is installed. It did not work for either “0.4.x” or “0.6.x” versions. Though “main” integration version creates not binary_senor, but two sensors for each person. Sensor.state and sensor.callee. How that could be fixed? Thanks for your efforts.

Stay away from integration, it’s not finished yet… Start with the sip card and addon

thank. But can you describe in more detail how to create a binary_senor for each person without integration?

to make call sensors? or why do you want it?

well, on the map, which entities to show ?

what map ?

                  - person: person.papa                  # Your first person entity here
                   name: Person1
                   extension: '101'
                   secret: '###'    # Set the auto_generated_secret you set in the add-on here!
                   icon: mdi:monitor
                   entity: ``` ---what to post here ?

nothing, remove it

tried. No response to call. And there are no mistakes

check your logs?

There are no errors in the log. The error is only in the map itself person not cofigured! There is no extension configured for this person
But all the personas I really created

That error means there is no extension configured with the person you are currently logged in as. To use the card, the logged in person needs to have a extension configured, so the card knows which extension to use.

So make sure your person has a user that can log in, and use that one.

Seems like it. Make sure the codec the softphone sends is configured in the endpoint.

Oh thanks. How about with binary_sensor?

Not needed for the card. The entity option is only to display the status on the icon. The integration is right now it for automations.

@TECHFox Thank you so much. I had left off the codec in PJSIP_custom. Working now. What are the ideal codecs for a linphone to give video as well?

image

Not sure which codecs linphone supports. Just make sure the codec is also supported in your browsers.

Btw, not all codecs on a desktop browser are supported in a android browser. This sometimes gives problems with the companion app.

Hi TECHFox,

thanks for your great work. I have set up your complete solution and it works nice even with video.

I am trying to cancel a call with the asterisk.hangup service, but i always get the message in asterisk logs:

manager.c:4497 action_hangup: Request to hangup non-existent channel: None

Like in your wiki discription i am calling the service with the following channel-data

action:
  - service: asterisk.hangup
    data:
      channel: PJSIP/101

But the asterisk logs shows a changing channel name

Examining AMI event:
Event: DialState
Privilege: call,all
Channel: PJSIP/101-00000094
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 101
CallerIDName: eingang
...
Exten: 102
...
DestChannel: PJSIP/102-0000009a
DestChannelState: 5
DestChannelStateDesc: Ringing
DestCallerIDNum: 102
DestCallerIDName: erdgeschoss
...
DialStatus: RINGING

What i am doing wrong?

Thanks, hope you like it. :slight_smile:

Your not doing anything wrong. The service needs the specific channel and can’t work with only the endpoint.

I will add some more sensors to the extensions, including the current channel it’s in. That way you will be able to still automate a hangup.

But for now, why do you want to hangup a call? Maybe it’s possible with some other way in the dialplan.

1 Like