<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.voip.ms/w/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.voip.ms/w/index.php?feed=atom&amp;target=Michel&amp;title=Special%3AContributions%2FMichel</id>
		<title>VoIP.ms Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.voip.ms/w/index.php?feed=atom&amp;target=Michel&amp;title=Special%3AContributions%2FMichel"/>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/Special:Contributions/Michel"/>
		<updated>2026-06-04T04:03:29Z</updated>
		<subtitle>From VoIP.ms Wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>https://wiki.voip.ms/article/SIP_URI</id>
		<title>SIP URI</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP_URI"/>
				<updated>2022-08-24T19:36:31Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|-&lt;br /&gt;
! Article en Français !! Artículo en Español&lt;br /&gt;
|-&lt;br /&gt;
| [https://wiki.voip.ms/article/SIP_URI_FR Français] || &lt;br /&gt;
[https://wiki.voip.ms/article/Direcci%C3%B3n_URI_(SIP_URI) Español]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A SIP URI is the SIP addressing schema to call another person via SIP. In other words, a SIP URI is a user's SIP phone number. The SIP URI resembles an e-mail address and is written in the following format: x@y:port (x=Username, y=host|domain|IP)&lt;br /&gt;
&lt;br /&gt;
: Example: johnsmith@my-uri.com&lt;br /&gt;
&lt;br /&gt;
A general description of SIP addressing is at [[wikipedia:SIP address]]. The addresses, which use the same user@domain... format as e-mail addresses, allow an individual Internet telephony user to be reached directly online without passing via the public switched telephone network or incurring the corresponding tolls. &lt;br /&gt;
&lt;br /&gt;
A SIP address may be used as a destination to which to forward a voip.ms DID number, as a target for an individual speed dial entry (*75xx) in a voip.ms user address book or as a means to transfer incoming calls into your voip.ms extensions or numbers from outside Internet servers.&lt;br /&gt;
&lt;br /&gt;
# One is to send calls to an external SIP URI, via your DID number, &lt;br /&gt;
# A second option is to receive calls via SIP URI, we can achieve this using our DID number or an internal extension from a [[Sub Accounts|sub account]].&lt;br /&gt;
# The third option is to use a Virtual number.&lt;br /&gt;
&lt;br /&gt;
 Please note SIP URI is only functional through an external source, it is not intended to be used internally with VoIP.ms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Send calls to an external SIP URI address ==&lt;br /&gt;
&lt;br /&gt;
You can route incoming calls to your DID numbers using a SIP URI address from other companies. You will need to create a string like youraccount@yourip to which you can route the DID(s). &lt;br /&gt;
&lt;br /&gt;
: '''Make sure the other company or provider supports the use of SIP URI'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating a new SIP URI ===&lt;br /&gt;
&lt;br /&gt;
To make a SIP URI that can be used with multiple DIDs, use the {DID} tag. The {DID} expression will be replaced automatically by the DID number as it is listed in the &amp;quot;Manage DID section&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Forward.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Examples:&lt;br /&gt;
: 1{DID}@128.144.122.12&lt;br /&gt;
: 12143221234@128.144.122.12&lt;br /&gt;
: some_extension_name@128.144.122.12:5080&lt;br /&gt;
: other_extension_name@voip.example.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Dialing out a SIP URI or using a SIP URI as forwarding does not generate cost (Outgoing call).''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== two newer options for SIP URIs ====&lt;br /&gt;
&lt;br /&gt;
* CallerID Override: Permits you to override the callerID that will be received on the receiving end of the SIP URI.&lt;br /&gt;
* CallerID E164: Your CallerID will become E164 compliant and thus show on the receiving end as +12123262233 (+(countrycode)(areacode)(number)).&lt;br /&gt;
&lt;br /&gt;
==== Extended SIP URI Format ====&lt;br /&gt;
In addition to the standard format outlined above, an Extended SIP URI Format can also be used. This Format contains additional options as indicated below:&lt;br /&gt;
username[:password[:md5secret[:authname[:transport]]]]@host[:port]&lt;br /&gt;
&lt;br /&gt;
To specify any of the additional parameters of the Extended SIP URI Format, you must introduce one or more colon (:) characters between the username value and the @ character. Parameters are optional and read from left to right. To supply a particular parameter, it is necessary to precede it with the appropriate number of colons to its left. For example, to specify a username, password and transport, the SIP URI would be as follows:&lt;br /&gt;
&lt;br /&gt;
username:password:::transport@host&lt;br /&gt;
&lt;br /&gt;
Specifying the username, password and authname would be done as follows:&lt;br /&gt;
&lt;br /&gt;
username:password::authname@host&lt;br /&gt;
&lt;br /&gt;
The additional parameters of the Extended SIP URI Format are described below:&lt;br /&gt;
&lt;br /&gt;
'''password''': This is the plain text password to be used when authentication is required by the destination endpoint.&lt;br /&gt;
&lt;br /&gt;
'''md5secret''': Alternatively an md5 representation of the password can also be used instead of the plain text version when authentication is required by the destination endpoint.&lt;br /&gt;
&lt;br /&gt;
'''authname''': An optional authentication name can also be supplied as a parameter, which will be used instead of the username.&lt;br /&gt;
&lt;br /&gt;
'''transport''': A specific transport type can be specified for the outbound connection. Valid values for this parameter are 'tcp' for the TCP transport, 'tls' for TLS encrypted signalling, as well as 'udp' for UDP transport (the default).&lt;br /&gt;
&lt;br /&gt;
=== Creating a phone book entry ===&lt;br /&gt;
&lt;br /&gt;
A SIP URI may be associated with a [[phone book]] or speed dial entry in the same manner as any other telephone number.&lt;br /&gt;
&lt;br /&gt;
See [[Phone book#Create a Phone Book Entry with a SIP URI]].&lt;br /&gt;
&lt;br /&gt;
[[File:Pb entry sipuri.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
'''SIP URI''': Here you can either select '''Use Existing''' or '''Create New''' to assign the [[SIP URI]] to your Phone Book entry.&lt;br /&gt;
&lt;br /&gt;
This replaces alphanumeric addresses (such as sip:user@provider.example.org) with numeric abbreviations (such as *7501) which can be easily dialled from [[devices|IP phones]] that only offer a numeric keypad.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Codec Negotation ===&lt;br /&gt;
&lt;br /&gt;
By default when you route your incoming calls to an external SIP URI address, the system sends the INVITE allowing all VoIP.ms supported codecs (ulaw, g729a and GSM). &lt;br /&gt;
In that case if you want to use a specific codec (from the supported ones) you need to restrict that in your end. For instance, if you are using an Asterisk/PBX System and only wish to use ulaw codec, you will need to make sure to have the following settings in the trunk:&lt;br /&gt;
&lt;br /&gt;
: disallow=all&lt;br /&gt;
: allow=ulaw&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Receiving incoming calls from a SIP URI ==&lt;br /&gt;
&lt;br /&gt;
=== Using your DID number === &lt;br /&gt;
You can receive SIP URI calls using the following format {Number}@sip.voip.ms, this can be used with your local US and Canada numbers, so they can be reached from outside. &lt;br /&gt;
&lt;br /&gt;
[[Image:Did.jpg]]&lt;br /&gt;
&lt;br /&gt;
This format of a SIP address must follow this [[wikipedia: SIP URI scheme | SIP URI scheme]] as a means to reach VoIP.ms subscribers.&lt;br /&gt;
&lt;br /&gt;
Another variant, also valid, is to specify the specific VoIP.ms server on which your DID is registered, ie:&lt;br /&gt;
&lt;br /&gt;
:sip:4166471234@toronto.voip.ms&lt;br /&gt;
&lt;br /&gt;
'''Please note that the option to dial sip.voip.ms is more reliable than using the server as you won't have to specify the Point of Presence. Using the server instead, you will have to dial the correct server that the number is using.'''&lt;br /&gt;
&lt;br /&gt;
=== Using your sub account internal extension ===&lt;br /&gt;
When you assign an internal extension for a [[Sub Accounts|sub account]], it can also be used as an external SIP URI. For example, if your extension is 2, you could be reached directly via SIP from another network with a URI like this: 1000002@houston.voip.ms &lt;br /&gt;
&lt;br /&gt;
:(Replace houston.voip.ms by the server you are registered to, 100000 by your account ID and the 2 by your internal extension). &lt;br /&gt;
&lt;br /&gt;
Important: no call flow or filtering can be applied to calls make to the external SIP URI.  Calls will immediately ring the device registered to this sub-account.&lt;br /&gt;
&lt;br /&gt;
[[Image:Extension.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using iNum ===&lt;br /&gt;
&lt;br /&gt;
Any iNum number (from any provider) was a SIP URI; just append @sip.inum.net&lt;br /&gt;
&lt;br /&gt;
For example, iNum 883510009999999 became:&lt;br /&gt;
:883510009999999@sip.inum.net&lt;br /&gt;
&lt;br /&gt;
As of June 2020, inbound calls to voip.ms are not working with the @sip.inum.net URI's as iNum support has been discontinued by an upstream provider. Replacing the server name with that of the voip.ms server to which the iNum is registered may get this to work temporarily - ie: if your phone is registered to atlanta.voip.ms, try replacing the SIP URI with:&lt;br /&gt;
:883510009999999@atlanta.voip.ms&lt;br /&gt;
or&lt;br /&gt;
:883510009999999@sip.voip.ms&lt;br /&gt;
&lt;br /&gt;
As there is no guarantee that this will continue to be supported, it may be advisable to replace iNum with other addressing methods in your configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using a Virtual number ===&lt;br /&gt;
&lt;br /&gt;
Virtual SIP numbers are similar to standard DID numbers. The major difference is that virtual SIP numbers are not accessible via &amp;quot;PSTN&amp;quot;. They can only be reached via &amp;quot;SIP URI&amp;quot; over internet. For example, if you have a DID number with another provider and they support SIP URI Forwarding, you could forward your number to a virtual number at voip.ms just like if it was one of our numbers.&lt;br /&gt;
&lt;br /&gt;
All virtual numbers consist of the following digits: 11 + Accountcode + 3 digits of your choice for a total of 11 digits. The final uri will be that number followed by the @ sign at one of our server. If you intend to send the calls to a phone or adapter, you'll need to point it to the proper server. &lt;br /&gt;
&lt;br /&gt;
: Example SIP URI: 11100000123@houston.voip.ms &lt;br /&gt;
&lt;br /&gt;
[[File:Virtualsip.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SIP URI using the Reseller Interface=&lt;br /&gt;
&lt;br /&gt;
The feature is available for your client through the Reseller interface. You must enable this feature in your package in order to give them the ability to leverage this. &lt;br /&gt;
&lt;br /&gt;
Note that the DID must be linked to your client. (Reseller &amp;gt; Manage Client's accounts &amp;gt; Click on '''Manage client''' where your client.)&lt;br /&gt;
&lt;br /&gt;
Go under the navigation bar on '''[Reseller]''' then click on '''[Manage Rates &amp;amp; Packages]'''&lt;br /&gt;
: [[File:SIPURI_Reseller_1.png|thumb|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Click on the Edit button to edit your package, or click on '''[Create a new package]''' to create a new one.&lt;br /&gt;
&lt;br /&gt;
: [[File:SIPURI_Reseller_2.png|thumb|none|700px]]&lt;br /&gt;
&lt;br /&gt;
Go under the '''[Reseller System Configuration]''' Tab, and on the section &amp;quot;Type of configuration&amp;quot; select: '''[Package Configuration]''', &lt;br /&gt;
&lt;br /&gt;
: [[File:SIPURI_Reseller_3.png|thumb|none|700px]]&lt;br /&gt;
&lt;br /&gt;
Then scroll down and find the feature &amp;quot;'''SIP URI'''&amp;quot;, and enable it.&lt;br /&gt;
&lt;br /&gt;
: [[File:SIPURI_Reseller_4.png|thumb|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) To add a SIP URI entry for your client, or to help your client adding one. Go under the '''[Services]''' at the left navigation bar, then on '''[SIP URI]''' &lt;br /&gt;
: [[File:SIPURI_Add.png|thumb|none|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Click on the tab Add New SIP URI and enter the URI and a Description for the new entry. The description field will help the search bar or searchability.&lt;br /&gt;
: [[File:SIPURI_Add2.png|thumb|none|600px]]&lt;br /&gt;
&lt;br /&gt;
3) Click on the '''[Save SIP URI]''' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:guides]]&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP_URI</id>
		<title>SIP URI</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP_URI"/>
				<updated>2022-08-24T19:27:47Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|-&lt;br /&gt;
! Article en Français !! Artículo en Español&lt;br /&gt;
|-&lt;br /&gt;
| [https://wiki.voip.ms/article/SIP_URI_FR Français] || &lt;br /&gt;
[https://wiki.voip.ms/article/Direcci%C3%B3n_URI_(SIP_URI) Español]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A SIP URI is the SIP addressing schema to call another person via SIP. In other words, a SIP URI is a user's SIP phone number. The SIP URI resembles an e-mail address and is written in the following format: x@y:port (x=Username, y=host|domain|IP)&lt;br /&gt;
&lt;br /&gt;
: Example: johnsmith@my-uri.com&lt;br /&gt;
&lt;br /&gt;
A general description of SIP addressing is at [[wikipedia:SIP address]]. The addresses, which use the same user@domain... format as e-mail addresses, allow an individual Internet telephony user to be reached directly online without passing via the public switched telephone network or incurring the corresponding tolls. &lt;br /&gt;
&lt;br /&gt;
A SIP address may be used as a destination to which to forward a voip.ms DID number, as a target for an individual speed dial entry (*75xx) in a voip.ms user address book or as a means to transfer incoming calls into your voip.ms extensions or numbers from outside Internet servers.&lt;br /&gt;
&lt;br /&gt;
# One is to send calls to an external SIP URI, via your DID number, &lt;br /&gt;
# A second option is to receive calls via SIP URI, we can achieve this using our DID number or an internal extension from a [[Sub Accounts|sub account]].&lt;br /&gt;
# The third option is to use a Virtual number.&lt;br /&gt;
&lt;br /&gt;
 Please note SIP URI is only functional through an external source, it is not intended to be used internally with VoIP.ms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Send calls to an external SIP URI address ==&lt;br /&gt;
&lt;br /&gt;
You can route incoming calls to your DID numbers using a SIP URI address from other companies. You will need to create a string like youraccount@yourip to which you can route the DID(s). &lt;br /&gt;
&lt;br /&gt;
: '''Make sure the other company or provider supports the use of SIP URI'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating a new SIP URI ===&lt;br /&gt;
&lt;br /&gt;
To make a SIP URI that can be used with multiple DIDs, use the {DID} tag. The {DID} expression will be replaced automatically by the DID number as it is listed in the &amp;quot;Manage DID section&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Forward.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Examples:&lt;br /&gt;
: 1{DID}@128.144.122.12&lt;br /&gt;
: 12143221234@128.144.122.12&lt;br /&gt;
: some_extension_name@128.144.122.12:5080&lt;br /&gt;
: other_extension_name@voip.example.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Dialing out a SIP URI or using a SIP URI as forwarding does not generate cost (Outgoing call).''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== two newer options for SIP URIs ====&lt;br /&gt;
&lt;br /&gt;
* CallerID Override: Permits you to override the callerID that will be received on the receiving end of the SIP URI.&lt;br /&gt;
* CallerID E164: Your CallerID will become E164 compliant and thus show on the receiving end as +12123262233 (+(countrycode)(areacode)(number)).&lt;br /&gt;
&lt;br /&gt;
==== Extended SIPURI Format ====&lt;br /&gt;
In addition to the standard format outlined above, an Extended SIPURI Format can also be used. This Format contains additional options as indicated below:&lt;br /&gt;
username[:password[:md5secret[:authname[:transport]]]]@host[:port]&lt;br /&gt;
&lt;br /&gt;
To specify any of the additional parameters of the Extended SIPURI Format, you must introduce one or more colon (:) characters between the username value and the @ character. Parameters are optional and read from left to right. To supply a particular parameter, it is necessary to precede it with the appropriate number of colons to its left. For example, to specify a username, password and transport, the SIPURI would be as follows:&lt;br /&gt;
&lt;br /&gt;
username:password:::transport@host&lt;br /&gt;
&lt;br /&gt;
Specifying the username, password and authname would be done as follows:&lt;br /&gt;
&lt;br /&gt;
username:password::authname@host&lt;br /&gt;
&lt;br /&gt;
The additional parameters of the Extended SIPURI Format are described below:&lt;br /&gt;
&lt;br /&gt;
'''password''': This is the plain text password to be used when authentication is required by the destination endpoint.&lt;br /&gt;
&lt;br /&gt;
'''md5secret''': Alternatively an md5 representation of the password can also be used instead of the plain text version when authentication is required by the destination endpoint.&lt;br /&gt;
&lt;br /&gt;
'''authname''': An optional authentication name can also be supplied as a parameter, which will be used instead of the username.&lt;br /&gt;
&lt;br /&gt;
'''transport''': A specific transport type can be specified for the outbound connection. Valid values for this parameter are 'tcp' for the TCP transport, 'tls' for TLS encrypted signalling, as well as 'udp' for UDP transport (the default).&lt;br /&gt;
&lt;br /&gt;
=== Creating a phone book entry ===&lt;br /&gt;
&lt;br /&gt;
A SIP URI may be associated with a [[phone book]] or speed dial entry in the same manner as any other telephone number.&lt;br /&gt;
&lt;br /&gt;
See [[Phone book#Create a Phone Book Entry with a SIP URI]].&lt;br /&gt;
&lt;br /&gt;
[[File:Pb entry sipuri.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
'''SIP URI''': Here you can either select '''Use Existing''' or '''Create New''' to assign the [[SIP URI]] to your Phone Book entry.&lt;br /&gt;
&lt;br /&gt;
This replaces alphanumeric addresses (such as sip:user@provider.example.org) with numeric abbreviations (such as *7501) which can be easily dialled from [[devices|IP phones]] that only offer a numeric keypad.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Codec Negotation ===&lt;br /&gt;
&lt;br /&gt;
By default when you route your incoming calls to an external SIP URI address, the system sends the INVITE allowing all VoIP.ms supported codecs (ulaw, g729a and GSM). &lt;br /&gt;
In that case if you want to use a specific codec (from the supported ones) you need to restrict that in your end. For instance, if you are using an Asterisk/PBX System and only wish to use ulaw codec, you will need to make sure to have the following settings in the trunk:&lt;br /&gt;
&lt;br /&gt;
: disallow=all&lt;br /&gt;
: allow=ulaw&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Receiving incoming calls from a SIP URI ==&lt;br /&gt;
&lt;br /&gt;
=== Using your DID number === &lt;br /&gt;
You can receive SIP URI calls using the following format {Number}@sip.voip.ms, this can be used with your local US and Canada numbers, so they can be reached from outside. &lt;br /&gt;
&lt;br /&gt;
[[Image:Did.jpg]]&lt;br /&gt;
&lt;br /&gt;
This format of a SIP address must follow this [[wikipedia: SIP URI scheme | SIP URI scheme]] as a means to reach VoIP.ms subscribers.&lt;br /&gt;
&lt;br /&gt;
Another variant, also valid, is to specify the specific VoIP.ms server on which your DID is registered, ie:&lt;br /&gt;
&lt;br /&gt;
:sip:4166471234@toronto.voip.ms&lt;br /&gt;
&lt;br /&gt;
'''Please note that the option to dial sip.voip.ms is more reliable than using the server as you won't have to specify the Point of Presence. Using the server instead, you will have to dial the correct server that the number is using.'''&lt;br /&gt;
&lt;br /&gt;
=== Using your sub account internal extension ===&lt;br /&gt;
When you assign an internal extension for a [[Sub Accounts|sub account]], it can also be used as an external SIP URI. For example, if your extension is 2, you could be reached directly via SIP from another network with a URI like this: 1000002@houston.voip.ms &lt;br /&gt;
&lt;br /&gt;
:(Replace houston.voip.ms by the server you are registered to, 100000 by your account ID and the 2 by your internal extension). &lt;br /&gt;
&lt;br /&gt;
Important: no call flow or filtering can be applied to calls make to the external SIP URI.  Calls will immediately ring the device registered to this sub-account.&lt;br /&gt;
&lt;br /&gt;
[[Image:Extension.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using iNum ===&lt;br /&gt;
&lt;br /&gt;
Any iNum number (from any provider) was a SIP URI; just append @sip.inum.net&lt;br /&gt;
&lt;br /&gt;
For example, iNum 883510009999999 became:&lt;br /&gt;
:883510009999999@sip.inum.net&lt;br /&gt;
&lt;br /&gt;
As of June 2020, inbound calls to voip.ms are not working with the @sip.inum.net URI's as iNum support has been discontinued by an upstream provider. Replacing the server name with that of the voip.ms server to which the iNum is registered may get this to work temporarily - ie: if your phone is registered to atlanta.voip.ms, try replacing the SIP URI with:&lt;br /&gt;
:883510009999999@atlanta.voip.ms&lt;br /&gt;
or&lt;br /&gt;
:883510009999999@sip.voip.ms&lt;br /&gt;
&lt;br /&gt;
As there is no guarantee that this will continue to be supported, it may be advisable to replace iNum with other addressing methods in your configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using a Virtual number ===&lt;br /&gt;
&lt;br /&gt;
Virtual SIP numbers are similar to standard DID numbers. The major difference is that virtual SIP numbers are not accessible via &amp;quot;PSTN&amp;quot;. They can only be reached via &amp;quot;SIP URI&amp;quot; over internet. For example, if you have a DID number with another provider and they support SIP URI Forwarding, you could forward your number to a virtual number at voip.ms just like if it was one of our numbers.&lt;br /&gt;
&lt;br /&gt;
All virtual numbers consist of the following digits: 11 + Accountcode + 3 digits of your choice for a total of 11 digits. The final uri will be that number followed by the @ sign at one of our server. If you intend to send the calls to a phone or adapter, you'll need to point it to the proper server. &lt;br /&gt;
&lt;br /&gt;
: Example SIP URI: 11100000123@houston.voip.ms &lt;br /&gt;
&lt;br /&gt;
[[File:Virtualsip.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SIP URI using the Reseller Interface=&lt;br /&gt;
&lt;br /&gt;
The feature is available for your client through the Reseller interface. You must enable this feature in your package in order to give them the ability to leverage this. &lt;br /&gt;
&lt;br /&gt;
Note that the DID must be linked to your client. (Reseller &amp;gt; Manage Client's accounts &amp;gt; Click on '''Manage client''' where your client.)&lt;br /&gt;
&lt;br /&gt;
Go under the navigation bar on '''[Reseller]''' then click on '''[Manage Rates &amp;amp; Packages]'''&lt;br /&gt;
: [[File:SIPURI_Reseller_1.png|thumb|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Click on the Edit button to edit your package, or click on '''[Create a new package]''' to create a new one.&lt;br /&gt;
&lt;br /&gt;
: [[File:SIPURI_Reseller_2.png|thumb|none|700px]]&lt;br /&gt;
&lt;br /&gt;
Go under the '''[Reseller System Configuration]''' Tab, and on the section &amp;quot;Type of configuration&amp;quot; select: '''[Package Configuration]''', &lt;br /&gt;
&lt;br /&gt;
: [[File:SIPURI_Reseller_3.png|thumb|none|700px]]&lt;br /&gt;
&lt;br /&gt;
Then scroll down and find the feature &amp;quot;'''SIP URI'''&amp;quot;, and enable it.&lt;br /&gt;
&lt;br /&gt;
: [[File:SIPURI_Reseller_4.png|thumb|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) To add a SIP URI entry for your client, or to help your client adding one. Go under the '''[Services]''' at the left navigation bar, then on '''[SIP URI]''' &lt;br /&gt;
: [[File:SIPURI_Add.png|thumb|none|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Click on the tab Add New SIP URI and enter the URI and a Description for the new entry. The description field will help the search bar or searchability.&lt;br /&gt;
: [[File:SIPURI_Add2.png|thumb|none|600px]]&lt;br /&gt;
&lt;br /&gt;
3) Click on the '''[Save SIP URI]''' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:guides]]&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP_(FR)</id>
		<title>SMPP (FR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP_(FR)"/>
				<updated>2020-11-20T15:09:35Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration sur votre serveur SMPP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
[[File:Logo-VoIPms-light.png|left|400px]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|-&lt;br /&gt;
! Article in English !! artículo en Español&lt;br /&gt;
|-&lt;br /&gt;
| [[https://wiki.voip.ms/article/SMPP English]] || [[https://wiki.voip.ms/article/SMPP_(ES) Español]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Un serveur SMPP, acronyme de '''Short Message Peer to Peer''' est une méthode conçue pour envoyer et recevoir de gros volumes de messages SMS via un serveur dédié.&lt;br /&gt;
En d'autres termes, cela vous permet de mieux contrôler la quantité de messages qui seront envoyés à votre public cible tout en évitant de passer via une application softphone ou votre portail VoIP.ms pour envoyer / recevoir ces SMS, éliminant ainsi les multiples tâches répétitives et capitalisant votre temps.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous avez une promotion pour votre entreprise qui offre une réduction pendant un certain laps de temps et que vos clients ont donné leur accord pour recevoir ces types de promotions par SMS, vous pouvez envoyer votre promotion à vos clients plus rapidement que si vous le faisiez depuis votre portail client, augmentant ainsi votre efficacité.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exigences==&lt;br /&gt;
&lt;br /&gt;
*Vous devrez avoir votre propre serveur SMPP&lt;br /&gt;
*Une fois configure adéquatement, vous pourrez ensuite envoyer et recevoir des messages SMS à votre propre serveur. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration sur votre serveur SMPP ===&lt;br /&gt;
Pour que votre serveur puisse communiquer et s'authentifier en correctement avec le serveur SMPP VoIP.ms, vous devrez configurer les éléments suivants:&lt;br /&gt;
*Un '''nom d'utilisateur''' et '''mot de passe''' de votre choix pour que le serveur SMPP deVoIP.ms vous authentifie.&lt;br /&gt;
*Envoyer toutes vos communications à '''smpp.voip.ms''' via le port '''2775 ''', pour le SMPP normal, ou le port '''3550''' qui est notre port SMPP crypté.&lt;br /&gt;
* Ouvrez une connexion à l'aide de la commande '''bind_transceiver'''. Vous pouvez garder cette connexion ouverte aussi longtemps que vous en avez besoin et vous renseigner à ce sujet en utilisant la commande '''enquire_link'''.&lt;br /&gt;
* Envoyez vos messages avec les commandes '''deliver_sm''' ou '''submit_sm'''. Assurez-vous d'inclure '''source_addr''' de votre PDU comme l'un de vos DID ayant la fonction SMS activé depuis votre compte. Votre numéro de SMS de destination doit être défini comme '''destination_addr''' tandis que votre SMS sera inclus dans '''short_message'''.&lt;br /&gt;
&lt;br /&gt;
Une fois que vous avez configuré le tout ci-haut sur votre serveur, vous devrez activer et spécifier le nom d'utilisateur et le mot de passe qui sera utilisé par VoIP.ms pour authentifier vos demandes SMPP. Pour cela, accédez à votre portail VoIP.ms, Numéros DID, Gestion des DID, modifiez votre DID qui prend en charge les messages SMS et en déroulant la page vers le bas, vous verrez les options suivantes:&lt;br /&gt;
&lt;br /&gt;
*SMPP Activé: Si cette option est sélectionnée, les messages SMS pourront être envoyés et reçus à l'aide de SMPP.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez également spécifier l'URL à utiliser pour envoyer une copie des messages entrants à votre serveur SMPP. Laisser vide si vous ne désirez qu'envoyer des messages via SMPP.  Voir l'exemple ci-dessous. Le schéma est obligatoire et doit être défini sur smpp pour le SMPP non crypté ou sur ssmpp pour le SMPP crypté utilisant TLS. La partie user: password @ est facultative et utilisera par défaut le même nom d'utilisateur et mot de passe définis pour l'authentification de notre côté, comme défini ci-dessous. La partie : port est également facultative et sera par défaut à 2775 pour smpp et à 3550 pour ssmpp.&lt;br /&gt;
&lt;br /&gt;
*Nom d'utilisateur SMPP: Le nom d'utilisateur que vous utiliserez pour vous authentifier auprès de notre serveur SMPP pour l'envoi de messages&lt;br /&gt;
*Mot de passe SMPP: Le mot de passe que vous utiliserez pour vous authentifier auprès de notre serveur SMPP pour l'envoi de messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 - Afin d'éviter toute confusion lors de la configuration du nom d'utilisateur sur votre serveur, vous pouvez utiliser votre identifiant de compte VoIP.ms comme nom d'utilisateur (les 6 chiffres de votre compte).&lt;br /&gt;
 &lt;br /&gt;
 - Assurez-vous que l'option '''Service de messagerie (SMS / MMS)''' soit activée.&lt;br /&gt;
&lt;br /&gt;
Activez l'option '''SMPP activé''', remplissez le nom d'utilisateur et le mot de passe selon ce qui a été configuré sur votre serveur SMPP et une fois terminé, appliquez les modifications en appuyant sur '''Cliquez ici pour appliquer les changements'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfigFR.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vous pouvez maintenant commencer à envoyer et à recevoir des messages SMS depuis votre serveur SMPP.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP_(FR)</id>
		<title>SMPP (FR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP_(FR)"/>
				<updated>2020-11-20T15:09:09Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration sur votre serveur SMPP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
[[File:Logo-VoIPms-light.png|left|400px]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|-&lt;br /&gt;
! Article in English !! artículo en Español&lt;br /&gt;
|-&lt;br /&gt;
| [[https://wiki.voip.ms/article/SMPP English]] || [[https://wiki.voip.ms/article/SMPP_(ES) Español]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Un serveur SMPP, acronyme de '''Short Message Peer to Peer''' est une méthode conçue pour envoyer et recevoir de gros volumes de messages SMS via un serveur dédié.&lt;br /&gt;
En d'autres termes, cela vous permet de mieux contrôler la quantité de messages qui seront envoyés à votre public cible tout en évitant de passer via une application softphone ou votre portail VoIP.ms pour envoyer / recevoir ces SMS, éliminant ainsi les multiples tâches répétitives et capitalisant votre temps.&lt;br /&gt;
&lt;br /&gt;
Par exemple, si vous avez une promotion pour votre entreprise qui offre une réduction pendant un certain laps de temps et que vos clients ont donné leur accord pour recevoir ces types de promotions par SMS, vous pouvez envoyer votre promotion à vos clients plus rapidement que si vous le faisiez depuis votre portail client, augmentant ainsi votre efficacité.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exigences==&lt;br /&gt;
&lt;br /&gt;
*Vous devrez avoir votre propre serveur SMPP&lt;br /&gt;
*Une fois configure adéquatement, vous pourrez ensuite envoyer et recevoir des messages SMS à votre propre serveur. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration sur votre serveur SMPP ===&lt;br /&gt;
Pour que votre serveur puisse communiquer et s'authentifier en correctement avec le serveur SMPP VoIP.ms, vous devrez configurer les éléments suivants:&lt;br /&gt;
*Un '''nom d'utilisateur''' et '''mot de passe''' de votre choix pour que le serveur SMPP deVoIP.ms vous authentifie.&lt;br /&gt;
*Envoyer toutes vos communications à '''smpp.voip.ms''' via le port '''2775 ''', pour le SMPP normal, ou le port '''3550''' qui est notre port SMPP crypté.&lt;br /&gt;
* Ouvrez une connexion à l'aide de la commande '''bind_transceiver'''. Vous pouvez garder cette connexion ouverte aussi longtemps que vous en avez besoin et vous renseigner à ce sujet en utilisant la commande '''enquire_link'''.&lt;br /&gt;
* Envoyez vos messages avec les commandes '''deliver_sm''' ou '''submit_sm'''. Assurez-vous d'inclure '''source_addr''' de votre PDU comme l'un de vos DID ayant la fonction SMS activé depuis votre compte. Votre numéro de SMS de destination doit être défini comme '''destination_addr''' tandis que votre SMS sera inclus dans '''short_message'''.&lt;br /&gt;
&lt;br /&gt;
Une fois que vous avez configuré le tout ci-haut sur votre serveur, vous devrez activer et spécifier le nom d'utilisateur et le mot de passe qui sera utilisé par VoIP.ms pour authentifier vos demandes SMPP. Pour cela, accédez à votre portail VoIP.ms, Numéros DID, Gestion des DID, modifiez votre DID qui prend en charge les messages SMS et en déroulant la page vers le bas, vous verrez les options suivantes:&lt;br /&gt;
&lt;br /&gt;
*SMPP Activé: Si cette option est sélectionnée, les messages SMS pourront être envoyés et reçus à l'aide de SMPP.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez également spécifier l'URL à utiliser pour envoyer une copie des messages entrants à votre serveur SMPP. Laisser vide si vouc ne désirez qu'envoyer des messages via SMPP.  Voir l'exemple ci-dessous. Le schéma est obligatoire et doit être défini sur smpp pour le SMPP non crypté ou sur ssmpp pour le SMPP crypté utilisant TLS. La partie user: password @ est facultative et utilisera par défaut le même nom d'utilisateur et mot de passe définis pour l'authentification de notre côté, comme défini ci-dessous. La partie : port est également facultative et sera par défaut à 2775 pour smpp et à 3550 pour ssmpp.&lt;br /&gt;
&lt;br /&gt;
*Nom d'utilisateur SMPP: Le nom d'utilisateur que vous utiliserez pour vous authentifier auprès de notre serveur SMPP pour l'envoi de messages&lt;br /&gt;
*Mot de passe SMPP: Le mot de passe que vous utiliserez pour vous authentifier auprès de notre serveur SMPP pour l'envoi de messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 - Afin d'éviter toute confusion lors de la configuration du nom d'utilisateur sur votre serveur, vous pouvez utiliser votre identifiant de compte VoIP.ms comme nom d'utilisateur (les 6 chiffres de votre compte).&lt;br /&gt;
 &lt;br /&gt;
 - Assurez-vous que l'option '''Service de messagerie (SMS / MMS)''' soit activée.&lt;br /&gt;
&lt;br /&gt;
Activez l'option '''SMPP activé''', remplissez le nom d'utilisateur et le mot de passe selon ce qui a été configuré sur votre serveur SMPP et une fois terminé, appliquez les modifications en appuyant sur '''Cliquez ici pour appliquer les changements'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfigFR.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vous pouvez maintenant commencer à envoyer et à recevoir des messages SMS depuis votre serveur SMPP.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-11-20T15:00:06Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your VoIP.ms Portal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
[[File:Logo-VoIPms-light.png|left|400px]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|-&lt;br /&gt;
! Article en Français !! Artículo en Español&lt;br /&gt;
|-&lt;br /&gt;
| [[https://wiki.voip.ms/article/SMPP_(FR)  Français]] || [[https://wiki.voip.ms/article/SMPP_(ES) Español]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your PDU's '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''short_message'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password will be used by VoIP.ms to authenticate your SMPP requests. In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages will be allowed to be sent and received using SMPP.&lt;br /&gt;
You may specify the URL to be used to send a copy of inbound messages to your SMPP server. Leave empty if you only wish to send messages.  See the example below. The '''scheme''' part is mandatory and must be set to either of '''smpp''' for unencrypted SMPP, or '''ssmpp''' for encrypted SMPP using TLS.  The '''user:password@''' part is optional and will default to the same username and password defined for authentication on our side as defined below. The ''':port''' part is also optional and will default to 2775 for '''smpp''' and to '''3550''' for ssmpp.&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
* '''SMPP Password:''' The password that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 - In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 - Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T14:24:58Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your VoIP.ms Portal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your PDU's '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''short_message'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password will be used by VoIP.ms to authenticate your SMPP requests. In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages will be allowed to be sent and received using SMPP.&lt;br /&gt;
You must also specify the URL to be used to send a copy of inbound messages to your SMPP server. See the example below. The '''scheme''' part is mandatory and must be set to either of '''smpp''' for unencrypted SMPP, or '''ssmpp''' for encrypted SMPP using TLS.  The '''user:password@''' part is optional and will default to the same username and password defined for authentication on our side as defined below. The ''':port''' part is also optional and will default to 2775 for '''smpp''' and to '''3550''' for ssmpp.&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
* '''SMPP Password:''' The password that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T14:24:40Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your VoIP.ms Portal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your PDU's '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''short_message'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password will be used by VoIP.ms to authenticate your SMPP requests. In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages will be allowed to be sent and received using SMPP.&lt;br /&gt;
You must also specify the URL to be used to send a copy of inbound messages to your SMPP server. See the example below. The '''scheme''' part is mandatory and must be set to either of '''smpp''' for unencrypted SMPP, or '''ssmpp''' for encrypted SMPP using TLS.  The '''user:password@''' part is optional and will default to the same username and password defined for authentication on our side as defined below. The ''':port''' part is also optional and will default to 2775 for '''smpp''' and to '''3550''' for ssmpp.&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
* '''SMPP Password:''' The password that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T14:24:24Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your VoIP.ms Portal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your PDU's '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''short_message'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password will be used by VoIP.ms to authenticate your SMPP requests.&lt;br /&gt;
&lt;br /&gt;
In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages will be allowed to be sent and received using SMPP.&lt;br /&gt;
You must also specify the URL to be used to send a copy of inbound messages to your SMPP server. See the example below. The '''scheme''' part is mandatory and must be set to either of '''smpp''' for unencrypted SMPP, or '''ssmpp''' for encrypted SMPP using TLS.  The '''user:password@''' part is optional and will default to the same username and password defined for authentication on our side as defined below. The ''':port''' part is also optional and will default to 2775 for '''smpp''' and to '''3550''' for ssmpp.&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
* '''SMPP Password:''' The password that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T14:23:33Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your SMPP Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your PDU's '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''short_message'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password VoIP.ms will be used to authenticate your SMPP requests.&lt;br /&gt;
&lt;br /&gt;
In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages will be allowed to be sent and received using SMPP.&lt;br /&gt;
You must also specify the URL to be used to send a copy of inbound messages to your SMPP server. See the example below. The '''scheme''' part is mandatory and must be set to either of '''smpp''' for unencrypted SMPP, or '''ssmpp''' for encrypted SMPP using TLS.  The '''user:password@''' part is optional and will default to the same username and password defined for authentication on our side as defined below. The ''':port''' part is also optional and will default to 2775 for '''smpp''' and to '''3550''' for ssmpp.&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
* '''SMPP Password:''' The password that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T14:21:46Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your VoIP.ms Portal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''destination_addr'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password VoIP.ms will be used to authenticate your SMPP requests.&lt;br /&gt;
&lt;br /&gt;
In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages will be allowed to be sent and received using SMPP.&lt;br /&gt;
You must also specify the URL to be used to send a copy of inbound messages to your SMPP server. See the example below. The '''scheme''' part is mandatory and must be set to either of '''smpp''' for unencrypted SMPP, or '''ssmpp''' for encrypted SMPP using TLS.  The '''user:password@''' part is optional and will default to the same username and password defined for authentication on our side as defined below. The ''':port''' part is also optional and will default to 2775 for '''smpp''' and to '''3550''' for ssmpp.&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
* '''SMPP Password:''' The password that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T14:21:05Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your VoIP.ms Portal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''destination_addr'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password VoIP.ms will be used to authenticate your SMPP requests.&lt;br /&gt;
&lt;br /&gt;
In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages will be allowed to be sent and received using SMPP.&lt;br /&gt;
You must also specify the URL to be used to send a copy of inbound messages to your SMPP server.  See the example below.  The '''scheme''' par is mandatory and must be set to either of '''smpp''' for unencrypted SMPP, or '''ssmpp''' for encrypted SMPP using TLS.  The '''user:password@''' part is optional and will default to the same username and password defined for authentication on our side as defined below.  The ''':port''' part is also optional and will default to 2775 for '''smpp''' and to '''3550''' for ssmpp.&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
* '''SMPP Password:''' The password that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/File:SMPPconfig.png</id>
		<title>File:SMPPconfig.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/File:SMPPconfig.png"/>
				<updated>2020-10-26T14:11:22Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: uploaded a new version of &amp;amp;quot;File:SMPPconfig.png&amp;amp;quot;: Fixed SMPP URL field.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T13:58:41Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your VoIP.ms Portal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''destination_addr'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password VoIP.ms will be used to authenticate your SMPP requests.&lt;br /&gt;
&lt;br /&gt;
In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages will be allowed to be sent and received using SMPP.&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
* '''SMPP Password:''' The password that you will use to authenticate to our SMPP server for sending messages&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T13:53:05Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your SMPP Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_sm''' or '''submit_sm''' commands.  Make sure to include your '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''destination_addr'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password VoIP.ms will be authorized to authenticate.&lt;br /&gt;
&lt;br /&gt;
In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages received by your DID will send a GET request to the URL callback provided.&lt;br /&gt;
&lt;br /&gt;
'''Here are the available variables for your URL:'''&lt;br /&gt;
&lt;br /&gt;
{ID}&lt;br /&gt;
&lt;br /&gt;
{TIMESTAMP}&lt;br /&gt;
&lt;br /&gt;
{FROM}&lt;br /&gt;
&lt;br /&gt;
{TO}&lt;br /&gt;
&lt;br /&gt;
{MESSAGE}&lt;br /&gt;
&lt;br /&gt;
'''For example:''' http://mysite.com/sms.php?to={TO}&amp;amp;from={FROM}&amp;amp;message={MESSAGE}&amp;amp;id={ID}&amp;amp;date={TIMESTAMP}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that has been configured on your SMPP server in order for VoIP.ms to authorize the authentication&lt;br /&gt;
* '''SMPP Password:''' The password that has been configured on your SMPP server in order for VoIP.ms to authorize the authentication&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T13:51:27Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Configuration on your SMPP Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* Have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', for regular SMPP, or port '''3550''' which is our encrypted SMPP port.&lt;br /&gt;
* Open a connection using the '''bind_transceiver''' command.  You can keep this connection open for as long as you need to and inquire about it using the '''enquire_link''' command.&lt;br /&gt;
* Send your messages with either '''deliver_SM''' or '''submit_sm''' commands.  Make sure to include your '''source_addr''' as one of your SMS enabled DIDs from your account.  Your destination SMS number should be set as '''destination_addr''' while your text message will be included in '''destination_addr'''.&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password VoIP.ms will be authorized to authenticate.&lt;br /&gt;
&lt;br /&gt;
In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages received by your DID will send a GET request to the URL callback provided.&lt;br /&gt;
&lt;br /&gt;
'''Here are the available variables for your URL:'''&lt;br /&gt;
&lt;br /&gt;
{ID}&lt;br /&gt;
&lt;br /&gt;
{TIMESTAMP}&lt;br /&gt;
&lt;br /&gt;
{FROM}&lt;br /&gt;
&lt;br /&gt;
{TO}&lt;br /&gt;
&lt;br /&gt;
{MESSAGE}&lt;br /&gt;
&lt;br /&gt;
'''For example:''' http://mysite.com/sms.php?to={TO}&amp;amp;from={FROM}&amp;amp;message={MESSAGE}&amp;amp;id={ID}&amp;amp;date={TIMESTAMP}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that has been configured on your SMPP server in order for VoIP.ms to authorize the authentication&lt;br /&gt;
* '''SMPP Password:''' The password that has been configured on your SMPP server in order for VoIP.ms to authorize the authentication&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SMPP</id>
		<title>SMPP</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SMPP"/>
				<updated>2020-10-26T13:42:09Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An SMPP server, short of '''Short Message Peer to Peer''' is a method designed to send and receive high volumes of SMS messages through a dedicated server.&lt;br /&gt;
&lt;br /&gt;
In other words, this allows you to better control the quantity of messages that will be sent to your target audience while avoiding to pass via a softphone application or your VoIP.ms portal to send/receive these SMS, thus eliminating multiple repetitive tasks and saving you time.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a promotion for your business that offers a discount for a certain lapse of time and that your customers have provided their agreement to receive these types of promotions via SMS, you could send your promotion to your customers in a faster manner than if you would do it from your customer portal, thus increasing efficiency. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
This will require you to have your own SMPP server.&lt;br /&gt;
Once configured properly, you will then be able to send and receive SMS messages to your own server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your SMPP Server ===&lt;br /&gt;
&lt;br /&gt;
In order for your server to communicate and authenticate accordingly with VoIP.ms SMPP server, you will need to configure the following:&lt;br /&gt;
&lt;br /&gt;
* A '''username''' and '''password''' of your choice in order for VoIP.ms SMPP server to authenticate you.&lt;br /&gt;
* have all your communications be sent to '''smpp.voip.ms''' via port '''2775''', or '''3550''' which is our encrypted port.&lt;br /&gt;
* Ensure that your messages are being sent with either '''deliver_SM''' or '''Submit_sm''' commands, which are the only two current methods being supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration on your VoIP.ms Portal ===&lt;br /&gt;
&lt;br /&gt;
Once you have set up the above on your server, you will need to enable and specify which username and password VoIP.ms will be authorized to authenticate.&lt;br /&gt;
&lt;br /&gt;
In order to do so, head into your VoIP.ms portal, DID Numbers, Manage DIDs, edit your DID that supports SMS messages and by heading down the page, you will see the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Enabled:''' If selected, SMS Messages received by your DID will send a GET request to the URL callback provided.&lt;br /&gt;
&lt;br /&gt;
'''Here are the available variables for your URL:'''&lt;br /&gt;
&lt;br /&gt;
{ID}&lt;br /&gt;
&lt;br /&gt;
{TIMESTAMP}&lt;br /&gt;
&lt;br /&gt;
{FROM}&lt;br /&gt;
&lt;br /&gt;
{TO}&lt;br /&gt;
&lt;br /&gt;
{MESSAGE}&lt;br /&gt;
&lt;br /&gt;
'''For example:''' http://mysite.com/sms.php?to={TO}&amp;amp;from={FROM}&amp;amp;message={MESSAGE}&amp;amp;id={ID}&amp;amp;date={TIMESTAMP}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''SMPP Username:''' The username that has been configured on your SMPP server in order for VoIP.ms to authorize the authentication&lt;br /&gt;
* '''SMPP Password:''' The password that has been configured on your SMPP server in order for VoIP.ms to authorize the authentication&lt;br /&gt;
&lt;br /&gt;
 '''Notes'''&lt;br /&gt;
 *In order to help avoid any confusion while configuring the username on your server, you can use your VoIP.ms account ID as a username (the 6 digits of your account).&lt;br /&gt;
 &lt;br /&gt;
 *Make sure to have the option '''Message Service (SMS/MMS)''' enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable the option '''SMPP Enabled''', fill the username and password per what was configured on your SMPP server and once done, apply the changes by pressing '''Click here to apply changes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SMPPconfig.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now start sending and receiving SMS messages from your SMPP server.&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:40:38Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the dial-plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace '''NNNNNNNNNN''' with the extension identifier, which should be the same as one of your DIDs, as mentioned above.  Note the (+) symbol, which specifies that the setting is to be added to the existing extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''extensions_custom.conf'''. &lt;br /&gt;
# Add each of the following blocks of code, making the appropriate replacements as indicated: &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
The following assumes that there is a direct correspondence between the destination number, taken from the '''X-SMS-To''' SIP header, and the name of the PJSIP profile the message should be sent to.  Otherwise, you will need to add some code to do the mapping.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
Make sure you replace '''TRUNK_NAME''' with the name of your PJSIP trunk that is registering with a VoIP.ms server.  Also replace '''VOIPMS_ACCOUNT''' with the account (or sub-account) that is used to do so, as well as '''VOIPMS_SERVER_NAME''' with the domain name of the VoIP.ms server (something like '''sanjose2.voip.ms''' for example).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:VOIPMS_ACCOUNT@VOIPMS_SERVER_NAME&amp;gt;) ; Replace VOIPMS_ACCOUNT and VOIPMS_SERVER_NAME with their corresponding values&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:TRUNK_NAME/sip:${NUMBER_TO}@VOIPMS_SERVER_NAME&amp;gt;)      ; Replace TRUNK_NAME and VOIPMS_SERVER_NAME with their corresponding values&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:39:59Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace '''NNNNNNNNNN''' with the extension identifier, which should be the same as one of your DIDs, as mentioned above.  Note the (+) symbol, which specifies that the setting is to be added to the existing extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''extensions_custom.conf'''. &lt;br /&gt;
# Add each of the following blocks of code: &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
The following assumes that there is a direct correspondence between the destination number, taken from the '''X-SMS-To''' SIP header, and the name of the PJSIP profile the message should be sent to.  Otherwise, you will need to add some code to do the mapping.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
Make sure you replace '''TRUNK_NAME''' with the name of your PJSIP trunk that is registering with a VoIP.ms server.  Also replace '''VOIPMS_ACCOUNT''' with the account (or sub-account) that is used to do so, as well as '''VOIPMS_SERVER_NAME''' with the domain name of the VoIP.ms server (something like '''sanjose2.voip.ms''' for example).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:VOIPMS_ACCOUNT@VOIPMS_SERVER_NAME&amp;gt;) ; Replace VOIPMS_ACCOUNT and VOIPMS_SERVER_NAME with their corresponding values&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:TRUNK_NAME/sip:${NUMBER_TO}@VOIPMS_SERVER_NAME&amp;gt;)      ; Replace TRUNK_NAME and VOIPMS_SERVER_NAME with their corresponding values&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:39:09Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace '''NNNNNNNNNN''' with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''extensions_custom.conf'''. &lt;br /&gt;
# Add each of the following blocks of code: &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
The following assumes that there is a direct correspondence between the destination number, taken from the '''X-SMS-To''' SIP header, and the name of the PJSIP profile the message should be sent to.  Otherwise, you will need to add some code to do the mapping.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
Make sure you replace '''TRUNK_NAME''' with the name of your PJSIP trunk that is registering with a VoIP.ms server.  Also replace '''VOIPMS_ACCOUNT''' with the account (or sub-account) that is used to do so, as well as '''VOIPMS_SERVER_NAME''' with the domain name of the VoIP.ms server (something like '''sanjose2.voip.ms''' for example).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:VOIPMS_ACCOUNT@VOIPMS_SERVER_NAME&amp;gt;) ; Replace VOIPMS_ACCOUNT and VOIPMS_SERVER_NAME with their corresponding values&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:TRUNK_NAME/sip:${NUMBER_TO}@VOIPMS_SERVER_NAME&amp;gt;)      ; Replace TRUNK_NAME and VOIPMS_SERVER_NAME with their corresponding values&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:38:53Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''extensions_custom.conf'''. &lt;br /&gt;
# Add each of the following blocks of code: &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
The following assumes that there is a direct correspondence between the destination number, taken from the '''X-SMS-To''' SIP header, and the name of the PJSIP profile the message should be sent to.  Otherwise, you will need to add some code to do the mapping.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
Make sure you replace '''TRUNK_NAME''' with the name of your PJSIP trunk that is registering with a VoIP.ms server.  Also replace '''VOIPMS_ACCOUNT''' with the account (or sub-account) that is used to do so, as well as '''VOIPMS_SERVER_NAME''' with the domain name of the VoIP.ms server (something like '''sanjose2.voip.ms''' for example).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:VOIPMS_ACCOUNT@VOIPMS_SERVER_NAME&amp;gt;) ; Replace VOIPMS_ACCOUNT and VOIPMS_SERVER_NAME with their corresponding values&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:TRUNK_NAME/sip:${NUMBER_TO}@VOIPMS_SERVER_NAME&amp;gt;)      ; Replace TRUNK_NAME and VOIPMS_SERVER_NAME with their corresponding values&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:30:59Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the inbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''extensions_custom.conf'''. &lt;br /&gt;
# Add each of the following blocks of code: &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
The following assumes that there is a direct correspondence between the destination number, taken from the '''X-SMS-To''' SIP header, and the name of the PJSIP profile the message should be sent to.  Otherwise, you will need to add some code to do the mapping.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:VOIPMS_ACCOUNT@VOIPMS_SERVER_NAME&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:TRUNK_NAME/sip:${NUMBER_TO}@VOIPMS_SERVER_NAME&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:30:03Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''extensions_custom.conf'''. &lt;br /&gt;
# Add each of the following blocks of code: &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; The following assumes that there is a direct correspondence &lt;br /&gt;
; between the destination number, taken from the X-SMS-To SIP header,&lt;br /&gt;
; and the name of the PJSIP profile the message should be sent to.&lt;br /&gt;
; Otherwise, you will need to add some code to do the mapping.&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:VOIPMS_ACCOUNT@VOIPMS_SERVER_NAME&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:TRUNK_NAME/sip:${NUMBER_TO}@VOIPMS_SERVER_NAME&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:28:11Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the inbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''extensions_custom.conf'''. &lt;br /&gt;
# Add each of the following blocks of code: &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; The following assumes that there is a direct correspondence &lt;br /&gt;
; between the destination number, taken from the X-SMS-To SIP header,&lt;br /&gt;
; and the name of the PJSIP profile the message should be sent to.&lt;br /&gt;
; Otherwise, you will need to add some code to do the mapping.&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:25:05Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the dial-plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''extensions_custom.conf'''. &lt;br /&gt;
# Add each of the following blocks of code: &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:22:37Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the dial-plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
The next step is to fill in your FreePBX dial-plan with the necessary code to handle inbound and outbound SMS.    &lt;br /&gt;
&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:21:05Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/Config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:20:46Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension name&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:20:20Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[NNNNNNNNNN](+)         ; Replace NNNNNNNNNN with the corresponding PJSIP extension profile&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:19:25Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to '''Admin/config Edit'''.  In the Asterisk custom Configuration Files, find '''pjsip.endpoint_custom_post.conf'''.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace NNNNNNNNNN with the extension identifier, which should be the same as one of your DIDs as mentioned above.  Nothe the (+) symbol, which specifies that the setting is to be added to the existing setting extension:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
['''NNNNNNNNNN'''](+)&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:15:05Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the inbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to '''Connectivity/Trunks'''.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In '''PJSIP Settings''', choose the '''Advanced''' tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the '''Message Context''' field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:13:06Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
&lt;br /&gt;
For this particular tutorial, we assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to Connectivity/Trunks.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:12:23Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer PJSIP channel driver.  This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.  Each of these extensions is named after one of the SMS enabled DIDs from your VoIP.ms account and the caller ID is set to the same number.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to Connectivity/Trunks.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-17T14:08:22Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the inbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP Extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to Connectivity/Trunks.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-in]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Inbound SMS dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:${NUMBER_TO}@${HOST_TO})&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T19:31:38Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Filling in the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP Extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to Connectivity/Trunks.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[sms-out]&lt;br /&gt;
exten =&amp;gt; _.,1,NoOp(Outbound Message dialplan invoked)&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(To ${MESSAGE(to)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(From ${MESSAGE(from)})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Body ${MESSAGE(body)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_FROM=&amp;quot;${NUMBER_FROM}&amp;quot; &amp;lt;sip:166961_freepbx@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,Set(ACTUAL_TO=pjsip:Michel_pjsip/sip:${NUMBER_TO}@sanjose2.voip.ms&amp;gt;)&lt;br /&gt;
exten =&amp;gt; _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})&lt;br /&gt;
exten =&amp;gt; _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})&lt;br /&gt;
exten =&amp;gt; _.,n,Hangup()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T19:21:35Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP Extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to Connectivity/Trunks.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=sms-out&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T19:21:18Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the inbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP Extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to Connectivity/Trunks.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''sms-in''' in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:54:33Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the inbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP Extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings:&lt;br /&gt;
# Go to Connectivity/Trunks.  Find the PJSIP Trunk that is the one connecting to the VoIP.ms POP in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter '''msgin''' in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:52:47Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the inbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP Extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.  The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:52:08Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the inbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP Extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging with FreePBX is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:50:49Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added one or more PJSIP Extensions to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:49:52Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:49:16Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:48:56Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = aor&lt;br /&gt;
contact = sip:100000@atlanta.voip.ms             ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = endpoint&lt;br /&gt;
transport = transport-udp&lt;br /&gt;
context = mycontext&lt;br /&gt;
disallow = all&lt;br /&gt;
allow = ulaw&lt;br /&gt;
; allow=g729                 ; uncomment if you support g729&lt;br /&gt;
from_user = 100000           ; (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)&lt;br /&gt;
auth = voipms&lt;br /&gt;
outbound_auth = voipms&lt;br /&gt;
aors = voipms&lt;br /&gt;
; NAT parameters:&lt;br /&gt;
rtp_symmetric = yes&lt;br /&gt;
rewrite_contact = yes&lt;br /&gt;
send_rpid = yes&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = identify&lt;br /&gt;
endpoint = voipms&lt;br /&gt;
match = atlanta.voip.ms      ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:48:35Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[transport-udp]&lt;br /&gt;
type = transport&lt;br /&gt;
protocol = udp&lt;br /&gt;
bind = 0.0.0.0&lt;br /&gt;
&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = registration&lt;br /&gt;
transport = transport-udp&lt;br /&gt;
outbound_auth = voipms&lt;br /&gt;
client_uri = sip:100000@atlanta.voip.ms:5060     ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
server_uri = sip:atlanta.voip.ms:5060            ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = auth&lt;br /&gt;
auth_type = userpass&lt;br /&gt;
username = 100000            ; (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)&lt;br /&gt;
password = johnspassword     ; your password&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = aor&lt;br /&gt;
contact = sip:100000@atlanta.voip.ms             ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = endpoint&lt;br /&gt;
transport = transport-udp&lt;br /&gt;
context = mycontext&lt;br /&gt;
disallow = all&lt;br /&gt;
allow = ulaw&lt;br /&gt;
; allow=g729                 ; uncomment if you support g729&lt;br /&gt;
from_user = 100000           ; (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)&lt;br /&gt;
auth = voipms&lt;br /&gt;
outbound_auth = voipms&lt;br /&gt;
aors = voipms&lt;br /&gt;
; NAT parameters:&lt;br /&gt;
rtp_symmetric = yes&lt;br /&gt;
rewrite_contact = yes&lt;br /&gt;
send_rpid = yes&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = identify&lt;br /&gt;
endpoint = voipms&lt;br /&gt;
match = atlanta.voip.ms      ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:47:44Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: /* Setting the outbound messaging context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[transport-udp]&lt;br /&gt;
type = transport&lt;br /&gt;
protocol = udp&lt;br /&gt;
bind = 0.0.0.0&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = registration&lt;br /&gt;
transport = transport-udp&lt;br /&gt;
outbound_auth = voipms&lt;br /&gt;
client_uri = sip:100000@atlanta.voip.ms:5060     ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
server_uri = sip:atlanta.voip.ms:5060            ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = auth&lt;br /&gt;
auth_type = userpass&lt;br /&gt;
username = 100000            ; (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)&lt;br /&gt;
password = johnspassword     ; your password&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = aor&lt;br /&gt;
contact = sip:100000@atlanta.voip.ms             ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = endpoint&lt;br /&gt;
transport = transport-udp&lt;br /&gt;
context = mycontext&lt;br /&gt;
disallow = all&lt;br /&gt;
allow = ulaw&lt;br /&gt;
; allow=g729                 ; uncomment if you support g729&lt;br /&gt;
from_user = 100000           ; (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)&lt;br /&gt;
auth = voipms&lt;br /&gt;
outbound_auth = voipms&lt;br /&gt;
aors = voipms&lt;br /&gt;
; NAT parameters:&lt;br /&gt;
rtp_symmetric = yes&lt;br /&gt;
rewrite_contact = yes&lt;br /&gt;
send_rpid = yes&lt;br /&gt;
&lt;br /&gt;
[voipms]&lt;br /&gt;
type = identify&lt;br /&gt;
endpoint = voipms&lt;br /&gt;
match = atlanta.voip.ms      ; (one of our multiple servers, you can choose the one closer to your location)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:45:47Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:17:11Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&amp;lt;br /&amp;gt;&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filling in the dial-plan ==&lt;br /&gt;
=== Filling in the inbound messaging context ===&lt;br /&gt;
=== Filling in the outbound messaging context ===&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:15:20Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension identifier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&amp;lt;br /&amp;gt;&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:14:21Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&amp;lt;br /&amp;gt;&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:12:02Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	<entry>
		<id>https://wiki.voip.ms/article/SIP/SMS_with_FreePBX</id>
		<title>SIP/SMS with FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.voip.ms/article/SIP/SMS_with_FreePBX"/>
				<updated>2019-07-16T17:11:44Z</updated>
		
		<summary type="html">&lt;p&gt;Michel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page will detail the basic configuration required in order to send and receive SMS messages through FreePBX&lt;br /&gt;
&lt;br /&gt;
The information in this page is based on the newer Chan_PJSIP channel driver.  This is because the older Chan_SIP driver does not correctly implement authentication for SIP messaging, which is mandatory with VoIP.ms servers for security reasons.  The current version of FreePBX supports using both SIP channel drivers side by side without any issue.&lt;br /&gt;
We therefore assume the following:&lt;br /&gt;
* You have configured your FreePBX so that it has a PJSIP trunk that is registering with one of the VoIP.ms POPs (Point of Presence).&lt;br /&gt;
* You have added a PJSIP Extension to your FreePBX configuration, with appropriate routes for sending and receiving phone calls.&lt;br /&gt;
* You have a soft-phone that is configured for registering with the above FreePBX extension, for making and receiving phone calls.  This soft-phone also has the ability to send and receive SIP text messages.&lt;br /&gt;
&lt;br /&gt;
You will find that the information in this page is geared towards implementing SIP messaging and has little mention of SMS.  That's because sending an SMS from SIP, using the VoIP.ms gateway, starts as a SIP message where the source and destination are identifiable as SMS capable phone numbers.  The VoIP.ms SIP/SMS gateway does all the rest.&lt;br /&gt;
&lt;br /&gt;
== Setting the messaging contexts ==&lt;br /&gt;
=== Setting the inbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
The first step in implementing SIP messaging is setting the contexts for inbound and outbound messaging.  These contexts are the places, in the FreePBX dial-plan, where inbound and outbound messages will be handled.&lt;br /&gt;
&lt;br /&gt;
The inbound context is specified as part of your PJSIP Trunk settings.&lt;br /&gt;
# Go to Connectivity/Trunks.  Find your trunk in the list and edit it.&lt;br /&gt;
# In PJSIP Settings, choose the Advanced tab.&lt;br /&gt;
# Scroll to the bottom of the page and enter &amp;quot;msgin&amp;quot; in the Message Context field.&lt;br /&gt;
# Submit your changes and Apply the new config.&lt;br /&gt;
&lt;br /&gt;
=== Setting the outbound messaging context ===&lt;br /&gt;
&lt;br /&gt;
Setting the outbound context is a little trickier.  This setting needs to be applied to each PJSIP extension that is to be used for sending messages.  However, the setting does not exist in the user interface, so it needs to be added manually using the configuration editor.&lt;br /&gt;
# Go to Admin/config Edit.  In the Asterisk custom Configuration Files, find pjsip.endpoint_custom_post.conf.&lt;br /&gt;
# For each of your PJSIP extension, add the following block of text, making sure to replace &amp;quot;nnnnnnn&amp;quot; with the extension name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[nnnnnnn](+)&lt;br /&gt;
&lt;br /&gt;
message_context=msgout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fixed width text&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michel</name></author>	</entry>

	</feed>