[Home]

Summary:ASTERISK-03633: [patch] Can't send text from extensions shared with "switch" before answered
Reporter:mikma (mikma)Labels:
Date Opened:2005-03-05 14:55:16.000-0600Date Closed:2008-01-15 15:31:16.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk_app_dial_text.patch
Description:I'm sharing my dialplan between two servers, and have come a cross a problem with SendText. I would like to send some text to the calling user before the call is answered. It works fine both using iaxclient and an isdn phone connected directly to the server with the SendText statement in extensions.conf. But if I use "switch" to forward to the other server, it isn't possible to send text before the call is answered.

All frames except AST_FRAME_CONTROL including AST_FRAME_TEXT seem to be dropped by __ast_request_and_dial in channel.c.

It would make sence to forward AST_FRAME_TEXT even before the call is answered, since it can be used to display menu options and other information. At least if it was forwarded with a "switch" statement.


****** STEPS TO REPRODUCE ******

The text in the following SendText isn't displayed if the extension is forwarded with a switch statement from another Asterisk server.

[dial]
exten => s,1,NoOP
exten => s,2,SendText(Hello)

But the following does work.

[dial]
exten => s,1,Answer
exten => s,2,SendText(Hello)
Comments:By: Mark Spencer (markster) 2005-03-05 15:09:08.000-0600

Is this an IAX2 switch?  Can you post a sample of your invocation / extensions.conf?

By: mikma (mikma) 2005-03-05 15:41:39.000-0600

Yes it is an IAX2 switch. I'm including portions of my server's extensions.conf and iax.conf. When dialing s in context internal on serverb, it doesn't display "Hello", but "Asterisk" is displayed.

Server a
========

extensions.conf
---------------
[internal]
include => dial

[dial]
exten => s,1,Wait(0.5)
exten => s,2,SendText(Hello)
exten => s,3,Wait(0.5)
exten => s,4,Answer
exten => s,5,Wait(0.5)
exten => s,6,SendText(Asterisk)

iax.conf
--------
[serverb]
type=user
username=serverb
secret=xxxx
host=serverb
context=internal


Server b
========

extensions.conf
---------------
[internal]
switch => IAX2/serverb@servera

iax.conf
--------
[servera]
type=peer
username=serverb
secret=xxxx
host=servera
context=internal

By: mikma (mikma) 2005-03-08 10:31:39.000-0600

I have added a patch for asterisk 1.0.5-4 (Debian) that forwards AST_FRAME_TEXT frames. Maybe AST_FRAME_URL and AST_FRAME_VIDEO also should be fowarded?

By: Brian West (bkw918) 2005-03-17 21:29:56.000-0600

Any update?

/b

By: Mark Spencer (markster) 2005-04-09 14:02:51

Patch doesn't apply to CVS head, but similar functionality added there.

By: Russell Bryant (russell) 2005-05-11 21:43:36

fixed in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:31:16.000-0600

Repository: asterisk
Revision: 5440

U   trunk/apps/app_dial.c

------------------------------------------------------------------------
r5440 | markster | 2008-01-15 15:31:15 -0600 (Tue, 15 Jan 2008) | 2 lines

Forward text frames before answer (bug ASTERISK-3633)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5440