Can I send a pjsip notify from dialplan?

Of course I can send it simply from the CLI with asterisk -x “pjsip send notify customnotify endpoint 103

But can I do that in dialplan from a custom context?

Hello,

Use the System(command) in dialplan. I hope it will help you out.

Thanks

That’s a hammer. It certainly works.

There is not a dialplan application to directly do it. You’d have to use the console like mentioned or AMI.

5 Likes

That is all I was finding. But I admit to not knowing everything. Hence the question.

For the curious, the reason I asked is because I want to be able to toggle a Yealink phone’s local DND status from the PBX.

The context to contorl the phone was easy enough to figure out.
Put this in sip_notify_custom.conf

[dndon-yealink]
Content-Type=>message/sipfrag
Event=>ACTION-URI
Content=>key=DNDOn

[dndoff-yealink]
Content-Type=>message/sipfrag
Event=>ACTION-URI
Content=>key=DNDOff

Then with a simple notify command the phones will flip.

pjsip send notify dndon-yealink endpoint 103
pjsip send notify dndoff-yealink endpoint 103

The reason for the dial plan question was to make a Custom Destination to use as a target for a user to flips his DND from out of the office.

Obviously, the UCP can set status, but that does not reflect status on the phone itself.

Can I ask why you are setting DND directly on the phones instead of as a state of the device on the PBX? At this point the PBX will also see that device as available to ring and only return a busy once it hits the phone.

It also means that anyone BLF’ing the device will not see it BUSY because the DND is at the phone level and not the PBX so the hint is never updated.

That is only true if the phone does not send the feature code, which no sane person ever lets happen. EPM sets the phone to send it by default, I had also always set it to do as part of my default process when not using EPM.

Device state on the PBX means nothing to the users. Users need to see that status on their phone.

Getting most phone users to use a web page to manage their phone status is silly.

This functionality also is more useful for operators allowing them to set and clear DND status for people that are out. Adding a few lines to FOP2 or a little custom web page makes it easy enough.

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