GO HERE SIP messaging

Tom Jackson

Member
Joined
Dec 14, 2013
Messages
31
Reaction score
3
I am trying to IM with X-Lite softphones. I am getting an error, "Service not available, please try againg later", when trying to send IM messages between two extensions. The extensions seem to see each other. Both are SIP. Is there anything I can setup?


This is what the folks at Counterpath (X-Lite) had to say:

X-Lite supports peer-to-peer SIP SIMPLE instant messaging. The PBX or SIP express router needs to be setup to allow the SIP messaging.
 

Tom Jackson

Member
Joined
Dec 14, 2013
Messages
31
Reaction score
3
Thanks for the link. I'm a bit lost, however. I'm assuming that to IM between two X-lite softphones requires Simple SMS, is there some Sip settings required?
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
Here's a simplified version just for handling SIP SIMPLE between your extensions. http://sysmagazine.com/posts/207622/

You add three key/value pairs to Asterisk SIP settings custom area, and the [messages] context to extensions_custom.conf as described. Then reload.
 

Tom Jackson

Member
Joined
Dec 14, 2013
Messages
31
Reaction score
3
This is from you link:


For transfer of messages this program used the method of SIP MESSAGE (RFC 3428) known also as the protocol of SIMPLE.

In Asterisk it support appearing in version 10, but the documentation here as it often happened, strongly lagging behind progress. It were necessary to search long at first on forums for various variants of a configuration, and then a trial and error method them to test.

Such operating configuration (it are true for Asterisk 11.6.0) were as a result work out.
In section [general] of a file of sip.conf (for owners of systems on the basis of FreePBX — in a file of sip_general_custom.conf) lines was add:
accept_outofcall_message = yes outofcall_message_context = messages auth_message_requests = no


And in dialplan (for FreePBX — in a file of extensions_custom.conf) such context are add:
[messages] exten => _XXX,1,MessageSend(sip:${EXTEN},"${CALLERID(name)}"${MESSAGE(from)})


Amount of X put down according to an amount of digits in your internal numbers.


A few questions. Would it be safe to add these lines in the "Other settings" section of the Asterisk Sip Settings page? Also, custom extensions, can I the custom extensions gui to simply edit existing extensions? I am trying to accomplish this task in the management console without any direct editing of config files.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
Hi Tom, yes, you can put the
  • accept_outofcall_message = yes
  • outofcall_message_context = messages
  • auth_message_requests = no
as Other Settings in the Asterisk SIP Settings module. But as for the dialplan,
Code:
[messages]
exten => _XXX,1,MessageSend(sip:${EXTEN},"${CALLERID(name)}"${MESSAGE(from)})
this has to be entered into /etc/asterisk/extensions_custom.conf. The Custom Extensions module is just a way of pointing to dialplan that you have added to extensions_custom.conf by hand.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
OK, but warning: untested. I just looked over that guy's post and thought it looked like it would work, so unless you've tried it out, let's wait for Tom to report back on how it works in his environment. The only thing that looks questionable to me is the MessageSend() syntax and I am wondering why ${MESSAGE(body)} is not part of the line... Hmm... I'll give it a try if we don't hear back on this one.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
With the version 4 release of Incredible PBX for Asterisk-GUI, SIP Messaging is included.

Here's a test by dialing 1234 from extension 6002 using the following dialplan code:
Code:
exten => 1234,1,Answer
exten => 1234,n,Set(MESSAGE(to)=6001)
exten => 1234,n,Set(MESSAGE(from)=6002)
exten => 1234,n,Set(MESSAGE(body)="This is a test")
exten => 1234,n,MessageSend(sip:${MESSAGE(to)},"${MESSAGE(from)}"<${MESSAGE(from)}>)
exten => 1234,n,NoOp(Send status: ${MESSAGE_SEND_STATUS})
exten => 1234,n,Hangup()

EDIT: Code updated. Thanks, billsimon.

And here's what we got on the Yealink T46G at extension 6001:

B87yrl3CAAAddb6.jpg:large


billsimon: Not sure why we got "[email protected]" (which would be the server) rather than "[email protected]"?? That's what popped up when we hit the Reply button as well. FIXED! See below.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
I think what happened is that an HTML filter somewhere ate the < and > characters. Seems like it should be "${MESSAGE(from)}" <${MESSAGE(from)}>
 

Members online

Forum statistics

Threads
25,824
Messages
167,825
Members
19,248
Latest member
BKhumalo
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top