How can we set max time for talk/session
Moderator: Brekeke Support Team
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact:
How can we set max time for talk/session
1. Brekeke Product Name and version:
Brekeke PBX, Version 2.2.1.6
2. Java version:
jdk 1.6.0_10
3. OS type and the version:
Linux, openSUSE 11.0
4. UA (phone), gateway or other hardware/software involved:
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
6. Your problem:
Am I only one missing time parameter in given callControl() method?
I mean, how can we set the time value using setSchedule() or setScheduleTerminate() methods inside session plugin. Yes, I know we can, but suppose the value is coming from database. Do we need to access our database from our plugin, which resides under PBX application? That not really sounds good.
Any other options?? Please share with me.
--
Adeel Ansari
Brekeke PBX, Version 2.2.1.6
2. Java version:
jdk 1.6.0_10
3. OS type and the version:
Linux, openSUSE 11.0
4. UA (phone), gateway or other hardware/software involved:
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
6. Your problem:
Am I only one missing time parameter in given callControl() method?
I mean, how can we set the time value using setSchedule() or setScheduleTerminate() methods inside session plugin. Yes, I know we can, but suppose the value is coming from database. Do we need to access our database from our plugin, which resides under PBX application? That not really sounds good.
Any other options?? Please share with me.
--
Adeel Ansari
>> how can we set the time value using setSchedule() or setScheduleTerminate()
Did you read the plug-in document?
>> but suppose the value is coming from database.
It is incorrect...
>> Any other options?? Please share with me.
The property variable "net.sip.timeout.talking" can specify the talking time. Let you try.
Did you read the plug-in document?
>> but suppose the value is coming from database.
It is incorrect...
>> Any other options?? Please share with me.
The property variable "net.sip.timeout.talking" can specify the talking time. Let you try.
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact:
>> Did you read the plug-in document?
Yes. I managed to set both the schedule time and schedule terminate time
>> It is incorrect...
Suppose, we have different values for different calls/sessions. Based on the caller.
>> The property variable "net.sip.timeout.talking" can specify the talking time. Let you try.
I believe, thats the value which is applied by default. Do we need to read and apply it in our plugin? However, it seems like one value for all calls/sessions.
Am I missing the idea?
Thanks for your response.
--
Adeel
Yes. I managed to set both the schedule time and schedule terminate time
>> It is incorrect...
Suppose, we have different values for different calls/sessions. Based on the caller.
>> The property variable "net.sip.timeout.talking" can specify the talking time. Let you try.
I believe, thats the value which is applied by default. Do we need to read and apply it in our plugin? However, it seems like one value for all calls/sessions.
Am I missing the idea?
Thanks for your response.
--
Adeel
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact:
>> I think the checking of your database from the plug-in as you mentioned is a good idea.
Hmmm.... very fine. Well, if you or anybody else know if there is any hook for callControl() method? So, we can build some plugin around that, then expose that plugin as a webservice, and use that instead of UserImpl.
Is it making any sound to you folks?
Thanks.
Hmmm.... very fine. Well, if you or anybody else know if there is any hook for callControl() method? So, we can build some plugin around that, then expose that plugin as a webservice, and use that instead of UserImpl.
Is it making any sound to you folks?
Thanks.
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact:
>>Where does "callControl()" method come from?
I couldn't find such a method in the Accounting plug-in document...
Oops!! my mistake I didn't make it clear from the start. Actually, its one of the method exposed via webservice, UserImpl.
>>In my thought, you need to call setSchedule() or setScheduleTerminate() from the "eventTalkStart()" method.
Yes, thats the reason we need to access the database from our plugin. I mean to get the time value and pass as an argument.
Thanks.
I couldn't find such a method in the Accounting plug-in document...
Oops!! my mistake I didn't make it clear from the start. Actually, its one of the method exposed via webservice, UserImpl.
>>In my thought, you need to call setSchedule() or setScheduleTerminate() from the "eventTalkStart()" method.
Yes, thats the reason we need to access the database from our plugin. I mean to get the time value and pass as an argument.
Thanks.
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact:
>> Nope, it depends on the CALLER.
how many callers?
with the dialplan below..
CALLER-1's talking-time will be 60000sec (1min).
CALLER-2's talking-time will be 120000sec (2min).
-----------------------------
[Matching Pattern:]
$request = ^INVITE
From = sip:CALLER-1@
[Deploy Pattern:]
&net.sip.timeout.talking = 60000
-----------------------------
-----------------------------
[Matching Pattern:]
$request = ^INVITE
From = sip:CALLER-2@
[Deploy Pattern:]
&net.sip.timeout.talking = 120000
-----------------------------
how many callers?
with the dialplan below..
CALLER-1's talking-time will be 60000sec (1min).
CALLER-2's talking-time will be 120000sec (2min).
-----------------------------
[Matching Pattern:]
$request = ^INVITE
From = sip:CALLER-1@
[Deploy Pattern:]
&net.sip.timeout.talking = 60000
-----------------------------
-----------------------------
[Matching Pattern:]
$request = ^INVITE
From = sip:CALLER-2@
[Deploy Pattern:]
&net.sip.timeout.talking = 120000
-----------------------------
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact:
Suppose n callers. Where n can be between 1 and million+. Callers are stored in the database with their details.
Thanks for showing the complete dial plan. Is it possible to define a dial plan on the fly - and also remove it - for an external application, say may be using a webservice?
Thanks for your inputs.
Thanks for showing the complete dial plan. Is it possible to define a dial plan on the fly - and also remove it - for an external application, say may be using a webservice?
Thanks for your inputs.
Hi adeel,
>> say may be using a webservice?
The Brekeke SIP Server's Advanced Edition has a webservice interface.
For example...
-----------------------------
[Matching Pattern:]
$request = ^INVITE
From = sip:(.+)@
$soapget( "http://soap.server", "http://soap.serve", "getValue","user=%1" ) = (.+)
[Deploy Pattern:]
&net.sip.timeout.talking = %2
-----------------------------
>> say may be using a webservice?
The Brekeke SIP Server's Advanced Edition has a webservice interface.
For example...
-----------------------------
[Matching Pattern:]
$request = ^INVITE
From = sip:(.+)@
$soapget( "http://soap.server", "http://soap.serve", "getValue","user=%1" ) = (.+)
[Deploy Pattern:]
&net.sip.timeout.talking = %2
-----------------------------
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact:
Here is the solution.
DialPlan:
-----------------------------
[Matching Pattern:]
$request = ^INVITE
From = sip:(.+)@
$soapget( "http://soap.server", "http://soap.serve", "getValue","user=%1" ) = (.+)
[Deploy Pattern:]
&my.timer = %2
-----------------------------
Session Plug-in:
In this example, I defined the variable "my.timer" which indicates the timer for termination.
DialPlan:
-----------------------------
[Matching Pattern:]
$request = ^INVITE
From = sip:(.+)@
$soapget( "http://soap.server", "http://soap.serve", "getValue","user=%1" ) = (.+)
[Deploy Pattern:]
&my.timer = %2
-----------------------------
Session Plug-in:
Code: Select all
public void eventTalkStart( EventStat evstat )
{
setScheduleTerminate( env.getLong( "my.timer" ) ) ;
}
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact:
-
- Posts: 12
- Joined: Wed Jul 09, 2008 12:53 am
- Contact: