Limit time to outbound call

Status
Not open for further replies.

oscquin

Joined
Feb 9, 2010
Messages
34
Reaction score
0
Hello, I'm trying to limit time for outbound calls for certain contexts under elastix 2.3
I have a context called COS03 wich I want to limit to 3 minutes. I have created the context and in extensions_custom.conf I have added:

[outrt-3-custom] ; COS03-custom
;include => outrt-3-custom
exten => _9XXXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _9XXXXXXXX,n,Noop(Calling Out Route: COS03Custom)
exten => _9XXXXXXXX,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _9XXXXXXXX,n,Set(_NODEST=)
exten => _9XXXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _9XXXXXXXX,n,Macro(dialout-trunk,1,9${EXTEN:1},trL(180000:60000:10000),)
exten => _9XXXXXXXX,n,Macro(outisbusy,)

; end of [outrt-3-custom]

but the L option seems to not work. any ideas? thanks in advance.
 
Hi all.

Read the top of file into extensions_additional.conf.

Code:
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;

extensions_custom.conf seems the good file to be used.
 
Yes thanks....of course it is bad to use the _additional.conf
....I tested in the extensions_additional.conf to determine if the time limit feature is working or not....it does.

I think there is a problem with the extensions_custom.conf in version 2.3

Can you advise if you are using custom contexts in 2.3 extensions_custom.conf?
I have been unable to get them to work

Cheers
 
There's no problem with extensions_custom.conf with ELastix 2.3.0, sure.

From my side, within my RoomX project, i use a custom context, and all works fine.
For example, at first line, i included this:#include extensions_roomx.conf
Next, i created a custom file extensions_roomx.conf with this:
Code:
[from-roomx]
include => calendar-event
include => weather-wakeup
include => app-dnd-toggle
include => ext-dnd-hints
include => app-speakingclock
include => app-vmmain
include => clean
include => minibar
include => reception
include => Roomx-dialout

[clean]
exten => _*36,1,NoOp( ====> Room ${CALLERID(num)} is Clean now <==== )
exten => _*36,n,MYSQL(Connect connid localhost root asterisk roomx) 
exten => _*36,n,MYSQL(Query resultid ${connid} UPDATE `rooms` SET `clean`='1' where `extension`='${CALLERID(num)}' )
exten => _*36,n,MYSQL(Clear ${resultid}) 
exten => _*36,n,MYSQL(Disconnect ${connid})
exten => _*36,n,playback(beep)
exten => h,1,Hangup()

.Etc.....
 
Hmmm, be careful at the headers like [from-custom-interal] and else.....
Maybe just add a : include => COS03 into the curent context.
 
Thanks...just so I understand:
you add the line:
#include extensions_roomx.conf
in to the extensions_custom.conf?
 
yes, at first line.

But it's just an example.
In this example, all rooms has from-roomx instead of from-internal.

If you look at extensions_custom.conf, you can dial some functions like 1234.

So you could add an include => COS03 and declare this context somewhere into extension_custom.conf under from-custom-internal for example.
 
We have to start from the begining:

1. Is the right way for custom contexts to be included in extensions_custom.conf?
2. extensions_additional.conf contexts already include the "context-custom" line so when you create the "context-custom" context in extensions-custom.conf, asterisk automatically references it right?
3. could this be any kind of bug?
 
oscquin,

A couple things:

1) According to my elastix test server: asterisk-1.8.12.0-0; freePBX-2.8.1-10
on Macro(dialout-trunk,1,9${EXTEN:1},trL(180000:60000:10000),) the third argument is for checking if the outbound route needs or not a PIN to dial out, not to add any option to the dial application.

2) If I'm not mistaken, on an upper level the context is called directly, since it has a pattern match, it will not use it from the custom part that you have edited, it will use the custom part if it has another extension pattern.

3) What I would do is the following:
write the same context name on extensions_override_elastix.conf (or extensions_override_freepbx depending on your elastix version) and use the TRUNK_OPTIONS variable.

[outrt-3]
exten => _9XXXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _9XXXXXXXX,n,Noop(Calling Out Route: COS03Custom)
exten => _9XXXXXXXX,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _9XXXXXXXX,n,Set(_NODEST=)
exten => _9XXXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _9XXXXXXXX,n,Set(TRUNK_OPTIONS=L(180000:60000:10000)${TRUNK_OPTIONS})
exten => _9XXXXXXXX,n,Macro(dialout-trunk,1,9${EXTEN:1},)
exten => _9XXXXXXXX,n,Macro(outisbusy,)

4) Execute:
asterisk -rx "module reload"
 
Thanks jgutierrez, it's solved thanks to your solution, placing the context in extensions_override_elastix.conf make it work.

I still would like to understand why it does not work under extensions_custom.conf

Thanks again.
 
Thanks Jorge, legendary as usual
Cheers
 
Status
Not open for further replies.

Latest Posts

Members Online Now

Forum statistics

Threads
111,861
Messages
589,441
Members
164,701
Latest member
yarusemiKK