[Asterisk-Users] asterisk newbie and phones which don't want tocomunicate

Mahmoud Badran mahmoud.badran at atsint.com
Mon Jul 4 23:35:23 MST 2005


Hiii ; actually you are not allowing any codecs in the sip.conf neither
alaw nor ulaw

so try this to all phones in sip.conf or put it in the general context
(allow=all)

[2011]

 type=friend
 username=2011
 secret=1945
 nat=yes
 host=dynamic
 dtmfmode=rfc2833
 canreinvite=no
 qualify=200

allow=all












On Mon, 2005-07-04 at 18:00 +0200, Sistemista WebSolvingJaa wrote:

> with some trials configuration,and a couple of hours now i can make a
> call from a phone to another phone. typing the code of phone A from
> phone B, the ring-tone of phone A rings but  neither phone A and phone
> B can comunicate as voice (i hope my explaination can be understood by
> all of you). so my extension.conf is now like this:
> 
> [general]
> 
> static=yes
> writeprotect=yes
> 
> autofallthrough=yes
> 
> [globals]
> CONSOLE=Console/dsp                             ; Console interface for demo
> CONSOLE=Zap/1
> CONSOLE=Phone/phone0
> IAXINFO=guest                                   ; IAXtel username/password
> TRUNK=Zap/g2                                    ; Trunk interface
> TRUNKMSD=1                                      ; MSD digits to strip
> (usually 1 or 0)
> 
> [dundi-e164-local]
> include => dundi-e164-canonical
> include => dundi-e164-customers
> include => dundi-e164-via-pstn
> 
> [dundi-e164-switch]
> switch => DUNDi/e164
> 
> [dundi-e164-lookup]
> include => dundi-e164-local
> 
> include => dundi-e164-switch
> 
> [macro-dundi-e164]
> 
> exten => s,1,Goto(${ARG1},1)
> include => dundi-e164-lookup
> 
> 
> [iaxtel700]
> exten => _91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)
> 
> [iaxprovider]
> ;switch => IAX2/user:[key]@myserver/mycontext
> 
> [trunkint]
> 
> exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
> exten => _9011.,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
> 
> [trunkld]
> 
> exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
> exten => _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
> 
> [trunklocal]
> 
> exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
> 
> [trunktollfree]
> 
> exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
> exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
> exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
> exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
> 
> [international]
> 
> ignorepat => 9
> include => longdistance
> include => trunkint
> 
> [longdistance]
> 
> ignorepat => 9
> include => local
> include => trunkld
> 
> [local]
> 
> ignorepat => 9
> include => default
> include => parkedcalls
> include => trunklocal
> include => iaxtel700
> include => trunktollfree
> include => iaxprovider
> 
> [macro-stdexten];
> 
> exten => s,1,Dial(${ARG2},20)                                   ; 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
> 
> [demo]
> 
> exten => s,1,Wait,1                     ; Wait a second, just for fun
> exten => s,n,Answer                     ; Answer the line
> exten => s,n,SetVar(TIMEOUT(digit)=5)   ; Set Digit Timeout to 5 seconds
> exten => s,n,SetVar(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,SetVar(LANGUAGE()=fr)              ; Set language to french
> exten => 3,n,Goto(s,restart)                    ; Start with the congratulations
> 
> exten => 1000,1,Goto(default,s,1)
> 
> 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
> 
> exten => #,1,Playback(demo-thanks)              ; "Thanks for trying the demo"
> exten => #,n,Hangup                     ; Hang them up.
> 
> 
> exten => t,1,Goto(#,1)                  ; If they take too long, give up
> exten => i,1,Playback(invalid)          ; "That's not valid, try again"
> 
> exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
> exten => 500,n,Dial(IAX2/guest at misery.digium.com/s at 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.
> 
> 
> 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
> 
> exten => 8500,1,VoicemailMain
> exten => 8500,n,Goto(s,6)
> 
> [default]
> 
> include => from-sip
> 
> exten => 1000,1,Dial,Zap/1|20 ; Exten 1000 dials Zap channel 1 with a
> ring time option of 20 secs, which is the analog telephone plugged
> into the first port of the TDM400P.
> exten => 1000,2,Voicemail,u1000
> exten => 1000,3,Hangup
> exten => 1000,102,Voicemail,b1000
> exten => 1000,103,Hangup
> 
> exten => 2000,1,Dial,Zap/2|20
> exten => 2000,2,Voicemail,u2000
> exten => 2000,3,Hangup
> exten => 2000,102,Voicemail,b2000
> exten => 2000,103,Hangup
> 
> exten => 3000,1,Dial,Zap/3|20
> exten => 3000,2,Voicemail,u3000
> exten => 3000,3,Hangup
> exten => 3000,102,Voicemail,b3000
> exten => 3000,103,Hangup
> 
> exten => _NXXXXXX,1,Dial(Zap/4/${EXTEN}|20,t)
> 
> [incoming]
> exten => s,1,Wait(1)
> exten => s,2,Dial(Zap/g1|20,t) ; Calls the first available channel in group 1
> exten => s,3,Voicemail,u9000 ; Directs caller to unavailable voicemailbox 9000
> exten => s,4,Hangup
> exten => s,103,Voicemail,b9000 ; Directs caller to busy voicemailbox 9000
> exten => s,104,Hangup
> 
> 
> [sip-incoming]
> exten => _.,1,Wait(1)
> exten => _.,2,Playback(demo-thanks)
> exten => _.,3,Hangup
> 
> [from-sip]
> exten => 2010,1,Dial(SIP/2010,20)
> exten => 2010,2,Voicemail(u2000)
> exten => 2010,102,Voicemail(b2000)
> exten => 2010,103,Hangup
> 
> exten => 2011,1,Dial(SIP/2011,20)
> exten => 2011,2,Voicemail(u2011)
> exten => 2011,102,Voicemail(b2011)
> exten => 2011,103,Hangup
> 
> exten => 2012,1,Dial(SIP/2012,20)
> exten => 2012,2,Voicemail(u2012)
> exten => 2012,102,Voicemail(b2012)
> exten => 2012,103,Hangup
> 
>  [local]
>  ignorepat => 9
>  include => default
>  include => parkedcalls
>  include => trunklocal
>  include => trunktollfree
>  include => sip ;x included sip
> 
>  [sip]
>  exten => 55,1,VoicemailMain
> 
>  exten => 2001,1,Dial(SIP/2001,20,tr)
>  exten => 2001,2,VoiceMail,u2001
>  exten => 2001,102,VoiceMail,b2001
> 
>  exten => 2002,1,Dial(SIP/2002,20,tr)
>  exten => 2002,2,VoiceMail,u2002
>  exten => 2002,102,VoiceMail,b2002
> 
>  exten => 2003,1,Dial(SIP/2003,20,tr)
>  exten => 2003,2,VoiceMail,u2003
>  exten => 2003,102,VoiceMail,b2003
> 
>  exten => 2004,1,Dial(SIP/2004,20,tr)
>  exten => 2004,2,VoiceMail,u2004
>  exten => 2004,102,VoiceMail,b2004
> 
>  exten => 2010,1,Dial(SIP/2010,20,tr)
>  exten => 2010,2,VoiceMail,u2010
>  exten => 2010,102,VoiceMail,b2010
> 
>  exten => 2011,1,Dial(SIP/2011,20,tr)
> 
>  exten => 2022,1,Dial(SIP/2022,20,tr)
> 
>  exten => _1XXX,1,Dial(IAX/asterisk2:1945 at 192.168.1.30/${EXTEN}@local)
> 
> and the sip.conf file is like this:
> 
> [general]
>  port = 5060
>  bindaddr = 0.0.0.0
>  context =  from-sip       ;x changed from default to sip
> 
> 
>  [2001]
>  type=friend
>  username=2001
>  secret=1945
>  canreinvite=no
>  host=dynamic
>  dtmfmode=rfc2833
>  qualify=200
>  mailbox=2001
>  nat=1
> 
> 
>  [2002]
>  type=friend
>  username=2002
>  secret=1945
>  canreinvite=no
>  host=dynamic
>  dtmfmode=rfc2833
>  qualify=200
>  mailbox=2002
>  nat=1
> 
>  [2010]
>  type=friend
>  username=2010
>  secret=1945
>  nat=yes
>  host=dynamic
>  dtmfmode=rfc2833
>  canreinvite=no
>  qualify=200
> 
>  [2011]
>  type=friend
>  username=2011
>  secret=1945
>  nat=yes
>  host=dynamic
>  dtmfmode=rfc2833
>  canreinvite=no
>  qualify=200
> 
>  [2012]
>  type=friend
>  username=2012
>  secret=1945
>  nat=yes
>  host=dynamic
>  dtmfmode=rfc2833
>  canreinvite=no
>  qualify=200
> 
> 
> can somebody tell me where are the mistakes?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050705/6ac90a00/attachment.htm


More information about the asterisk-users mailing list