[Asterisk-Users] X100P dial in/out to sip phones

Chris A. Icide chris at netgeeks.net
Sun Mar 7 14:19:48 MST 2004


Simon,

Try the following configs:


/etc/asterisk/zaptel.conf

fxsks=1
loadzone=uk
defaultzone=uk





/etc/asterisk/zapata.conf

languages=en
context=inbound-analog
signalling=fxs_ks

; I always create dial groups for making outbound calls, you can use the 
specific channels as well
group = 1
channel => 1


/etc/asterisk/sip.conf

[general]
; I generally prefer gsm and ulaw, you can allow any codecs you like
disallow=all
allow=gsm
allow=ulaw

; use your IP address in the bind address or leave as 0.0.0.0 to bind to 
all active interfaces
port=5060
bindaddr=0.0.0.0

; set your tos - see www.voip-info.org command reference for tos values
tos =0x10

;next create an entry for your SIP phones
; you can specify username and secret or you can set a very explicit permit.
; canreinvite, no=asterisk remains in media path, yes=asterisk CAN step out 
of media path
; if you have problems with authentication, try removing the username, 
secret, and permit lines
; and setting host=a.b.c.d where a.b.c.d is the ip address of the SIP client
; the example permit will permit any clients with 10.0.0.0 255.255.255.0 
address space

[2001]
type=friend
username=2001
secret=2001
host=dynamic
permit=10.0.0.0/8
canreinvite=no
context=intern
callerid=Test Caller
mailbox=2001
nat=yes




/etc/asterisk/extensions.conf

[general]

static=yes
writeprotect=yes

[globals]

; used for global variables, which in this basic example, we'll completely 
ignore

[outbound-analog]

exten => _X.,1,Dial(Zap/g1/${EXTEN},60)
exten => _X.,2,Hangup

[inbound-analog]

exten => s,1,Dial(SIP/2001,20)
exten => s,2,Voicemail(u2001)
exten => s,3,Hangup
exten => s,102,Voicemail(b2001)
exten => s,103,Hangup

[local]

; Note we don't send local callers to Voicemail in this example

exten => 2001,1,Dial(SIP/2001)
exten => 2001,2,Hangup
exten => 2001,102,Hangup

exten => 2999,1,Answer
exten => 2999,2,Wait(1)
exten => 2999,3,VoiceMailMain
exten => 2999,4,Hangup


[intern]

include => local
include => outbound-analog




/etc/asterisk/voicemail.conf

servermail=voicemail at xyz.abc
attach=yes
maxmessage=300
maxgreet=60

[default]
2001 => 1234,John Doe,john_doe at xyz.abc




This should give you a very basic system with a SIP phone client, one 
outside line via X100P, and voicemail.  the Sip client will be able to call 
voicemail using 2999, and any other sip clients you configure by dialing 
their extension.  When someone calls the analog number from the outside 
world, the sip client at 2001 will ring, if no one answers, the caller will 
be sent to leave a voicemail message,  if 2001 is busy, the caller will be 
sent to voicemail with a prompt indicating the caller is busy.

Hope this helps.

-Chris


At 12:08 PM 3/7/2004, you wrote:
>Thanks for your help David
>
>Your configs are a little to complicated  for this complete asterisk 
>newbie though.
>All i am actually after is how to get a sip phone to ring when the X100P 
>is dialed on out landline, and how to get a sipphone to dial out through 
>the X100P.
>I have saved all your configs and had a trawl through them though.
>I am a great believer in start simple then build it up and step by step it 
>seems simple in the end but I keep stumbling on this task. once i have 
>this i will look at call parking,conferencing (all the fun stuff) etc.. 
>but at the moment all i would like to acheive is bridging the gap from sip 
>to BT  :-)    IF you have any quick pointers to help me acheive that I 
>would be very pleased.
>Thanks again for taking the time to reply (especially on a sunday evening 
>with the roast going cold)
>
>Simon
>
>David J Carter wrote:
>
>>Simon,
>>
>>Caller ID does not work in the UK, well not on my BT or Telewest line's.
>>
>>Have a look at my sample configs http://www.codepipe.com/id25.htm , I am
>>also in the UK and these work for me.
>>
>>Give me a call if ya want to chat about it.
>>
>>Regards
>>
>>
>>Dave
>>
>>-----Original Message-----
>>From: asterisk-users-admin at lists.digium.com
>>[mailto:asterisk-users-admin at lists.digium.com]On Behalf Of Simon
>>Chappell
>>Sent: 07 March 2004 16:46
>>To: asterisk-users at lists.digium.com
>>Subject: [Asterisk-Users] X100P dial in/out to sip phones
>>
>>
>>Hello all
>>
>>I have recently stumbled accross voip and asterisk.
>>We have a small network of vpns running in the uk. I have managed to get
>>the sip phones dialing each other through asterisk and it is working
>>great. (we are having long free conversations and that is something to
>>get excited about)..
>>My problem is that I cannot get the X100P i recently bought to dial out
>>or do anything with incoming calls.
>>I did loads of googling and found this snippet that made the zaptel card
>>moan at me about callerid ask me to type a number then do nothing but
>>offer silence..
>>[inbound-analog]
>>exten => s,1,Zapateller(answer|nocallerid)
>>exten => s,2,NoOp
>>exten => s,2,Macro(record-on,${PHONE1},${CALLERIDNUM})
>>exten => s,3,PrivacyManager
>>exten => s,4,Dial(${PHONE1},15,Ttm)
>>exten => s,5,Answer
>>exten => s,6,Wait(1)
>>exten => s,7,Playback(new/hello)
>>exten => s,8,Playback(new/marisa-john-not-in-momnt)
>>exten => s,9,Playback(new/theyre-rattlesnake-wrstling)
>>exten => s,10,Voicemail(u${PHONE1VM})
>>exten => s,11,Hangup
>>exten => s,108,Wait(2)
>>exten => s,109,Voicemail(b${PHONE1VM})
>>exten => s,110,Hangup
>>If i rem out that and run asterisk with -vvg i get this when i dial in
>>to the x100p
>>Mar  7 16:43:41 NOTICE[245776]: chan_zap.c:4624 ss_thread: Got event 2
>>(Ring/Answered)...
>>Mar  7 16:43:44 NOTICE[245776]: chan_zap.c:4624 ss_thread: Got event 2
>>(Ring/Answered)...
>>Mar  7 16:43:44 NOTICE[245776]: chan_zap.c:4624 ss_thread: Got event 2
>>(Ring/Answered)...
>>Mar  7 16:43:49 WARNING[245776]: chan_zap.c:4695 ss_thread: CallerID
>>returned with error on channel 'Zap/1-1'
>>Mar  7 16:43:49 WARNING[245776]: pbx.c:1778 ast_pbx_run: Channel
>>'Zap/1-1' sent into invalid extension 's' in context 'default', but no
>>invalid handler
>>
>>So i feel i am getting there..
>>I would like the extensions to dial out and ring when the line rings..
>>can anyone give me a clue or point me in the right direction
>>
>>I am in the UK by the way if that makes a difference.
>>
>>Many thanks in advance
>>
>>Simon
>>
>>_______________________________________________
>>Asterisk-Users mailing list
>>Asterisk-Users at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>_______________________________________________
>>Asterisk-Users mailing list
>>Asterisk-Users at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>--
>Kind Regards
>
>Simon Chappell
>url : www.isnsuk.com
>email : s.chappell at isnsuk.com
>PH: 01403 268474
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users





More information about the asterisk-users mailing list