After spending almost a month getting basic inbound and outbound calls to work, I’m moving to the next major task - enabling SMS and MMS. From what little I’veredonline, FreePBX supports SMS if you’re using SIPStation (SIP trunk) and Zulu. My current SIP trunk is through VoIP.ms, and I followed this documentation:
However, I now have more questions than answers. After performing the configuration changes, I am still in a position where I can only send/receive text messages through VoIP.ms’s web interface. I can’t do so via my current softphone. I feel like an idiot who’s missed something obvious, and even VoIP.ms’s online customer service wasn’t quite able to demystify this for me. I was hoping to port my Google Voice number over, but I can’t do so if I lose this functionality. I also saw this post:
I was unable to replicate their success. During my online search, I ran into a few projects for self-hostedSMSgateways. They all look cool, but I don’t know if those will be of much use to me. Isn’t VoIP.ms acting as my SMS gateway in this scenario?
How can I send/receive SMS and MMS, without using VoIP.ms’s web interface?
I own/use all phone numbers listed in the logs. I placed one test call to myself, to make sure my trunk and outbound route works.
EDIT: Just minutes after posting those pastebin links, I received 2 calls from one of my DIDs that I don’t remember placing. I may need to remove these pastebin links once we’ve figured this out.
Can you please explain what happened in these logs?
It looks to me like a misconfigured using from-internal instead of from-pstn and then something is setting the context to ast_msg_queue. So if I am reading this right, it looks like you are receiving an SMS to the from-internal context which tries to place an outgoing call.
Follow the VoIP.ms wiki and it should work fine, if it doesn’t report back with logs.
I think so. That’s the only option I’ve been using during my setup (SIP trunk, outbound/inbound rules, etc.) thus far. I’ve heard of chan_sip, but I think that’s legacy/deprecated (not viable for use).
And repeat that for every extension that can send SMS.
FreePBX, a normally used, expects endpoint names to be the same as extension numbers, as you would dial them, and, unlike Asterisk, uses extension to refer to both of them.
Glad that I kept it simple and have only added one extension so far (0001). The instructions from VoIP.ms made it sound like they wanted either a DID number or the Extension’s alphanumeric Name/ID. Testing that change now:
Still didn’t go through I know that SMS/MMS is enabled for my DID. It looks like Google Voice and VoIP.ms are fine. Still not sure about FreePBX config. Here’s what I’ve got so far…
This appears to be an error in the instructions from voip.ms. They may have used <…> to indicate a meta name, then thought that might confuse, but missed the closing >, when removing the brackets. Most people would have corrected the error themselves.
I’m not sure if this counts exactly as an inbound trace. I sent an SMS to my DID, from my Google Voice number, and grabbed the resulting Asterisk log lines.
34 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:1] NoOp("Message/ast_msg_queue", "Inbound SMS dialplan invoked") in new stack
35 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:2] NoOp("Message/ast_msg_queue", "To pjsip:[email protected];line=exkkpfi") in new stack
36 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:3] NoOp("Message/ast_msg_queue", "From "4438407417" <sip:[email protected]>") in new stack
37 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:4] NoOp("Message/ast_msg_queue", "Body Testing inbound SMS, can you see me?") in new stack
38 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:5] Set("Message/ast_msg_queue", "ACTUAL_FROM="4438407417" <sip:[email protected]>") in new stack
39 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:6] Set("Message/ast_msg_queue", "HOST_TO=108.3.168.21;line=exkkpfi") in new stack
40 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:7] Set("Message/ast_msg_queue", "NUMBER_TO=4438407730") in new stack
41 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:8] Gosub("Message/ast_msg_queue", "sms-in,T_4438407730,1") in new stack
42 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [T_4438407730@sms-in:1] NoOp("Message/ast_msg_queue", "Inbound SMS dialplan invoked") in new stack
43 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [T_4438407730@sms-in:2] NoOp("Message/ast_msg_queue", "To pjsip:[email protected];line=exkkpfi") in new stack
44 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [T_4438407730@sms-in:3] Return("Message/ast_msg_queue", "") in new stack
45 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Executing [s@sms-in:9] Hangup("Message/ast_msg_queue", "") in new stack
46 [2022-10-08 14:54:37] VERBOSE[2839][C-00000001] pbx.c: Spawn extension (sms-in, s, 9) exited non-zero on 'Message/ast_msg_queue'
I’ll be reviewing this, to see if I can figure out where I tripped up.