Cannot send SMS between two internal extensions

The “Hello World” text message was sent from extension 800 (IP to extension 584 ( This is an Asterisk 1.4.26 running on CentOS 5.3, the phones are Unidata WPU-7700 capable of text messaging, and they work fine with voice through Asterisk.

It looked like the message did arrive to Asterisk but could not get routed to the recipient, the error was “405 Method not allowed”.

No specific setup was made on the Asterisk side to accommodate SMS, whatever default setup for SMS was used.

I am quite excited with this feature, so any help sorting it out is greatly appreciated!

Regards, Viet

Is this within a call?

/* Message outside of a call, we do not support that */ ast_log(LOG_WARNING, "Received message to %s from %s, dropped it...\n Content-Type:%s\n Message: %s\n", get_header(req, "To"), get_header(req, "From"), content_type, buf); transmit_response(p, "405 Method Not Allowed", req);

The basic problem with dealing with this outside a call is likely to be that the only way that Asterisk can convert an incoming destination address to an outgoing destination is to run the dialplan, which is likely to do things that only make sense for establishing an actual connection.

Dear david55,

Thank you for your reply and that explained the problem. Indeed the SMS was sent outside of an actual call.

Does it mean that if the dial plan is adequately modified, it’s possible to send SMS outside of a call? I can study up on that if that’s the most likely way to resolve the problem.

The restriction is absolute. You would probably have to re-write a lot of the C code to allow it to do this. I suspect you might have to introduce something similar to the hint type dialplan entry to provide a rule for selecting the other party for out of dialogue messages.

Dear david55,

Thanks for locating that exact piece of code that really nailed down the source of the problem. Tackling C is a bit above my head. What rough steps would you recommend to someone like me, who puts together the Asterisk box and maintains it but who still has not done any major change to existing dialplans? This would tremendously cut down my learning curve! (It is understood that you are suggesting a possible solution, at the end of the road maybe SMS would still not work but I would have learned at lot more about my Asterisk system).

The code reports the problem, but isn’t the cause of it. You are talking about adding a major new feature.

Dear david55,

Thank you for your reply and that’s understood. I am reading up on the alternate ways to achieve the same result.