[Asterisk-Users] chan_h323 and extensions.conf

Truong tphuong at wol.be
Tue May 27 07:00:33 MST 2003


Sorry, I forget to attach oh323.conf and 2 exentensions.conf !



% *** On Tue, May 27, 2003 at 03:45 PM +0200, Truong <tphuong at wol.be> wrote: ***
% % *** On Tue, May 27, 2003 at 03:15 PM +0300, Michael Manousos <manousos at inaccessnetworks.com> wrote: ***
% % >
% % >Hi,
% % >
% % >It works now but with chan_oh323: I can place a H.323 call from one
% % >client to another _through_ Asterisk via the default menu, though I
% % >still have problem with H.323 alias and extensions.
% % 
% % What kind of problem?
% % Do you want to send your conf (oh323.conf) file?
% % 
% 
% I just use the oh323.conf.sample with option gatekeeper=DISABLE.  I have
% installed GnuGK on the same PC where Asterisk runs on. To isolate the
% problem I stoped GnuGK.
% 
% The problem of misconfiguration is that I would like to define 2
% extensions in the last context "[voip-h323]" at the end of
% extensions.conf file. I attach oh323.conf and the 2 extensions.conf: one
% working with direct call and another invalid.
% 
% To resume: I have only 2 PC
% 
%  - on host 192.168.1.20, with a soundcard: Asterisk runs and
%    GnomeMeeting (GM20) will place a call.
% 
%  - on host 192.168.1.25, with PhoneJack-PCI: GnomeMeeting (GM25) is
%    waiting.
% 
%  - GM20, GM25 can communicate to each other, in both directions through
%    gatekeeper GnuGK.
% 
%  - for the test with Asterisk, I stop GnuGK.
% 
% With oh323.conf and extensions.conf-oh323-direct (the name is changed
% for reference), from GM20, I can make callto://192.168.1.20, which is
% routed by Asterisk onto GM25. It's normal as the first line in
% [voip-h323] is:
% 
%  exten => s,1,Dial,OH323/192.168.1.25
% 
% I would like to have a voice menu to guide caller to choose one
% extension ("665"). So I add the bloc at the end of extensions.conf (like
% extensions.conf-oh323-invalid):
% 
%   [voip-h323]
%   exten => s,1,Goto,i|1
%   exten => t,1,Playback,demo-thanks
%   exten => t,2,Hangup
%   exten => i,1,Playback,pbx-invalid
% 
%   ;...
% 
%   ;--- [alias = 665]
%   exten => 65,3,Wait,2
%   exten => 65,4,Dial,OH323/192.168.1.20
%   exten => 65,5,Hangup
% 
% But from GM20, when I make callto://192.168.1.20, the call is hung up
% after the playback "demo-thanks". So I don't have the time to dial "65".
% I thought that 4th line (exten => i,1,Playback,pbx-invalid) could stop
% the call and it's a problem of misconfigured but I don't know how to
% define it correctly. Should I modify sth in oh323.conf or
% extensions.conf, or both ?
% 
% Thank you all for hints.
% 
% 
% -- 
%   Truong <tphuong at wol.be>
% _______________________________________________
% Asterisk-Users mailing list
% Asterisk-Users at lists.digium.com
% http://lists.digium.com/mailman/listinfo/asterisk-users
% *** END of Message From Truong_Phuong ***

-- 
  Truong <tphuong at wol.be>
-------------- next part --------------
;
; Configuration file of OpenH323 channel driver
;

;-----------------------------------------
; General configuration options
; (ports, jitter, GK, ...)
;-----------------------------------------
[general]
listenAddress=0.0.0.0
listenPort=1720
connectPort=1720
fastStart=yes
h245Tunnelling=yes
h245inSetup=yes
inBandDTMF=no
silenceSuppression=no
jitterMin=20
jitterMax=100
ipTos=none
outboundMax=10
inboundMax=10
libTraceLevel=1
libTraceFile=stdout

;gatekeeper=192.168.1.2
;gatekeeper=DISCOVER
;gatekeeperPassword=secret
gatekeeper=DISABLE
;
; Set the mode for sending user-input
; Valid values for this option are:
;	Q931		-	Q.931 Keypad Information Element
;	STRING		-	H.245 string
;	TONE		-	H.245 tone
;	RFC2833		-	RFC2833
;
userInputMode=TONE
amaFlags=default
accountCode=H323

context=voip-h323

;-----------------------------------------
; Configure H.323 aliases, prefixes and
; related ASTERISK's contexts
;-----------------------------------------
[register]
alias=asterisk
alias=123
context=all-aliases
alias=ASTERISK
alias=666

context=more-aliases
alias=665

context=all-prefixes
gwprefix=00
gwprefix=01

context=more-stuff
alias=664
gwprefix=02

;-----------------------------------------
; Specify and configure CODEC related
; options
;-----------------------------------------
[codecs]
;
; Define the codec list of the channel driver.
; Every "codec" option may have a "frames" option
; associated with it.
; Valid values for the "codec" option are:
;	G711U		-	G.711 u-Law
;	G711A		-	G.711 A-Law
;	G7231		-	G.723.1(6.3k)
;	G72316K3	-	G.723.1(6.3k)
;	G72315K3	-	G.723.1(5.3k)
;	G7231A6K3	-	G.723.1A(6.3k)
;	G7231A6K3	-	G.723.1A(6.3k)
;	G728		-	G.728
;	G729		-	G.729
;	G729A		-	G.729A
;	G729B		-	G.729B
;	G729AB		-	G.729AB
;	GSM0610		-	GSM 0610
;	MSGSM		-	Microsoft GSM Audio Capability
;	LPC10		-	LPC-10
; Number of frames in RTP packet (if not specified) is 1.
;	
codec=GSM0610
frames=4
codec=G711A
frames=20
;codec=G7231

-------------- next part --------------
;
; Static extension configuration files, used by
; the pbx_config module.
;
; The "General" category is for certain variables.  
;
[general]
;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified.  Remember that all comments
; made in the file will be lost when that happens. 
;
; XXX Not yet implemented XXX
;
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by
; CLI command 'save dialplan' too
;
writeprotect=no

;
; The "Globals" category contains global variables that can be referenced
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental variable
; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid
;
[globals]
;CONSOLE=Console/dsp				; Console interface for demo
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
IAXINFO=guest					; IAXtel username/password
;IAXINFO=myuser:mypass
;TRUNK=Zap/g2					; Trunk interface
;TRUNK=IAX2/user:pass at provider

;
; Any category other than "General" and "Globals" represent 
; extension contexts, which are collections of extensions.  
;
; Extension names may be numbers, letters, or combinations
; thereof. If an extension name is prefixed by a '_'
; character, it is interpreted as a pattern rather than a
; literal.  In patterns, some characters have special meanings:
;
;   X - any digit from 0-9
;   N - any digit from 2-9
;   [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
;   . - wildcard, matches anything remaining (e.g. _9011. matches anything starting with 9011 including 9011)
;
; For example the extenion _NXXXXXX would match normal 7 digit dialings, while
; _1NXXNXXXXXX would represent an area code plus phone number
; preceeded by a one.
;
; Contexts contain several lines, one for each step of each
; extension, which can take one of two forms as listed below,
; with the first form being preferred.  One may include another
; context in the current one as well, optionally with a
; date and time.  Included contexts are included in the order
; they are listed.
;
;[context]
;exten => someexten,priority,application(arg1,arg2,...)
;exten => someexten,priority,application,arg1|arg2...
;
; Timing list for includes is 
;
;   <time range>|<days of week>|<days of month>|<months>
;
;include => daytime|9:00-17:00|mon-fri|*|*
;
; ignorepat can be used to instruct drivers to not cancel dialtone upon
; receipt of a particular pattern.  The most commonly used example is
; of course '9' like this:
;
;ignorepat => 9
;
; so that dialtone remains even after dialing a 9.
;

[demo]
;
; We start with what to do when a call first comes in.
;
exten => s,1,Wait,1			; Wait a second, just for fun
exten => s,2,Answer			; Answer the line
exten => s,3,DigitTimeout,5		; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,10		; Set Response Timeout to 10 seconds
exten => s,5,BackGround(demo-congrats)	; Play a congratulatory message
exten => s,6,BackGround(demo-instruct)	; Play some instructions

exten => 2,1,BackGround(demo-moreinfo)	; Give some more information.
exten => 2,2,Goto(s,6)

exten => 3,1,SetLanguage(fr)		; Set language to french
exten => 3,2,Goto(s,5)			; Start with the congratulations

exten => 1000,1,Goto(default,s,1)
;
; We also create an example user, 1234, who is on the console and has
; voicemail, etc.
;
exten => 1234,1,Playback(transfer,skip)	; "Please hold while..." 
					; (but skip if channel is not up)
exten => 1234,2,Macro(stdexten,1234,${CONSOLE})

exten => 1235,1,Voicemail(u1234)		; Right to voicemail

;exten => 1236,1,Dial(Console/dsp)		; Ring forever
;exten => 1236,2,Voicemail(u1234)		; Unless busy

;
; # for when they're done with the demo
;
exten => #,1,Playback(demo-thanks)		; "Thanks for trying the demo"
exten => #,2,Hangup		  		; Hang them up.

;
; A timeout and "invalid extension rule"
;
exten => t,1,Goto(#,1)			; If they take too long, give up
exten => i,1,Playback(invalid)		; "That's not valid, try again"

;
; Create an extension, 500, for dialing the
; Asterisk demo.
;
exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
exten => 500,2,Dial(IAX2/guest at misery.digium.com/s at default)	; Call the Asterisk demo
exten => 500,3,Playback(demo-nogo)	; Couldn't connect to the demo site
exten => 500,4,Goto(s,6)		; Return to the start over message.

;
; Create an extension, 600, for evaulating echo latency.
;
exten => 600,1,Playback(demo-echotest)	; Let them know what's going on
exten => 600,2,Echo			; Do the echo test
exten => 600,3,Playback(demo-echodone)	; Let them know it's over
exten => 600,4,Goto(s,6)		; Start over

[default]
;
; By default we include the demo.  In a production system, you 
; probably don't want to have the demo there.
;
; include => demo

; exten => 1025,1,Dial(H323/gm2 at 192.168.1.25)
; exten => 1020,1,Dial,OH323/192.168.1.25

; register to a gatekeeper H.323 on IP = 127.0.0.1
; exten => 4020,1,Dial,H323/127.0.0.1

exten => _9XXX,1,StripMSD,1
exten => _XXX,2,Dial,OH323/BYEXTENSION

[voip-h323]
;****************
; common option for all extensions
;  s = start ; t = time-out ; i = invalid
;****************
;
; It works for direct incoming call with the line below:
exten => s,1,Dial,OH323/192.168.1.25

;
exten => s,1,Goto,i|1
exten => t,1,Playback,demo-thanks
exten => t,2,Hangup
exten => i,1,Playback,pbx-invalid

;--- StripMSD = Strip Most_Significant_Digit
exten => _6XX,1,StripMSD,1
exten => _XX,2,Goto,BYEXTENSION|3

;--- [alias = 664]
exten => 64,3,Wait,2
exten => 64,4,Anwser
exten => 64,5,MP3Player,/var/lib/asterisk/sound/ram.mp3

;--- [alias = 665]
;exten => 65,3,Wait,2
;exten => 65,4,Dial,OH323/65
;exten => 65,5,Hangup

-------------- next part --------------
;
; Static extension configuration files, used by
; the pbx_config module.
;
; The "General" category is for certain variables.  
;
[general]
;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified.  Remember that all comments
; made in the file will be lost when that happens. 
;
; XXX Not yet implemented XXX
;
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by
; CLI command 'save dialplan' too
;
writeprotect=no

;
; The "Globals" category contains global variables that can be referenced
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental variable
; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid
;
[globals]
;CONSOLE=Console/dsp				; Console interface for demo
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
IAXINFO=guest					; IAXtel username/password
;IAXINFO=myuser:mypass
;TRUNK=Zap/g2					; Trunk interface
;TRUNK=IAX2/user:pass at provider

;
; Any category other than "General" and "Globals" represent 
; extension contexts, which are collections of extensions.  
;
; Extension names may be numbers, letters, or combinations
; thereof. If an extension name is prefixed by a '_'
; character, it is interpreted as a pattern rather than a
; literal.  In patterns, some characters have special meanings:
;
;   X - any digit from 0-9
;   N - any digit from 2-9
;   [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
;   . - wildcard, matches anything remaining (e.g. _9011. matches anything starting with 9011 including 9011)
;
; For example the extenion _NXXXXXX would match normal 7 digit dialings, while
; _1NXXNXXXXXX would represent an area code plus phone number
; preceeded by a one.
;
; Contexts contain several lines, one for each step of each
; extension, which can take one of two forms as listed below,
; with the first form being preferred.  One may include another
; context in the current one as well, optionally with a
; date and time.  Included contexts are included in the order
; they are listed.
;
;[context]
;exten => someexten,priority,application(arg1,arg2,...)
;exten => someexten,priority,application,arg1|arg2...
;
; Timing list for includes is 
;
;   <time range>|<days of week>|<days of month>|<months>
;
;include => daytime|9:00-17:00|mon-fri|*|*
;
; ignorepat can be used to instruct drivers to not cancel dialtone upon
; receipt of a particular pattern.  The most commonly used example is
; of course '9' like this:
;
;ignorepat => 9
;
; so that dialtone remains even after dialing a 9.
;

[demo]
;
; We start with what to do when a call first comes in.
;
exten => s,1,Wait,1			; Wait a second, just for fun
exten => s,2,Answer			; Answer the line
exten => s,3,DigitTimeout,5		; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,10		; Set Response Timeout to 10 seconds
exten => s,5,BackGround(demo-congrats)	; Play a congratulatory message
exten => s,6,BackGround(demo-instruct)	; Play some instructions

exten => 2,1,BackGround(demo-moreinfo)	; Give some more information.
exten => 2,2,Goto(s,6)

exten => 3,1,SetLanguage(fr)		; Set language to french
exten => 3,2,Goto(s,5)			; Start with the congratulations

exten => 1000,1,Goto(default,s,1)
;
; We also create an example user, 1234, who is on the console and has
; voicemail, etc.
;
exten => 1234,1,Playback(transfer,skip)	; "Please hold while..." 
					; (but skip if channel is not up)
exten => 1234,2,Macro(stdexten,1234,${CONSOLE})

exten => 1235,1,Voicemail(u1234)		; Right to voicemail

;exten => 1236,1,Dial(Console/dsp)		; Ring forever
;exten => 1236,2,Voicemail(u1234)		; Unless busy

;
; # for when they're done with the demo
;
exten => #,1,Playback(demo-thanks)		; "Thanks for trying the demo"
exten => #,2,Hangup		  		; Hang them up.

;
; A timeout and "invalid extension rule"
;
exten => t,1,Goto(#,1)			; If they take too long, give up
exten => i,1,Playback(invalid)		; "That's not valid, try again"

;
; Create an extension, 500, for dialing the
; Asterisk demo.
;
exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
exten => 500,2,Dial(IAX2/guest at misery.digium.com/s at default)	; Call the Asterisk demo
exten => 500,3,Playback(demo-nogo)	; Couldn't connect to the demo site
exten => 500,4,Goto(s,6)		; Return to the start over message.

;
; Create an extension, 600, for evaulating echo latency.
;
exten => 600,1,Playback(demo-echotest)	; Let them know what's going on
exten => 600,2,Echo			; Do the echo test
exten => 600,3,Playback(demo-echodone)	; Let them know it's over
exten => 600,4,Goto(s,6)		; Start over

[default]
;
; By default we include the demo.  In a production system, you 
; probably don't want to have the demo there.
;
; include => demo

; exten => 1025,1,Dial(H323/gm2 at 192.168.1.25)
; exten => 1020,1,Dial,OH323/192.168.1.25

; register to a gatekeeper H.323 on IP = 127.0.0.1
; exten => 4020,1,Dial,H323/127.0.0.1

exten => _9XXX,1,StripMSD,1
exten => _XXX,2,Dial,OH323/BYEXTENSION

[voip-h323]
;****************
; common option for all extensions
;  s = start ; t = time-out ; i = invalid
;****************
;
; It works for direct incoming call with the line below:
;exten => s,1,Dial,OH323/192.168.1.25
;
exten => s,1,Goto,i|1
exten => t,1,Playback,demo-thanks
exten => t,2,Hangup
exten => i,1,Playback,pbx-invalid

;--- StripMSD = Strip Most_Significant_Digit
exten => _6XX,1,StripMSD,1
exten => _XX,2,Goto,BYEXTENSION|3

;--- [alias = 664]
exten => 64,3,Wait,2
exten => 64,4,Anwser
exten => 64,5,MP3Player,/var/lib/asterisk/sound/ram.mp3

;--- [alias = 665]
;exten => 65,3,Wait,2
;exten => 65,4,Dial,OH323/65
;exten => 65,5,Hangup

;--- [alias = 665]
exten => 65,3,Wait,2
exten => 65,4,Dial,OH323/192.168.1.20
exten => 65,5,Hangup


;--- [alias = 666]
;exten => 66,3,Wait,2
;exten => 66,4,Dial,OH323/192.168.1.25
;exten => 66,5,Hangup


More information about the asterisk-users mailing list