Setting message_context for PJSIP


(BlkRckZ28) #1

I have been trying to figure out how to set the message_context for all PJSIP endpoints. I even tried endpoint by endpoint in the pjsip.endpoint_custom.conf and pjsip.endpoint_custom_post.conf config via the GUI.

When I do a pjsip show endpoint xxxxxxxx, the message_context is blank for all the endpoints set in either of the pjsip.endpoint_custom… files above…

If I manually edit the pjsip.endpoint.conf file, set the message_context = xxxx, that works. I can see the message_context being set for the endpoint via the pjsip show enpoint xxxx cli command…

I am looking for a way to do this at a global level for all endpoints, and not having to edit the pjsip.endpoint.conf file (don’t want to mess up the auto generated files by FreePBX when they are rebuilt…

Thanks in advance…


(Lorne Gaetz) #2

Using lines lines like this in /etc/asterisk/pjsip.endpoint_custom_post.conf

[2009](+)
message_context = xxxx

(BlkRckZ28) #3

Wow… Thanks, that did it.
I never did find where the syntax for the (+) appended to the end of the endpoint number was defined.

Is there anyway to do this globally? for all endpoint? Or should I plan on doing a script to create an entry for all endpoints in the pjsip.endpoint custom post.conf file…
Thanks, again…


(Lorne Gaetz) #4

Don’t know.

If you need this feature, chances are someone else does too. File a feature request to have it added to the GUI. http://issues.freepbx.org


(Lorne Gaetz) #5

Per your feature request here:
http://issues.freepbx.org/browse/FREEPBX-14386

Do you know if message_context can be set in the pjsip global settings, and that it will apply to all extensions? The Asterisk sample pjsip configs don’t mention the message_context parameter at all.


#6

Hey guys, I need to use SIP SIMPLE for texting between PJSIP extensions.
I use Distro 14 and Asterisk 13.
3 years after this first discussion, I still not know how to declare a message_context globally for all PJSIP Extensions on my Freepbx.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip#Asterisk13Configuration_res_pjsip-endpoint_message_context

Have you a solution now ???