SOLVED SMS using fusionpbx

Status
Not open for further replies.
Jul 15, 2021
102
9
18
34
I have a fresh install of fusionpbx and I have created 2 domains and 2 extensions in each domains.

I have managed to setup of cross tenant dialing using this link.

When I use a SIP client connected to an extension to send SMS/text message to another extension in the same domain, it works without issues.

How do I add SMS chatplan for inter domain SMS, I would like to send a message from extension A in domain 1, to extension B in domain 2 just by using freeswitch
 
Jul 15, 2021
102
9
18
34
For any one confused about how this works. if you have a single context and if all extensions are in the same context, text messages work without any additional effort, all you need is a compatible client.

if you have a multi-tenant system or multiple contexts, then messages between extensions in the same context work without any effort. For inter context/domain messaging - you need to edit the default.xml which is located under /etc/freeswitch/chatplan

In that you modify the context public as per your needs, I am not sure whether the context name could be changed to your own context/domain - when I tried it was not working.

<context name="public"> <extension name="default"> <condition field="from_host" expression="context1"/> <condition field="to" expression="(30|40)"> <action application="set" data="to=profile2/$1@context2"/> <action application="info"/> </condition> </extension> <extension name="amazing"> <condition field="from_host" expression="context2"/> <condition field="to" expression="(11|12)"> <action application="set" data="to=profile1/$1@context1"/> <action application="info"/> </condition> </extension> </context>

This above example has 2 contexts and two profiles - one for each context.

Extension 11 and 12 reside in context 1, 30 and 40 reside in context 2.

This setup allows messaging between any extension in context 1 to extension 30 and 40 which are in context 2.

The reason why an additional from_host check is added - can be figured out by yourself by removing it and experimenting.
 
Last edited:
Status
Not open for further replies.