Exchanging Custom: device state using PJSIP

Hello!
I’m following famous article Exchanging Device and Mailbox State Using PJSIP - Asterisk Documentation about exchanging device states.

Everything is works, but one thing bothering me a bit. I’m using schema with custom devstates and hints, so I want to exchange actually these states. But PUBLISH changes only hint state, but not actual devstate on other server. Means when I do on local server

core show hints

I do see combined state with remote server. Means if local devstate is NOT_INUSE and remote is BUSY, combined state is BUSY.

Is there a possibility to trigger also local devstate with this PUBLISH mechanism, and not only hint?

Config is quite straightforward

# Configuration for PJSIP to exchange device states
[neighbour_cc]
type=outbound-publish
server_uri=sip:neighbour@sip_server_remote:5060
event=asterisk-devicestate

[neighbour]
type=inbound-publication
event_asterisk-devicestate=neighbour
[neighbour]
type=asterisk-publication
devicestate_publish=neighbour
device_state=yes
device_state_filter=^Custom:

Both servers auth each other based on FQDN, so this part is working.

Asterisk 18.19.0

Thanks in advance!

Are you saying you want it to change the device state persisted into astdb and shown in the CLI with the devstate command that is for Custom device states? If so, then no, that functionality doesn’t exist or work that way.

Joshua, thanks for answer.

So, just to confirm, if I’m changing devstate with CLI (or dialplan) on one server, the hint is propagated to remote server, but devstate (yes, one on astdb/CLI) on remote server is not changed? And there is no mechanism to make it happen via res_pjsip_publish_asterisk mechanism?

Thanks!

Device state is propagated and aggregated. What you are referring to is the internal state of the “Custom:” device state module, which is not.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.