SMS via SIP trunk

I test the Asterisk 11 sms new feature and it worked well between local extensions using this dial plan:

[astsms] 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()

what is the correct sip uri for “MessageSend” CMD to send SMS between two asterisk servers?
I tried something like:

but failed!

please help?

That isn’t a SIP URI that should look like sip:peer@domain

I tried:


sending status is:

but no message received and i got the following message in asterisk log:

please help?

You have requested to send an instant message (not an SMS) to an address that is not local to the immediate destination, and that immediate destination has a policy of not trying to send them on to the final destination. You need to contact the intermediate destination and ask them how to format local addreses, and what destinations they actually serve.

thanks for your detailed answer

hello guys
how did u handle the sms via SIP trunk
I need it please

I am still unable to send SMS from one asterisk box to another. Using

Sending box show message sent suceesfully, but receiving box never gets message.

Anybody see what I am doing wrong
asterisk 11.5.0

receiving box reports Correct auth, but based on stale nonce received from…

Never mind. found the problem. It was in my from address,. not the to