MessageSend is not identifying sender of the messages correctly

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:

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


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()


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@ (7022)
Hello World

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

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)})

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