Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Mod_perl $session in not hangup


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
anthony.minessale at g...
Guest





PostPosted: Tue Sep 22, 2009 10:50 am    Post subject: [Freeswitch-users] Mod_perl $session in not hangup Reply with quote

The reason is you cannot complete the hangup until the script exits.
On the bright side, if you update to latest trunk it will probably work more how you want it to
because a recent change will make this possible.


On Tue, Sep 22, 2009 at 4:30 AM, lakshmanan <lakindia89@gmail.com (lakindia89@gmail.com)> wrote:
Quote:

Hi all, I've the following mod_perl program to execute when I call to an
extension (say 777).
I use twinkle as a soft phone, to make calls.

#!/usr/bin/perl
use strict;
use freeswitch;
our $session;
$session->answer();
if($session->ready())
{
       my $uuid=$session->getVariable("uuid");
       freeswitch::consoleLog("INFO","UUID is $uuid\n");

       freeswitch::consoleLog("INFO","Session is answered\n");

$session->execute("playback","/usr/local/freeswitch/sounds/en/us/callie/time/8000/day-1.wav");
       my $dtmf = $session->getDigits(4,"", 5000);
       freeswitch::consoleLog("INFO","I received $dtmf\n");
       $session->hangup("NORMAL_CLEARING");
       sleep(5);
       # Some other statements.
}
return 1;

Everything is fine.
After executing $session->hangup, I got NORMAL_CLEARING in my freeswitch
console. But in my soft phone, still the channel is active for 5 seconds.
The call got ended only after the 5 seconds sleep.

But if I create my own session like
                                 my $session=new
freeswitch::Session("user/1000");
and I say $session->hangup(), it got terminated.

I wanted to know why there is such difference?? or am I wrong??
Please clarify me.


--
View this message in context: http://www.nabble.com/Mod_perl-%24session-in-not-hangup-tp25530646p25530646.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
lakindia89 at gmail.com
Guest





PostPosted: Wed Sep 23, 2009 12:44 am    Post subject: [Freeswitch-users] Mod_perl $session in not hangup Reply with quote

Thanks for your replay. I don't know what is latest trunk. Is it latest version? I'm using freeswitch 1.0.4.


On Tue, Sep 22, 2009 at 8:09 PM, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
The reason is you cannot complete the hangup until the script exits.
On the bright side, if you update to latest trunk it will probably work more how you want it to
because a recent change will make this possible.


On Tue, Sep 22, 2009 at 4:30 AM, lakshmanan <lakindia89@gmail.com (lakindia89@gmail.com)> wrote:
Quote:

Hi all, I've the following mod_perl program to execute when I call to an
extension (say 777).
I use twinkle as a soft phone, to make calls.

#!/usr/bin/perl
use strict;
use freeswitch;
our $session;
$session->answer();
if($session->ready())
{
       my $uuid=$session->getVariable("uuid");
       freeswitch::consoleLog("INFO","UUID is $uuid\n");

       freeswitch::consoleLog("INFO","Session is answered\n");

$session->execute("playback","/usr/local/freeswitch/sounds/en/us/callie/time/8000/day-1.wav");
       my $dtmf = $session->getDigits(4,"", 5000);
       freeswitch::consoleLog("INFO","I received $dtmf\n");
       $session->hangup("NORMAL_CLEARING");
       sleep(5);
       # Some other statements.
}
return 1;

Everything is fine.
After executing $session->hangup, I got NORMAL_CLEARING in my freeswitch
console. But in my soft phone, still the channel is active for 5 seconds.
The call got ended only after the 5 seconds sleep.

But if I create my own session like
                                 my $session=new
freeswitch::Session("user/1000");
and I say $session->hangup(), it got terminated.

I wanted to know why there is such difference?? or am I wrong??
Please clarify me.


--
View this message in context: http://www.nabble.com/Mod_perl-%24session-in-not-hangup-tp25530646p25530646.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
jason at jasonjgw.net
Guest





PostPosted: Wed Sep 23, 2009 1:13 am    Post subject: [Freeswitch-users] Mod_perl $session in not hangup Reply with quote

lakshmanan ganapathy <lakindia89@gmail.com> wrote:
Quote:
Thanks for your replay. I don't know what is latest trunk. Is it latest
version? I'm using freeswitch 1.0.4.

It's the latest version from the svn repository. Use svn checkout, then
compile it as documented on the wiki.


_______________________________________________
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
Back to top
msc at freeswitch.org
Guest





PostPosted: Wed Sep 23, 2009 11:55 am    Post subject: [Freeswitch-users] Mod_perl $session in not hangup Reply with quote

On Tue, Sep 22, 2009 at 11:05 PM, Jason White <jason@jasonjgw.net (jason@jasonjgw.net)> wrote:
Quote:
lakshmanan ganapathy <lakindia89@gmail.com (lakindia89@gmail.com)> wrote:
Quote:
Thanks for your replay. I don't know what is latest trunk. Is it latest
version? I'm using freeswitch 1.0.4.


It's the latest version from the svn repository. Use svn checkout, then
compile it as documented on the wiki.





If you're on Linux/Unix you can go into the freeswitch src directory and do "make current" which will do all the work for you.
-MC
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services