AMI MessageSend endpoint receives from 'unknown'

Hi all,
I’m new to the AMI feature, but long time user of asterisk. I have an issue where messages sent using the below Examples results in the recipient unable to reply as the sender (From:) shows up unknown. Is there any way to spoof the From variable or will AMI Messages always show as unknown?
I have a php script that receives sms via an http gateway and feeds it into the AMI. It works well , and I can also send messages out via dial plan and CURL if I hand enter the recipient in a new message. I Just can’t reply due to the ‘Unknown’ sender issue.

Action: MessageSend
To: sip:201
From: 407-380-0667
Body: This is a test message

Action: MessageSend
To: sip:201
From: sip:203
Body: This is a test message

Note: Currently using Asterisk 16.3.0 and each example replies as:
“Response: Success
Message: Message successfully sent”

Update -
With some help from the freepbx forum, I was nudged to try this with pjsip and it works flawlessly.
So, leaves me wondering if this needs to be reported as a bug with MessageSend using chan sip or if there’s a way to pass the right variables when using MessageSend with sip.

For now, I’ll plan to use pjsip and hope there’s no future regrets looming in other aspects.

Documenations says the following
The from parameter can be a configured peer name or in the form of "display-name < URI >.

Have you tried using a pername or the form described

I thought I tried that , but I did it again and it’s working.
Tested via AMI using just the senders number and working as-

Action: MessageSend
To: sip:201
From: <407-380-0667>
Body: This is a test message

Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.