[asterisk-users] Text messaging
Alex Balashov
abalashov at evaristesys.com
Mon Nov 9 09:35:55 CST 2009
Michelle Dupuis wrote:
> I assumed the ATA/gateway would throw away or reject the message since I
> don't think there's an analog equivalent...but I'll wait for the analog
> experts to jump in.
It appears that Sendtext() simply invokes the callback stub
ast_channel_tech.send_text, and this is implemented by various channel
drivers in a proprietary manner.
In the case of chan_sip.c:sip_sendtext(), the implementation indeed
uses SIP MESSAGE:
static int transmit_message_with_text(struct sip_pvt *p, const char *text)
{
struct sip_request req;
reqprep(&req, p, SIP_MESSAGE, 0, 1);
add_text(&req, text);
return send_request(p, &req, XMIT_RELIABLE, p->ocseq);
}
In the DAHDI implementation, it appears that some kind of acoustic
in-band tones are generated using main/tdd.c:tdd_generate(). I am not
certain what exactly the applicable standard is or how it works.
IAX2 appears to have a "text" frame type:
static int iax2_sendtext(struct ast_channel *c, const char *text)
{
return send_command_locked(PTR_TO_CALLNO(c->tech_pvt),
AST_FRAME_TEXT,
0, 0, (unsigned char *)text, strlen(text) + 1, -1);
}
-- Alex
--
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
More information about the asterisk-users
mailing list