MessageSend is not identifying sender of the messages correctly

Hello,
I can send messages to a sip peer using MessageSend from other peer, but who is receiving the message the sender is identify as asterisk insted of the sender name:

Exemple:
The extension 7022 send the text “Hello World” to 7028.

sip.conf

exten  => _X.,1,NoOp(MESSAGE(from): ${MESSAGE(from)})
 same => n,NoOp(MESSAGE(to): ${MESSAGE(to)})
 same => n,NoOp(MESSAGE(body): ${MESSAGE(body)})
 same => n,MessageSend(sip:${SIPPEER(${EXTEN},ip)}:${SIPPEER(${EXTEN},port)})
 same => n,NoOp(Message send status: ${MESSAGE_SEND_STATUS})
 same => n,HangUp()

console:

How the text message is received on sip 7028:

The problem is that the CallerID is coming as asterisk insted of the number of the peer 7022.

I believe that it would have to be like this:

10:30:40: 7022@10.10.10.39 (7022)
Hello World

How can I make it identify correctlly the sender of the message.

Hello,
I believe that if you do not specify the sender, then it is actually Asterisk sending the message (if that makes sense).

You can specify the the sender in MessageSend. In the example below, I just used a made up variable (maybe you create ${SENDER} as a modification of the original ${MESSAGE(from)})

same => n,MessageSend(sip:${SIPPEER(${EXTEN},ip)}:${SIPPEER(${EXTEN},port)},${SENDER})

Thanks, it worked.
I used the variable that already exists: ${MESSAGE(from)}

same => n,MessageSend(sip:${SIPPEER(${EXTEN},ip)}:${SIPPEER(${EXTEN},port)},${MESSAGE(from)})
2 Likes

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