Categories: Asterisk Posted by Admin on 2009-10-20 19:51 | 评论 (0)
  • Unable to find key 'XXX' in family 'SIP/Registry'

From KolmiSoft Wiki

Jump to: navigation, search
  • Make sure you have rtcachefriends = no in sip.conf
  • In MOR GUI in device's settings make sure nat = yes
  • 对接落地


[general]
context = (own_context in extensions.conf where recive the call )
realm = real.com
bindport=5060
srvlookup=yes
disallow=all
allow=ulaw
allow=gsm
language=en

trustrpid = yes
sendrpid = yes

register => fromuser@fromdomain:secret@host
register => XXXX@YYYY.com:AAAA@IP

[my_provider]
type=peer
fromuser=XXXX
fromdomain=YYYY.com
canreinvite=no
secret=AAAAA
insecure=very
host= IP
disallow=all
allow=gsm
allow=ulaw
allow=alaw
qualify=yes
nat=no

Outbound call in extensions.conf
exten => _X.,1,Dial(SIP/${EXTEN}@my_provider)
  • G729
    http://asterisk.hosting.lv/
    Then connect to the Asterisk console with:
    asterisk -r
    and type (adjust accordingly):
    load codec_g729-gcc-athlon-sse.so
  • TSL
    http://www.voztovoice.org/?q=node/173

    cd /etc/asterisk

    primero he creado una clave privada:

    openssl genrsa 1024 > host.key

    y luego un certificado firmado con la clave privada recién creada:

    openssl req -new -x509 -nodes -sha1 -days 365 -key host.key > host.crt

    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter '.', the field will be left blank.
    -----
    Country Name (2 letter code) [GB]:CO
    State or Province Name (full name) [Berkshire]:Bogota
    Locality Name (eg, city) [Newbury]:Bogota
    Organization Name (eg, company) [My Company Ltd]:VozToVoice
    Organizational Unit Name (eg, section) []:TLS
    Common Name (eg, your name or your server's hostname) []:sip.miodominio.com
    Email Address []:admin@miodominio.com

    La parte más importante del certificado es el Common Name donde tenemos que indicar el dominio que luego usaremos para conectar nuestros clientes SIP.

    Una vez que tengamos los dos archivos creamos un nuevo archivo que contenga los dos:

    cat host.cert host.key > asterisk.pem

    Ahora podemos configurar el sip.conf

    nano sip.conf

    y en el bloque de configuración del soporte TLS ponemos:

    tlsenable=yes ; activamos el soporte TLS

    tlsbindaddr=0.0.0.0 ; la dirección ip que asterisk usará para aceptar las conexiones (si no definimos el puerto el predefinido será el 5061 que tenemos que abrir en nuestro cortafuegos – protocolo UDP)

    tlscertfile=/etc/asterisk/asterisk.pem ; carpeta y nombre del archivo que contiene nuestro certificado

    Siempre en el mismo archivo, para cada extensión que queremos que use el protocolo TLS para conectarse a Asterisk añadimos la línea:

    transport=tls

  • 生成CA认证证书
    mkdir -p ./demoCA/{private,newcerts}
    touch ./demoCA/index.txt
    echo 01 > ./demoCA/serial
    openssl genrsa -des3 -out server.key 1024
    openssl req -new -key server.key -out server.csr
    openssl req -new -x509 -keyout ca.key -out ca.crt
    openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key

  • Unable to open pid file '/var/run/asterisk/asterisk.pid': No such file or directory
    mkdir /var/run/asterisk/
    chown root /var/run/asterisk/
    # ps -aux | grep asterisk


    # kill -9 pidnumber

  • 安装res_crypto需要装的包
    libssl-dev

添加评论




biuquote
  • 评论
  • 在线预览
Loading