23 августа 2012 г.

SIP без авторизации

SIP.CONF:

[200]
type=friend
host=dynamic
username=200
secret=XXX
nat=yes
canreinvite=no
context=office
callerid=Office <200>
allow=gsm
allow=ulaw
allow=alaw

[prov_sip]
type=friend
host=XXX.XX.X.XXX
canreinvite=no
insecure=invite
context=frompstn
allow=ulaw
allow=alaw

EXTENNSIONS.CONF:


[frompstn]
exten => _73012XXXXXX,1,Noop(Call from PSTN to ${EXTEN:5:6})
exten => _73012XXXXXX,2,Dial(SIP/${EXTEN:5:6})
exten => _73012XXXXXX,3,Hangup

[office]
exten => 200,1, Dial(SIP/200,40)
exten => 200,2, Hangup
exten => _X./200,1,Dial(SIP/${EXTEN}@prov_sip,40)