Incredible PBX - VoIP.ms Wiki

Check out our YouTube channel to watch our simple tutorials that will help you set up most of our features.

Incredible PBX

From VoIP.ms Wiki

(Difference between revisions)
Jump to: navigation, search
[checked revision][checked revision]
(Created page with "'''Prequisist''' : 1) A Incredible PBX completly installed. : 2) You must have an active DID in your VoIP.ms account and a Sub-Account. : 3) Your DID Must be routed to the Sub-...")
Line 69: Line 69:
'''GUIDELINE'''
'''GUIDELINE'''
-
'''In the [sms-out] context, edit:'''  
+
In the '''[sms-out] context''', edit:
Line [2] Replace 5551112222 with your DID.  
Line [2] Replace 5551112222 with your DID.  
Line 80: Line 80:
-
'''In the [sms-in] context'''
+
In the '''[sms-in] context''', edit:
Replace the '''747''' entry with the PJSIP extension you've created previously.  
Replace the '''747''' entry with the PJSIP extension you've created previously.  
Line 86: Line 86:
To notify multiple extensions when a new incoming SMS, uncomment the respective lines ''(by removing the ; at the beginig of the line)'' and enter the proper PJSIP extension numbers.  
To notify multiple extensions when a new incoming SMS, uncomment the respective lines ''(by removing the ; at the beginig of the line)'' and enter the proper PJSIP extension numbers.  
-
Save the file, and reload the Asterisk dialplan: asterisk -rx "dialplan reload"
+
Save the file, and reload the Asterisk dialplan using the command line: '''asterisk -rx "dialplan reload"'''
-
Interesting fact if you have an Yealink T46G (not T48G) who is registered the extension created, the SMS will also appear on the IP Phone with an alert tone.
+
'''Interesting Fact'''
-
The log can be accessed on the phone by Menu -> Message -> Text Message.
+
''If you have an Yealink T46G (not T48G) who is registered the extension created, the SMS will also appear on the IP Phone with an alert tone.''
 +
 
 +
''The log can be accessed on the phone by Menu -> Message -> Text Message.''

Revision as of 21:06, 12 March 2021

Prequisist

1) A Incredible PBX completly installed.
2) You must have an active DID in your VoIP.ms account and a Sub-Account.
3) Your DID Must be routed to the Sub-Account.
4) Your DID must have the option SMS enabled and the option "SMS SIP Account" enabled with the same Sub-Account selected.

Create a PJSIP Trunk

You will need to create a new PJSIP Trunk via your FreePBX portal in order to process calls and SMS messages:

In the PJSIP Settings tab, fill out the General tab. Username: will be your VoIP.ms sub-account ######_SubAccount. Password: will be your Sub-Account password. SIP Server, enter VoIP.ms POP server associated with your DID. e.g. montreal3.voip.ms. Accept the remaining defaults in the General tab. Click on the Advanced tab and scroll down to Message Context and enter sms-in. Click Submit and Reload your Dialplan.

Create a new PJSIP extension

Now, you will need to create a new PJSIP Extension in via your FreePBX portal also to process calls and SMS.

NOTE: The "Incredible PBX 2020" comes with a few preconfigured chan_sip extensions. Do NOT use them. You must create a new "PJSIP" extension.

Click on the Advanced tab and then scroll down to Max Contacts. Enter a value that is one more than twice the number of phones that will be connected to this extension simultaneously. For instance, if you have 3 smartphones connecting to this specific extension, you would enter the value 7. Now scroll down to Message Context and type "sms-out". Click Submit and reload your Dialplan.


Add some code in extensions_custom.conf

Almost done! Now you need to copy/paste the following "context" at the end of this file extensions_custom.conf located in the directory /etc/asterisk:

[sms-out]
exten => _.,1,NoOp(Outbound Message dialplan invoked)
exten => _.,n,Set(VOIPMS_DID="5551112222")
exten => _.,n,Set(VOIPMS_ACCTNAME="######_SubAccount")
exten => _.,n,Set(VOIPMS_POP="montreal3.voip.ms")
exten => _.,n,Set(VOIPMS_TRUNK="VoIPms-PJsip")
exten => _.,n,NoOp(To ${MESSAGE(to)})
exten => _.,n,NoOp(From ${MESSAGE(from)})
exten => _.,n,NoOp(Body ${MESSAGE(body)})
exten => _.,n,Set(NUMBER_TO=${CUT(CUT(MESSAGE(to),@,1),:,2)})
exten => _.,n,Set(EXTENSION_FROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})
exten => _.,n,Set(ACTUAL_FROM="${VOIPMS_DID}" )
exten => _.,n,Set(ACTUAL_TO=pjsip:${VOIPMS_TRUNK}/sip:${NUMBER_TO}@${VOIPMS_POP}>)
exten => _.,n,MessageSend(${ACTUAL_TO},${ACTUAL_FROM})
exten => _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => _.,n,Hangup()
;-------------------------------------------------------------------------

[sms-in]
exten => _.,1,NoOp(Inbound SMS dialplan invoked)
exten => _.,n,NoOp(To ${MESSAGE(to)})
exten => _.,n,NoOp(From ${MESSAGE(from)})
exten => _.,n,NoOp(Body ${MESSAGE(body)})
exten => _.,n,Set(ACTUAL_FROM=${MESSAGE(from)})
exten => _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)})
exten => _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)})
exten => _.,n,MessageSend(pjsip:747@${HOST_TO},${ACTUAL_FROM})
exten => _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
;exten => _.,n,MessageSend(pjsip:748@${HOST_TO},${ACTUAL_FROM})
;exten => _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
;exten => _.,n,MessageSend(pjsip:749@${HOST_TO},${ACTUAL_FROM})
;exten => _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => _.,n,Hangup()
;-------------------------------------------------------------------------

GUIDELINE

In the [sms-out] context, edit:

Line [2] Replace 5551112222 with your DID.

Line [3] Replace ######_SubAccount with your VoIP.ms sub-account.

Line [4] Replace montreal3.voip.ms with the POP associated with your DID.

Line [5] Replace "VoIPms-PJsip" with your PJSIP Trunk name you've created previously.


In the [sms-in] context, edit:

Replace the 747 entry with the PJSIP extension you've created previously.

To notify multiple extensions when a new incoming SMS, uncomment the respective lines (by removing the ; at the beginig of the line) and enter the proper PJSIP extension numbers.

Save the file, and reload the Asterisk dialplan using the command line: asterisk -rx "dialplan reload"


Interesting Fact

If you have an Yealink T46G (not T48G) who is registered the extension created, the SMS will also appear on the IP Phone with an alert tone.

The log can be accessed on the phone by Menu -> Message -> Text Message.

Personal tools
Namespaces
Variants
Actions
VoIP.ms Wiki
Guides 🇨🇦
Guías 🇲🇽