Here is the autoattendant.lua script and a brief README file that outlines its basic operation. As I mentioned, my irc nick is 'gottafixthat' should you decide to put this into contrib. Thanks. - Marc Anthony Minessale wrote:
we can give you a folder in contrib or check it in for you if you wish we may also be able to find some issue in the script if we see it.
are you using session:ready in all your loops to avoid a death spiral?
On Mon, Oct 27, 2008 at 1:22 PM, Marc Lewis <marc@avvatel.com <mailto:marc@avvatel.com>> wrote:
I'll send the files the next time it happens.
As for my builds, I'm building fresh each time using a script I wrote to create RPM files. I do an 'svn update' then a './bootstrap.sh' and then run my script. My script creates a tarball from the checked out files and creates RPM files from that tarball.
The only other thing I can think that might be causing this since I haven't read about anyone else having this problem is a lua script that I wrote. The script is for creating auto attendants dynamically out of the XML dialplan pulled from curl. The channels don't show that the script itself is running, but it is transferred to voicemail from the script.
The lua code that transfers to voicemail looks like this:
elseif (action == "voicemail") then session:execute("voicemail", "default ".. aaDomain .." ".. target) session:hangup()
Where the aaDomain and target are set from the XML dialplan.
I'm happy to share the auto attendant lua script with anyone that thinks it might be useful to them. Its not well documented yet, though.
- Marc
Anthony Minessale wrote:
next time it happens go into another shell
and enter
gcore -o dump `cat /usr/local/freeswitch/log/freeswitch.pid`
then
gdb /usr/local/bin/freeswitch/bin/freeswitch dump.*
then enter these 3 commands:
set pagination off thread apply all bt thread apply all pt full
and send me the entire output
also are you updating with "make current" to avoid build skew?
On Mon, Oct 27, 2008 at 12:32 PM, Marc Lewis <marc@avvatel.com <mailto:marc@avvatel.com>> wrote:
I have a strange problem that I've been dealing with for the last week or two. Once or twice a day, Freeswitch will "wedge", in what appears to be voicemail. The switch is sort of still responding, meaning I can issue various commands at the console, but no new sofia channels will be handled, registrations start failing on the internal profile and no new calls can come in from the external profile.
When it happens, existing channels stay up, but once they are completed, no new channels can be created. There is always one channel that remains that looks something like (DID obfuscated):
api show channels
Content-Type: api/response Content-Length: 394
uuid,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,write_codec,write_rate ea758bcf-25f5-4cde-9f6c-5e3f1226130f,2008-10-27 10:02:27,1225126947,sofia/external/253941xxxx@204.11.200.165 <mailto:253941xxxx@204.11.200.165>,CS_EXECUTE,253941xxxx,253941xxxx,199.245.214.150 <http://199.245.214.150>,328,voicemail,default pgm.cisvp.com <http://pgm.cisvp.com> 246,XML,pgm,PCMU,8000,PCMU,8000
1 total.
I've been updating every weekend with the latest code, this is currently trunk rev 10146.
Anyone have any thoughts on this? Its driving me crazy.
- Marc
-- Marc Lewis Avvatel Corporation
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400 ------------------------------------------------------------------------ _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Marc Lewis Avvatel Corporation
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400 ------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Marc Lewis Avvatel Corporation autoattendant.lua (C)opyright 2008 by R. Marc Lewis <marc@avvatel.com> gottafixthat on #freeswitch This file is contributed to the FreeSWITCH project and licenced under the Mozilla Public License v1.1 This is a simple script that allows auto attendants (IVR's) to be created dynamically from the XML dialplan. It was designed to work with mod_xml_curl in a multi-tennant installation. I'll try to work up better documentation for this is time goes on, but it is a fairly simple script (less than 200 lines as of right now) and should be fairly easy to follow. To call the auto attendant (AA), you set variables in your XML dialplan. All of the auto attendant variables are prefixed by 'aa' so they should not collide with any other system variables. The AA can handle the following actions: hangup: Self explanatory autoattendant: Jump to another auto attendant (see below) repeat: Repeat the current auto attendant prefix: Extension Prefix Dialing, i.e. User dials "1", get another 'n' digits and then transfer to that extension. exten: Transfer to an extension voicemail: Transfer to voicemail dialbyname: Dial by name directory. Not implemented yet, coming soon. Setup variables are: aa_domain: The SIP domain to use, if not set defaults to the system domain. aa_announcement: The sound file to play when the AA starts. aa_timeout: The number of seconds to wait for a digit, if not set it defaults to 30 seconds. aa_timeoutaction: The action to take if the caller doesn't enter a digit within the specified amount of time. If not set, this defaults to 'hangup' aa_timeouttarget: The target for the timeout action, i.e. the extension number to transfer to, the mailbox, etc. aa_invoptannounce: The sound file to play when the user selects an invalid option. aa_invoptaction: The action to take when the user selects an invalid option, defaults to 'hangup'. aa_invopttarget: The target for the invalid option action. aaDigitAct[0-9,star,pound]: The DTMF keys, i.e. aaDigit0 or aaDigitstar, the action to take. aaDigitPlay[0-9,star,pound]: The sound file to play back when the caller dials this key. aaDigitTarget[0-9,star,pound]: The sound file to play back when the caller dials this key. A fully working example: <extension name="200-cheetahis"> <condition field="destination_number" expression="^200$"> <action application="answer"/> <action application="sleep" data="750"/> <action application="set" data="aa_domain=cheetahis.cisvp.com"/> <action application="set" data="aa_timeout=20"/> <action application="set" data="aa_announcement=/shared/freeswitch/users/c/ch/cheetahis.cisvp.com/recordings/1000.wav"/> <action application="set" data="aa_timeoutaction=repeat"/> <action application="set" data="aa_timeouttarget="/> <action application="unset" data="aa_invoptannounce"/> <action application="set" data="aa_invoptaction=repeat"/> <action application="set" data="aa_invopttarget="/> <action application="set" data="aaDigitAct1=prefix"/> <action application="set" data="aaDigitPlay1="/> <action application="set" data="aaDigitAct2=exten"/> <action application="set" data="aaDigitTgt2=201"/> <action application="set" data="aaDigitPlay2="/> <action application="set" data="aaDigitAct3=exten"/> <action application="set" data="aaDigitTgt3=202"/> <action application="set" data="aaDigitPlay3="/> <action application="set" data="aaDigitAct4=exten"/> <action application="set" data="aaDigitTgt4=203"/> <action application="set" data="aaDigitPlay4="/> <action application="set" data="aaDigitAct8=voicemail"/> <action application="set" data="aaDigitTgt8=100"/> <action application="set" data="aaDigitPlay8="/> <action application="unset" data="aaDigitAct5"/> <action application="unset" data="aaDigitAct6"/> <action application="unset" data="aaDigitAct7"/> <action application="unset" data="aaDigitAct9"/> <action application="unset" data="aaDigitAct0"/> <action application="unset" data="aaDigitActpound"/> <action application="unset" data="aaDigitActstar"/> <action application="lua" data="autoattendant.lua"/> <action application="hangup"/> </condition> </extension> The 'unset' is necessary if calling other auto attendants during the same session, since FreeSWITCH will maintain the variables. Failing to unset the variables may result in keys from the first auto attendant being active in the second. The only other special consideration is the regex used for jumping to another auto attendant. It expects there to be an extension that will match 'aa-name', where 'name' is the name of the auto attendant we're jumping to.