MessangeSend : from is always Asterisk

Hi,
looking for send instant message between sip clients, I found this help :
stackoverflow.com/questions/1506 … terisk-sip

[quote][messages]
exten => _X.,1,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => _X.,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
exten => _X.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => _X.,n,GotoIf($["${MESSAGE_SEND_STATUS}" != “SUCCESS”]?sendfailedmsg)
exten => _X.,n,Hangup()
;
; Handle failed messaging
exten => _X.,n(sendfailedmsg),Set(MESSAGE(body)="[${STRFTIME(${EPOCH},%d%m%Y-%H:%M:%S)}]
Your message to ${EXTEN} has failed. Retry later.")
exten => _X.,n,Set(ME_1=${CUT(MESSAGE(from),<,2)})
exten => _X.,n,Set(ACTUALFROM=${CUT(ME_1,@,1)})
exten => _X.,n,MessageSend(${ACTUALFROM},ServiceCenter)
exten => _X.,n,Hangup() [/quote]

I can send message, but the “from” value when I receive the message is always asterisk, and not the initial sender.
MessageSend is called with to,from parameters.

Thanks for your help !

Try with:

Replace your MEssageSend line with:

exten => _X.,n,MessageSend(sip:${EXTEN},${MESSAGE(from)})

[edit]
Well, if your problem is the FROM I don’t think my suggestion works. :smile:

I remove one CUT operation, this is nice, but no, that doesn’t solve my problem :smile:

I try many things :

  • Call MessageSend with only the parameter “to”
  • Call with a fix value (MessageSend(sip:${EXTEN},SIP:5000)
  • Call with CUT value (like post #1)

I always have the same problem…
Is there another parameters in sip.conf I should look at ?

I’ve a solution.

exten => _X.,n,MessageSend(${ACTUALTO}, <${MESSAGE(from)}>)

I add < > to force a SIP URI, asterisk is still send, but only as a display info, from become the good value.