[Asterisk-Users] Insights on SIP channel usage in * 1.2.7.1 are
welcome!
hugolivude
hugolivude at gmail.com
Tue May 2 17:47:05 MST 2006
I've had a heck of a time getting a SIP channel to work in Asterisk
1.2.7.1 (Redhat 9.0). I've done it successfully a number of times on
pre 1.2 versions of Asterisk so perhaps it's version related. Any
insights are welcome!
At first I wasn't able to dial out on the SIP channel _whenever_ I
started Asterisk (i.e. not just when the box was booted). I always
had to do a reload from the CLI before it would work. Using Ethereal
I noticed that there seemed to be some trouble resolving my ITSP's
hostname sip.unlimitel.ca (althogh I cannot explain why it would
_always_ start working after a reload) so I ended replacing the
hostname sip.unlimitel.ca with the actual IP address (64.26.157.251).
Not pretty but at least I can call out now. BTW adding:
sip.unlimitel.ca 64.26.157.251
to hosts didn't help.
I'd be grateful for any insights on this and whether there's a more
elegant sol'n.
Anyway I was able to call out on that SIP channel but I couldn't
receive calls on it. I captured a SIP debug trace and noticed
something about the SIP number not being in the context. The context
associated w/ the SIP channel looked like this:
[incoming]
exten => s,1,NoOp(${CONTEXT})
exten => s,n,Ringing()
exten => s,n,GoTo(attendant-MainMenu,s,1)
exten => s,n,Hangup()
I found that I had to add:
exten => _6477235412,1,NoOp(${CONTEXT})
exten => _6477235412,n,Ringing()
exten => _6477235412,n,GoTo(attendant-MainMenu,s,1)
exten => _6477235412,n,Hangup()
I found this odd because I thought s would be sufficient (it has been
in the past). Any comments you can share w/ me on this?
I've also noticed this warning message from time-to-time in the CLI:
WARNING[2203]: chan_sip.c:9633 handle_response_register: Got 200 OK on
REGISTER that isn't a register
Any ideas?
My SIP.conf is below. BTW what's auth=md5 supposed to do. I can't
find any documentation on it so I commented it out.
Many Thanks,
H
; -----------------------------------------------------------
; /etc/asterisk/sip.conf
;
; Note: If your SIP devices are behind a NAT and your Asterisk
; server isn't, try adding "nat=1" to each peer definition to
; solve translation problems.
;
;********************************************************************
[general]
;
context=incoming-bogus-calls
bindport=5060 ; Port to bind to (SIP is 5060)
bindaddr=0.0.0.0 ; Address to bind to (all addresses on machine)
maxexpirey=3600 ; Must be larger than the re-register timeout on the router
defaultexpirey=3600
notifymimetype=text/plain
rtptimeout=60
rtpholdtimeout=300
disallow=all
allow=ulaw
;
; This section is because i'm behind nat
;
;register=>6477235412:<mysecret>@sip.unlimitel.ca/6477235412
register=>6477235412:<mysecret>@64.26.157.251/6477235412
externip=<mystaticIPaddress> ;Outside address
localnet=192.168.0.148/255.255.255.0 ;Inside Network
;
;********************************************************************
[6477235412]
type=peer
;auth=md5
username=6477235412
fromuser=6477235412
fromdomain=unlimitel.ca
secret=<mysecret>
;host=sip.unlimitel.ca
host=64.26.157.251
port=5060
nat=yes
canreinvite=no
qualify=no
disallow=all
allow=g729
dtmfmode=rfc2833
insecure=very
context=incoming
More information about the asterisk-users
mailing list