Cannot set custom Messages Context


We are trying to set a custom messages context under Settings > Technology Settings > Device Profile > Default PJSIP Profile > Advanced: parameter=message_context, value=my-msgs

We reload config, but it is still showing under the old context.

[root@pbx1 ~]# asterisk -x"pjsip show endpoint 101" | grep message_context
 message_context                    : messages

Looking at pjsip__40-1-profiles.conf I can config that the context is there.

;Default PJSIP Profile - Default PJSIP Profile

But looking at the actual endpoint in pjsip__50-1-extensions.conf I see:


As you can see, it still has the old context.

If I manually remove message_context=messages and run asterisk -x"core reload", then it is good:

[root@core1 ~]# asterisk -x"pjsip show endpoint 101" | grep message_context
 message_context                    : my-msgs

But if I apply config in the GUI, it gets overridden.

So my questions are:

  1. Why does the endpoint have this context hard coded? It should’ve taken it from the template (Default PJSIP profile)
  2. How can we now change the message context for all endpoints?
  3. Where does VitalPBX take the information to construct the endpoint in pjsip__50-1-extensions.conf? Perhaps it is a DB entry that we can modify for now?



  • The profile definitions can be overwritten by the endpoints; this is how Asterisk works.
  • The context is hardcoded because we never thought that someone would want to change it.

Our message context handles messages from mobile and desktop devices and SMS for those extensions with multiple devices assigned.

There’s a lot to consider for this type of context - take it from me.

I understand. My question was: Settings like these why is it hardcoded on the endpoint? It should rather be added to the template, thus allowing anyone to overwrite it in the device profile’s advanced section.

Right, but we are trying to integrate SMS with an SMS gateway which is working fine with a custom dialplan. But when we wanted to update the profile with the custom SMS context we were not able to as mentioned above.

I hope you guys will fix this in the next release.

In the meantime, is it a database entry from which the context is being hardcoded?