Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
Its more FSCORE but i'll move it into the right place ;) /b On Jun 26, 2009, at 6:36 PM, Klaus Hochlehnert wrote: I used the Project „FS Scripts“. Hope that’s ok. From: freeswitch-users-boun...@lists.freeswitch.org [mailto:freeswitch-users-boun...@lists.freeswitch.org ] On Behalf Of Brian West Sent: Saturday, June 27, 2009 1:28 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered... Please open the jira and attach all this and the xml dialplan to execute it .. also the schema for the db would be helpful also. Thanks, /b On Jun 26, 2009, at 6:16 PM, Klaus Hochlehnert wrote: Brian told me to open a jira, what I did now. ___ 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 ___ 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
Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
I used the Project "FS Scripts". Hope that's ok. From: freeswitch-users-boun...@lists.freeswitch.org [mailto:freeswitch-users-boun...@lists.freeswitch.org] On Behalf Of Brian West Sent: Saturday, June 27, 2009 1:28 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered... Please open the jira and attach all this and the xml dialplan to execute it .. also the schema for the db would be helpful also. Thanks, /b On Jun 26, 2009, at 6:16 PM, Klaus Hochlehnert wrote: Brian told me to open a jira, what I did now. ___ 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
Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
Please open the jira and attach all this and the xml dialplan to execute it .. also the schema for the db would be helpful also. Thanks, /b On Jun 26, 2009, at 6:16 PM, Klaus Hochlehnert wrote: Brian told me to open a jira, what I did now. ___ 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
Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
idgeCallInternally { my ($DestNr) = @_; if ("${DestNr}" == "21") { $VARS{call_timeout} = "15"; } UPDATEV(); $dbh->do("insert into current_calls (extension, uuid) values ('$DestNr', '$VARS{uuid}')"); $dbh->commit(); $session->execute("record_session","\${base_dir}/recordings/\${strftime(%Y-%m-%d-%H-%M-%S)}_\${destination_number}_\${caller_id_number}.wav"); $session->execute("bridge","user/${destn...@$vars{domain}"); } sub on_hangup { my $hup_session = shift; my $hup_cause = shift; logInfo("Hangup uuid: '" . $hup_session->{uuid} . "'"); logInfo("Hangup cause: '$hup_cause'"); $dbh->do("delete from current_calls where uuid = '" . $hup_session->{uuid} . "'"); $dbh->commit(); } # Internal numbers if ($VARS{destination_number} =~ /^(2[0-2])$/) { UPDATEV(); bridgeCallInternally($VARS{destination_number}); } # Intercept call if ($VARS{destination_number} =~ /^\*8(\d+)$/) { my $intercept_extension = ""; my $intercept_uuid = ""; my $sth = $dbh->prepare("select * from current_calls where extension = ?"); $sth->execute($1); while (my @data = $sth->fetchrow_array()) { $intercept_extension = $data[0]; $intercept_uuid = $data[1]; } logInfo("Intercept call from '$intercept_extension' - '$intercept_uuid'"); GETV("caller_id_number"); $dbh->do("update current_calls set extension = '$VARS{caller_id_number}' where uuid = '$intercept_uuid'"); $dbh->commit(); $session->answer(); $session->execute("intercept", "$intercept_uuid"); $session->execute("sleep", "1000"); } $dbh->disconnect(); return 1; From: freeswitch-users-boun...@lists.freeswitch.org [mailto:freeswitch-users-boun...@lists.freeswitch.org] On Behalf Of Michael Collins Sent: Friday, June 26, 2009 10:57 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered... Can you paste in your script so we can see what is going on? -MC On Fri, Jun 26, 2009 at 1:39 PM, Klaus Hochlehnert mailto:maili...@kh-dev.de>> wrote: Ok, and how can I ask the hook to come with me? If I understand this right... When a call comes in the hook is set on the a-leg and it rings on the b-leg. When I do an intercept I kill the ringing b-leg and the interceptor is now the "new" b-leg, right? I would assume that the "old" a-leg still has the hook on it or this wrong. Thanks, Klaus From: freeswitch-users-boun...@lists.freeswitch.org<mailto:freeswitch-users-boun...@lists.freeswitch.org> [mailto:freeswitch-users-boun...@lists.freeswitch.org<mailto:freeswitch-users-boun...@lists.freeswitch.org>] On Behalf Of Brian West Sent: Friday, June 26, 2009 10:28 PM To: freeswitch-users@lists.freeswitch.org<mailto:freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered... well in your case I suspect your intercepting the leg of the call without the hook on it. /b On Jun 26, 2009, at 3:22 PM, Klaus Hochlehnert wrote: Actually one of my first actions in the script is $session->setHangupHook('on_hangup'); When a call comes in the hook is set and working. The second time the script is called when I try to intercept. As it's the same script there's also the function setHangupHook called. That's what I've currently done. How can I set up the hook for the "new" bridge? Or is there a possibility to set a global hook? Thanks, Klaus ___ 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 ___ 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
Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
Can you paste in your script so we can see what is going on? -MC On Fri, Jun 26, 2009 at 1:39 PM, Klaus Hochlehnert wrote: > Ok, and how can I ask the hook to come with me? > > > > If I understand this right... > > When a call comes in the hook is set on the a-leg and it rings on the > b-leg. > > When I do an intercept I kill the ringing b-leg and the interceptor is now > the “new” b-leg, right? > > I would assume that the “old” a-leg still has the hook on it or this wrong. > > > > Thanks, Klaus > > > > *From:* freeswitch-users-boun...@lists.freeswitch.org [mailto: > freeswitch-users-boun...@lists.freeswitch.org] *On Behalf Of *Brian West > *Sent:* Friday, June 26, 2009 10:28 PM > *To:* freeswitch-users@lists.freeswitch.org > *Subject:* Re: [Freeswitch-users] hangup hook after intercept doesn't get > triggered... > > > > well in your case I suspect your intercepting the leg of the call without > the hook on it. > > > > /b > > > > On Jun 26, 2009, at 3:22 PM, Klaus Hochlehnert wrote: > > > > Actually one of my first actions in the script is > > $session->setHangupHook('on_hangup'); > > > > When a call comes in the hook is set and working. > > > > The second time the script is called when I try to intercept. As it’s the > same script there’s also the function setHangupHook called. > > That’s what I’ve currently done. > > > > How can I set up the hook for the “new” bridge? > > Or is there a possibility to set a global hook? > > > > Thanks, Klaus > > > > ___ > 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 > > ___ 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
Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
Ok, and how can I ask the hook to come with me? If I understand this right... When a call comes in the hook is set on the a-leg and it rings on the b-leg. When I do an intercept I kill the ringing b-leg and the interceptor is now the "new" b-leg, right? I would assume that the "old" a-leg still has the hook on it or this wrong. Thanks, Klaus From: freeswitch-users-boun...@lists.freeswitch.org [mailto:freeswitch-users-boun...@lists.freeswitch.org] On Behalf Of Brian West Sent: Friday, June 26, 2009 10:28 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered... well in your case I suspect your intercepting the leg of the call without the hook on it. /b On Jun 26, 2009, at 3:22 PM, Klaus Hochlehnert wrote: Actually one of my first actions in the script is $session->setHangupHook('on_hangup'); When a call comes in the hook is set and working. The second time the script is called when I try to intercept. As it's the same script there's also the function setHangupHook called. That's what I've currently done. How can I set up the hook for the "new" bridge? Or is there a possibility to set a global hook? Thanks, Klaus ___ 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
Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
well in your case I suspect your intercepting the leg of the call without the hook on it. /b On Jun 26, 2009, at 3:22 PM, Klaus Hochlehnert wrote: Actually one of my first actions in the script is $session->setHangupHook('on_hangup'); When a call comes in the hook is set and working. The second time the script is called when I try to intercept. As it’s the same script there’s also the function setHangupHook called. That’s what I’ve currently done. How can I set up the hook for the “new” bridge? Or is there a possibility to set a global hook? Thanks, Klaus ___ 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
Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
Actually one of my first actions in the script is $session->setHangupHook('on_hangup'); When a call comes in the hook is set and working. The second time the script is called when I try to intercept. As it's the same script there's also the function setHangupHook called. That's what I've currently done. How can I set up the hook for the "new" bridge? Or is there a possibility to set a global hook? Thanks, Klaus From: freeswitch-users-boun...@lists.freeswitch.org [mailto:freeswitch-users-boun...@lists.freeswitch.org] On Behalf Of Brian West Sent: Friday, June 26, 2009 10:07 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered... Depends what side of the call was the hangup hook on? /b On Jun 26, 2009, at 2:48 PM, Klaus Hochlehnert wrote: Hi all, I'm just writing a perl script as dialplan to learn how to handle freeswitch. Now I have the issue that my hangup hook won't be triggered after I intercepted a call. A "normal" hangup triggers the function. Does anybody have a hint how to get the hangup hook triggered? Thanks, Klaus __ ___ 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
Re: [Freeswitch-users] hangup hook after intercept doesn't get triggered...
Depends what side of the call was the hangup hook on? /b On Jun 26, 2009, at 2:48 PM, Klaus Hochlehnert wrote: Hi all, I’m just writing a perl script as dialplan to learn how to handle freeswitch. Now I have the issue that my hangup hook won’t be triggered after I intercepted a call. A “normal” hangup triggers the function. Does anybody have a hint how to get the hangup hook triggered? Thanks, Klaus __ ___ 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
[Freeswitch-users] hangup hook after intercept doesn't get triggered...
Hi all, I'm just writing a perl script as dialplan to learn how to handle freeswitch. Now I have the issue that my hangup hook won't be triggered after I intercepted a call. A "normal" hangup triggers the function. Does anybody have a hint how to get the hangup hook triggered? Thanks, Klaus ___ 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