Asterisk 18 and sending txt messages and files over SIP

So I have voice and audio working but not txt messages or file transfer

this is the message I am getting as an error

[Feb  8 00:15:27] ERROR[22715][C-00000001]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("%231", "(null)", ...): Name or service not known
[Feb  8 00:15:27] WARNING[22715][C-00000001]: chan_sip.c:6394 create_addr: No such host: %231

this is my extensions.conf

[from-internal]
exten => #1,1,Dial(SIP/turnip)
exten= > #2,1,Dial(SIP/sorcerer)
exten => #1,1,Goto(sms,${EXTEN},1) ; SMS from SIP phone to Asterisk
exten => #2,1,Goto(sms,${EXTEN},1) ; SMS from SIP phone to Asterisk

[sms]
exten => _.,1,NoOp(SMS receiving dialplan invoked)
exten => _.,n,NoOp(To ${MESSAGE(to)})
exten => _.,n,NoOp(From ${MESSAGE(from)})
exten => _.,n,NoOp(Body ${MESSAGE(body)})
exten => _.,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => _.,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
exten => _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => _.,n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?sendfailedmsg)
exten => _.,n,Hangup()
; 
; Handle failed messaging
exten => _.,n(sendfailedmsg),Set(MESSAGE(body)="[${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)}] Your message to ${EXTEN} has failed.$
exten => _.,n,Set(ME_1=${CUT(MESSAGE(from),<,2)})
exten => _.,n,Set(ACTUALFROM=${CUT(ME_1,@,1)})
exten => _.,n,MessageSend(${ACTUALFROM},ServiceCenter)
exten => _.,n,Hangup()
exten => _.,n,Hangup()

I feel I need to direct the extension to a SIP:user and dont know how

I changed my extensions file to one i found online

and then it says cant load AGI, so I load res_agi it says cant load speech, so i load _res_speech

now its saying these errors
[Feb 8 00:57:15] WARNING[23425][C-00000001]: res_agi.c:2223 launch_script: Failed to execute ‘/var/lib/asterisk/agi-bin/chatplan.php’: File does not exist.
[Feb 8 00:57:50] WARNING[23425][C-00000001]: message.c:1221 msg_send_exec: A ‘to’ URI is required for MessageSend()

is my installation faulty?

Should i save my sip and extensions files and flush asterisk out and start again?

2 posts were merged into an existing topic: Asterisk 18 and Linphones not calling eachother internally or from behind vpn