Сообщений: 3
|
связать Micronet SP5054/S c (*)
Добрый день.
что я делаю не правильно.
что есть у меня.
1. етот гейтвей
2. одна городская линия
3. астериск
4. два сип-фона планеты 152 и sjphone
из города звонки идут без проблем. до званиваешься набераешь внутренний номер и есть коннект.
проблема нету.
а вот с сип-фона позвонить бальшая проблема
привожу свои конфиги.
sip.conf
[general]
context=default ; Default context for incoming calls
allowguest=no ; Allow or reject guest calls (default is yes, this can also be set to 'osp'
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
[201]
type=friend
host=dynamic
username=201
secret=201
nat=no
canreinvite=no
context=office
callerid="user1" <201>
allow=gsm
allow=ulaw
allow=alaw
[202]
type=friend
host=dynamic
username=202
secret=202
nat=no
canreinvite=no
context=office
callerid="user2" <202>
allow=gsm
allow=ulaw
allow=alaw
[203]
type=friend
host=dynamic
username=203
secret=203
nat=no
canreinvite=no
context=office
callerid="user3" <203>
allow=gsm
allow=ulaw
allow=alaw
[204]
type=friend
host=dynamic
username=204
secret=204
nat=no
canreinvite=no
context=office
callerid="user4" <204>
allow=gsm
allow=ulaw
allow=alaw
[206]
type=friend
host=dynamic
username=206
secret=206
dtmfmode=rfc2833
context=generic-inc
[207]
type=friend
host=dynamic
username=207
secret=207
dtmfmode=rfc2833
context=generic-inc
[208]
type=friend
host=dynamic
username=208
secret=208
dtmfmode=rfc2833
context=generic-inc
[205]
type=friend
host=dynamic
username=205
secret=205
dtmfmode=rfc2833
context=generic-inc
[209]
type=friend
host=dynamic
username=209
secret=209
nat=no
canreinvite=no
context=office
callerid="user9" <209>
allow=gsm
allow=ulaw
allow=alaw
extensions.conf
[general]
static=yes
writeprotect=no
[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
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass@provider
[local]
;
; Master context for local, toll-free, and iaxtel calls only
;
ignorepat => 9
include => default
[macro-stdexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;
exten => s,1,Dial(${ARG2},20,t) ; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
[macro-stdPrivacyexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
; ${ARG3} - Optional DONTCALL context name to jump to (assumes the s,1 extension-priority)
; ${ARG4} - Optional TORTURE context name to jump to (assumes the s,1 extension-priority)`
;
exten => s,1,Dial(${ARG2},20|p) ; Ring the interface, 20 seconds maximum, call screening option (or use P for databased call screening)
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
exten => s-DONTCALL,1,Goto(${ARG3},s,1) ; Callee chose to send this call to a polite "Don't call again" script.
exten => s-TORTURE,1,Goto(${ARG4},s,1) ; Callee chose to send this call to a telemarketer torture script.
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
[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,n,Answer ; Answer the line
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message
exten => s,n(instruct),BackGround(demo-instruct) ; Play some instructions
exten => s,n,WaitExten ; Wait for an extension to be dialed.
exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.
exten => 2,n,Goto(s,instruct)
exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french
exten => 3,n,Goto(s,restart) ; 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,n,Macro(stdexten,1234,${CONSOLE})
exten => 1235,1,Voicemail(u1234) ; Right to voicemail
exten => 1236,1,Dial(Console/dsp) ; Ring forever
exten => 1236,n,Voicemail(u1234) ; Unless busy
;
; # for when they're done with the demo
;
exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"
exten => #,n,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,n,Dial(IAX2/guest@misery.digium.com/s@default) ; Call the Asterisk demo
exten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo site
exten => 500,n,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,n,Echo ; Do the echo test
exten => 600,n,Playback(demo-echodone) ; Let them know it's over
exten => 600,n,Goto(s,6) ; Start over
;
; Give voicemail at extension 8500
;
exten => 8500,1,VoicemailMain
exten => 8500,n,Goto(s,6)
;
; Here's what a phone entry would look like (IXJ for example)
;
;exten => 1265,1,Dial(Phone/phone0,15)
;exten => 1265,n,Goto(s,5)
;[mainmenu]
;
; Example "main menu" context with submenu
;
;exten => s,1,Answer
;exten => s,n,Background(thanks) ; "Thanks for calling press 1 for sales, 2 for support, ..."
;exten => s,n,WaitExten
;exten => 1,1,Goto(submenu,s,1)
;exten => 2,1,Hangup
;include => default
;
;[submenu]
;exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback
;exten => s,n,Wait,2
;exten => s,n,Background(submenuopts) ; "Thanks for calling the sales department. Press 1 for steve, 2 for..."
;exten => s,n,WaitExten
;exten => 1,1,Goto(default,steve,1)
;exten => 2,1,Goto(default,mark,2)
[default]
include => demo
[office]
exten => 201, 1, Macro(stdexten,201,SIP/201)
exten => user1, 1, Goto(201|1)
exten => 202, 1, Macro(stdexten,202,SIP/202)
exten => user2, 1, Goto(202|1)
exten => 203, 1, Macro(stdexten,203,SIP/203)
exten => user3, 1, Goto(201|1)
exten => 204, 1, Macro(stdexten,204,SIP/204)
exten => user4, 1, Goto(204|1)
exten => 209, 1, Macro(stdexten,209,SIP/209)
exten => user9, 1, Goto(209|1)
exten => _9NXXXXXX, 1, Dial(SIP/205, 20,rT)
[generic-inc]
exten => s, 1, Wait, 1
exten => s, 2, Answer
exten => s, 3, BackGround(local-remote)
exten => s, 4, WaitExten
exten => 201, 1, Macro(stdexten,201,SIP/201)
exten => 202, 1, Macro(stdexten,202,SIP/202)
exten => 203, 1, Macro(stdexten,203,SIP/203)
exten => 204, 1, Macro(stdexten,204,SIP/204)
exten => 209, 1, Macro(stdexten,209,SIP/209)
[sip-dialout]
exten => s, 1, Wait, 1
exten => s, 2, Answer
exten => s, 3, BackGround(sip-announce)
exten => s, 4, Read(ext)
exten => s, 5, Dial(SIP/205/${ext:1},20,rT)
|