El rincón de Odicha

Sistemas y cacharros varios

chan_sebi (1) Que, como y por que

Publicado por odicha en 30 junio 2009

Hola.

Ahora que parece que lo de chan_sebi ya está más o menos controlado voy a comentar un poco como y por que surgió la idea de trabajar en este ámbito.

Primero explicar que es chan_sebi. Pues es un canal para Asterisk, que utiliza modems Huawei para proveer de gateways gsm de voz y/o  sms.

En principio se ha hecho pensando en los E169/K3520 de Huawei, modems estos que tienen capacidades de llamada de voz. Internamente utilizan un chipset de Qualcomm (de la serie MSM7200). Con un modem usb de estos modelos tenemos un gateway de voz que además no tiene que hacer conversiones de audio como las que se hacen con un FXO analogico ni los problemas de señalización inherentes a los canales analógicos, ya que toda la gestión de audio y de señalización se hace de forma digital (bien a través del canal de audio, bien a través del canal de datos), pudiendo ser comparado a un router RDSI=>GSM de un puerto

La idea surge de la posibilidad de aprovechar las capacidades de voz de estos modems para tener un gateway gsm a un costo muy economico. La mayor parte de los operadores los dan a costo cero cumpliendo unos mínimos de permanencia o consumo, como cualquier otro terminal telefónico.

Técnicamente estos modems son vistos por el S.O. como un “hub” usb con varios dispositivos. En principio tres puertos seriales y un puerto de almacenamiento con dos dispositivos (un cd y un lector de memoria). Asi los subid 00,01 y 02 serán los puertos de comunicacion, cada uno con distintas funciones (audio, datos y gestion general) y el subid 03 que nos dará control sobre el cd virtual y el lector de tarjetas.

A partir de esta base se construye un controlador de canal que toma como punto de partida el chan_mobile que ya existe para Asterisk.

El firmware para los E169 K3520 que yo uso está disponible aqui http://www.vodafone.de/downloadarea/FW_Update_K3520_11.314.12.02.00.zip

Para descargar asterisk-addons con chan_sebi svn export http://asterisk-es-rsp.irontec.com/svn/team/Odicha/asterisk-addons-1.4.7 asterisk-addons 

Y pasamos ya a lo que es instalacion y configuracion de chan_sebi

A nivel de descarga e instalación comentar cuales son sus prerequisitos. El S.O. debe ser capaz de montar los subid 00, 01 y 02 del modem huawei como usbTTYx. Los kernels antiguos (por debajo de 2.6.20 generalmente) no son capaces de hacerlo automaticamente por lo que habrá que modificar algunas cosas para que se detecten de la forma adecuada y sean cargados por usbserial. Normalmente es suficiente con /sbin/modprobe usbserial vendor=0x12d1 product=0×1003  o bien /sbin/modprobe usbserial vendor=0x12d1 product=0×1001 dependiendo de si el modem es 1001 (169,k3520,e270,etc…) o es 1003 (e220…). A veces también entran en conflicto con el driver de option resolviendose añadiendo al blacklist el modulo ”option”. Si aun asi sigue intentando cargar puede intentar resolverse eliminando el fichero option.ko y ejecutando un depmod despues.

Los puertos ttyUSBx que se crean al conectar el modem tienen que tener permiso de lectura y escritura para el usuario que ejecuta Asterisk, si no es así no será posible que Asterisk se comunique con el modem. Si no se ejecuta asterisk como root lo mejor es agregar el usuario que corre asterisk al grupo propietario de los puertos que en funcion de distros y kernels puede variar (en Fedora es uucp, por ej.). Algo como esto por ej.

chmod 660 /dev/ttyUSB*
chown asterisk:uucp /dev/ttyUSB*
echo ‘KERNEL==”ttyUSB[0-9*]“, MODE=”0660″, OWNER=”asterisk”, GROUP=”uucp”‘  >>  /etc/udev/rules.d/92-sebi.rules

Cumpliendo esto podremos instalar asterisk-addons sobre nuestro asterisk 1.4.x con chan_sebi incluido.

Si lo instalamos y arrancamos, si tenemos todo correcto, el canal analizará los dispositivos usb que tenemos conectados y generará un fichero /etc/asterisk/sebi_devices.conf que contendrá algo similar a esto:

[2-1]
data = /dev/ttyUSB2
voice = /dev/ttyUSB1
imei = 35413702XXXXXXX

 A partir de aqui sabemos que el modem está siendo detectado correctamente y pasaremos a generar el fichero de configuración /etc/asterisk/sebi.conf. Si hicimos un make samples al instalar asterisk-addons ya tendremos un fichero sebi.conf que tendremos que adaptar.

[huawei1]
imei=35XXXXXXXXXXX  ; imei of modem
;pin=1234   ; pin (use only if sim card has pin request enabled)
csca=+34607003110  ; SMS centre number (Vodafone ES – example)
sms=yes    ; Enable sms send/receive
voice=yes   ; Enable voice for calls
context=from-pstn  ; dialplan context for incoming calls
group=1    ; this phone is in channel group 1
volume=5   ; Modem Volume (1-5)
language=es   ; Channel language
;nocallsetup=yes  ; set this only if you want override call status notifications

El campo imei del canal es el que combina la información de configuración del modem con el equipo físico. No olviden que el numero de puerto ttyUSB depende del orden en que se cargan o de la cantidad de dispositivos usb que están conectados en cada momento. Los demas campos de configuracion creo que están claros, practicamente se describen solos. Es interesante hacer notar que el nombre del canal lo asignamos nosotros libremente en el identificador de seccion (en el ejemplo [huawei1])

Si reiniciamos asterisk y todo ha ido bien tras cargar ejecutaremos el comando sebi show devices y obtendremos algo parecido a esto:

CentOS-5*CLI> sebi show devices

ID                      IMEI                 Group           Provider        Connected State Voice SMS
huawei1         3541370xxxxxxxx   1    Vodafone ES               Yes       Free  Yes    Yes

CentOS-5*CLI>

A partir de aquí podemos usar el modem como una canal de voz realizando y recibiendo llamadas y como gateway sms. Cabe observar que en los modelos que no soporten voz el resultado será como este:

CentOS-5*CLI> sebi show devices

ID                      IMEI                 Group           Provider        Connected State Voice SMS
huawei1         3541370xxxxxxxx   1    Vodafone ES               Yes       Free  No    Yes

CentOS-5*CLI>

Nos dirá que no tenemos servicios de voz en ese dispositivo, y lo usaremos solo como gateway sms.

Para enviar y recibir sms, usaremos convenciones muy similares a las de chan_mobile. Para recibir un sms y guardarlo en la base de datos tendremos las instruccciones correspondientes en el dialplan (por cierto, solo procesa sms recibidos mientras está activo, por el momento)

[from-pstn]
exten => sms,1,Verbose(Incoming SMS from ${SMSSRC} ${SMSTXT})
exten => sms,n,Set(DB(SMS/${SMSSRC})=${SMSTXT})      
exten => sms,n,Hangup

 Para enviar un sms:

originate sip/109 application SebiSendSMS huawei1|647324xxx|”texto de prueba del sms”

Para revisar si el canal está libre antes de enviar el sms tenemos la aplicación correspondiente

SebiStatus(Device,Variable)
Device – Id del dispositivo en sebi.conf
Variable – Variable donde almacenamos el estado (1-3) 1-Desconectado, 2-Disponible, 3-Ocupado

Y en principio no tiene más complejidades. En un próximo post intentaré analizar un poco el código, para los que deseen modificar cosas puedan ir a “tiro hecho”.

61 comentarios hacia “chan_sebi (1) Que, como y por que”

  1. gamba47 escribió

    Gracias por el comentario sobre esto, venía en cero sobre este tema y la verdad que es muy interesante todo lo que estas diciendo.

    Ahora solo me falta conseguir un modem de estos para probar el funcinamiento. Lo conseguiré sin que me vendan el paquete de internet ?

    Saludos. Emiliano Vazquez

  2. Sasa Bobek escribió

    Are there any other models of GSM USB modems that are supported by chan_sebi? I noticed a Huawei E156G that also has voice capabilities, but is not mentioned in your article.

    Thanks in advance

    • odicha escribió

      I only tested K3520 & E169 ones. In theory, every Huawei modem which claims voice support migt work.

      The tests chan_sebi does on initialization stage.

      case MODEM_STATE_INIT_VOICE:
      snprintf(buf, sizeof(buf), “AT+CLVL=%d\r”, pvt->volume); // Adjust Volume
      data_write(pvt, buf);
      pvt->state++;
      break;
      case MODEM_STATE_INIT_VOICE1:
      if (strstr(buf, “OK”)){
      data_write(pvt, “AT^DDSETEX=2\r”); // Pre-Voice Command
      pvt->state++;
      }
      break;
      case MODEM_STATE_INIT_VOICE2:
      if (strstr(buf, “OK”)){
      data_write(pvt, “AT^CVOICE=?\r”); // Check Voice support
      pvt->state++;
      }else if (strstr(buf, “COMMAND NOT SUPPORT”)){
      pvt->has_voice = 0;
      pvt->state = MODEM_STATE_INIT_SMS;
      }
      break;
      case MODEM_STATE_INIT_VOICE3:
      if (strstr(buf, “^CVOICE:”)){
      pvt->has_voice = 1;
      pvt->state++;
      }else if (strstr(buf, “COMMAND NOT SUPPORT”)){
      pvt->has_voice = 0;
      pvt->state++;

      So if yo send these commands from minicom (or putty from windows) and you have the right responses from modem, it might support voice, but I can’t say you yes or not because it’s simply untested. Perhaps other brands modems have voice capabilities too, but it remains the same that 156G untested/unsupported.
      The better road to walk if you have one of these. Test it from windows if you can. If you can make voice calls on windows os, surely It might work with chan_sebi. Perhaps I might change something in chan_sebi, but we’ll have another model supported.
      Best Regards

      • Sasa Bobek escribió

        Hi Odichi,

        After a lot of digging, I found out that the 156G CAN have voice support, if requested as such by the operator. This in practice means that it doesn’t :( I also wanted to ask if chan_sebi has been tested with multiple dongles on one machine?

        Thanks for all the good work, it is appreciated :)

  3. Minicong escribió

    Mil gracias Odicha!
    Confirmo que nos ha tirado bien todo :)
    Jijiji, y comentar, que desde este momento, se haran miles de llamadas, para el protocolo Missed Calls Transport Layer (MCTL) del Minicong (equipo de Rally a Mongolia).
    Va de luxe todo! Lo hemos corrompido con alguna ñapa tipo system(“echo ‘ESTARINGING’ > /tmp/laststatus.log); XDDDD jiji, es lo que tiene a ultima hora todo!

    Animo y nos vemos ! (si volvemos)
    Ciao!

    • odicha escribió

      Les espero a la vuelta… Llevo tres años pensando en hacer el rally. Que envidia!! Suerte y atentos por el camino…

  4. vlad escribió

    Hi!
    Any chance to work your code with asterisk-addons 1.6? I try to compile, but give me error.


    A-SYSTEM-CONTROLEnc.o ooh323cDriver.o -> chan_ooh323.so
    [CC] chan_sebi.c -> chan_sebi.o
    chan_sebi.c:160: warning: initialization from incompatible pointer type
    chan_sebi.c:160: warning: initialization from incompatible pointer type
    chan_sebi.c: In function ‘modem_read’:
    chan_sebi.c:630: error: incompatible types in assignment
    chan_sebi.c:632: error: incompatible type for argument 2 of ‘read’
    chan_sebi.c: In function ‘modem_write’:
    chan_sebi.c:684: error: incompatible type for argument 2 of ‘memcpy’
    chan_sebi.c:693: error: invalid operands to binary + (have ‘union ’ and ‘int’)
    chan_sebi.c:1340:36: error: macro "ast_config_load" requires 2 arguments, but only 1 given
    chan_sebi.c: In function ‘modem_load_config’:
    chan_sebi.c:1340: error: ‘ast_config_load’ undeclared (first use in this function)
    chan_sebi.c:1340: error: (Each undeclared identifier is reported only once
    chan_sebi.c:1340: error: for each function it appears in.)
    chan_sebi.c:1420: error: ‘DSP_FEATURE_DTMF_DETECT’ undeclared (first use in this function)
    make[1]: *** [chan_sebi.o] Error 1
    make[1]: Leaving directory `/home/vladone/Desktop/asterisk/asterisk-addons-1.6.1.1/channels'
    make: *** [channels] Error 2

    • odicha escribió

      Hi. I’m making some changes to code. Take a look at http://asterisk-es-rsp.irontec.com/svn/team/Odicha/unstable/
      In a few days I’ll upload 1.6.x code

      • Aitor escribió

        me pasa exáctamente lo msimo

        chan_sebi.c:160: aviso: inicialización desde un tipo de puntero incompatible
        chan_sebi.c:160: aviso: inicialización desde un tipo de puntero incompatible
        chan_sebi.c: En la función âmodem_readâ:
        chan_sebi.c:630: error: tipos incompatibles en la asignación
        chan_sebi.c:632: error: tipo incompatible para el argumento 2 de âreadâ
        chan_sebi.c: En la función âmodem_writeâ:
        chan_sebi.c:684: error: tipo incompatible para el argumento 2 de âmemcpyâ
        chan_sebi.c:693: error: operandos inválidos para el binario + (se tiene âunion â y âintâ)
        chan_sebi.c:1340:36: error: la macro “ast_config_load” requiere 2 argumentos, pero solo se proporcionan 1
        chan_sebi.c: En la función âmodem_load_configâ:
        chan_sebi.c:1340: error: âast_config_loadâ no se declaró aquí (primer uso en esta función)
        chan_sebi.c:1340: error: (Cada identificador no declarado solamente se reporta una vez
        chan_sebi.c:1340: error: para cada funcion en la que aparece.)
        chan_sebi.c:1420: error: âDSP_FEATURE_DTMF_DETECTâ no se declaró aquí (primer uso en esta función)
        make[1]: *** [chan_sebi.o] Error 1
        make: *** [channels] Error 2

        Una solución por favor!!!

        No puedo descargar por svn tu archivo.

        Saludos
        Gracias

      • odicha escribió

        chan_sebi no compila en un asterisk 1.6….

  5. vlad escribió

    Mucias gracias!
    I will wait!

  6. vlad escribió

    The link, that give me before, not work. Have u upload code for 1.6.x?

  7. mapkiller escribió

    Hwei Odicha, no me funciona ningun link que has puesto.
    Puedes controlar?

    • odicha escribió

      El servidor svn donde estaba el codigo esta fuera de servicio. Voy a subirlo a otro sitio… desde que lo tenga les informo

      • Mapkiller escribió

        He probado hoy (24/08/2009) y el server svn esta funcionando nuevamente.

        Hago una prueba y publico los resultados. Gracias Odicha

  8. vandyk escribió

    Hi Odicha,

    The quality of call it’s better using chan_sebi instead chan_mobile? I’ve tested chan_mobile 2 years ago, but dropped the use because the quality of call was poor and have some delay.

    • odicha escribió

      It’s different at all. It’s like a RDSI-GSM FCT at quality level, becuase it doesn’t use bluetooth as chan_mobile and it passes audio digitally (any conversion done at driver level)

      • vandyk escribió

        Odicha thanks for your reply.

        I’m running Elastix 1.5.2, Asterisk version 1.4.26.1. I don’t know what version of Asterisk add-ons I have on my box.

        It’s safe to download the asterisk-addons and compile it on my box(will not mess with my asterisk-addons if mine is newer)?

        Could sound a dumb question but I’m not sure how to do it.

        I have an E169G so probably will work right?

        Thanks and best regards.

      • odicha escribió

        It’s possible. You might compile asterisk-addons with chan_sebi. It might work, but I have not tested it. (I know people have done it on Elastix and have their modems working fine)
        Perhaps you might uninstall addons rpm.
        You can make the question on Elastix forum better. There are some moderators that use chan_sebi in their systems
        Try this
        svn export http://asterisk-es-rsp.irontec.com/svn/asterisk-es-rsp/team/Odicha/unstable/asterisk-addons-1.4.9/ asterisk-addons
        ./configure
        make menuselect (enable chan_sebi. It’s disabled by default)
        make && make install
        you have a sebi.conf.sample file in /config folder.

      • vandyk escribió

        Hi Odicha,

        I followed your instructions but I believe that I missed something.

        elastixbox*CLI> sebi show devices
        ID IMEI Group Provider Connected State Voice SMS
        huawei1 35305XXXXXXXXXX 1 P OPTIMUS Yes Free No No

        My sebi_devices.conf

        [4-1]
        data = /dev/ttyUSB2
        imei = 35305XXXXXXXXXX
        voice = /dev/ttyUSB1

        My sebi.conf:

        [huawei1]
        dataport=/dev/ttyUSB2 ; data port of modem
        voiceport=/dev/ttyUSB1 ; voice port of modem (if it is voice capable)
        imei=35305XXXXXXXXX ; imei of modem
        ;pin=1234 ; pin (use only if sim card has pin request enabled)
        csca=+35193121314 ; SMS centre number (Optimus)
        sms_enabled=yes ; Enable sms send/receive
        context=from-pstn ; dialplan context for incoming calls
        class=voice ; voice for calls + sms / data for sms only
        group=1 ; this phone is in channel group 1
        volume=5 ; Modem Volume (1-5)
        ;nocallsetup=yes ; set this only if you want override call status notifications
        ; so pass calls inmediate to audio mode

        I’m not sure if could be related with the firmware that I have on my E169G.

        Probably if I apply the firmware that you’re using (Vodafone) will damage my modem, since the modem is from Optimus, am I right?

        Thanks for your help.

      • odicha escribió

        First of all, your imei starts on 35?
        It might be the same as sebi_device.conf. Asterisk write this file when you start it.
        So you must start asterisk and read sebi_device.conf content.

        If it has ERROR on IMEI field, try give write permissions on ttyUSB ports to user that runs asterisk.
        If you have this already done make cat /var/log/asterisk/full | grep sebi and paste results

        IMEI in sebi.conf has to be the same as in sebi_devices.conf after first run

      • vandyk escribió

        Hi,

        Thanks for you reply.

        Yes, my IMEI starts with 35.

        This is the result of cat

        [Aug 31 16:36:54] VERBOSE[4549] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Aug 31 16:36:54] VERBOSE[4549] logger.c: Found
        [Aug 31 16:36:54] ERROR[4549] chan_sebi.c: Unable to read config file sebi.conf. Not loading module.
        [Aug 31 16:53:36] VERBOSE[4754] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Aug 31 16:53:36] VERBOSE[4754] logger.c: Found
        [Aug 31 16:53:36] VERBOSE[4754] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Aug 31 16:53:36] VERBOSE[4754] logger.c: Found
        [Aug 31 16:53:36] VERBOSE[4754] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)
        [Aug 31 16:54:19] VERBOSE[4936] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Aug 31 16:54:19] VERBOSE[4936] logger.c: Found
        [Aug 31 16:54:19] VERBOSE[4936] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Aug 31 16:54:19] VERBOSE[4936] logger.c: Found
        [Aug 31 16:54:19] VERBOSE[4936] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)
        [Aug 31 16:57:19] VERBOSE[2553] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Aug 31 16:57:19] VERBOSE[2553] logger.c: Found
        [Aug 31 16:57:19] VERBOSE[2553] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Aug 31 16:57:19] VERBOSE[2553] logger.c: Found
        [Aug 31 16:57:19] VERBOSE[2553] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)

      • vandyk escribió

        [Aug 31 20:11:37] DEBUG[2732] chan_sebi.c: device usb 12d1/1001 bus usb 4-1.
        [Aug 31 20:11:37] DEBUG[2732] chan_sebi.c: device usb 12d1/1001 (data) port ttyUSB2.
        [Aug 31 20:11:37] DEBUG[2732] chan_sebi.c: device usb 12d1/1001 (imei) ERROR.
        [Aug 31 20:11:37] DEBUG[2732] chan_sebi.c: device usb 12d1/1001 (voice) port ttyUSB1.
        [Aug 31 20:11:37] VERBOSE[2732] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Aug 31 20:11:37] VERBOSE[2732] logger.c: Found
        [Aug 31 20:11:37] VERBOSE[2732] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Aug 31 20:11:37] VERBOSE[2732] logger.c: Found
        [Aug 31 20:11:37] DEBUG[2732] chan_sebi.c: Loading device 4-1.
        [Aug 31 20:11:37] VERBOSE[2732] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)
        [Aug 31 20:16:09] DEBUG[2735] chan_sebi.c: device usb 12d1/1001 bus usb 4-1.
        [Aug 31 20:16:09] DEBUG[2735] chan_sebi.c: device usb 12d1/1001 (data) port ttyUSB2.
        [Aug 31 20:16:09] DEBUG[2735] chan_sebi.c: device usb 12d1/1001 (imei) ERROR.
        [Aug 31 20:16:09] DEBUG[2735] chan_sebi.c: device usb 12d1/1001 (voice) port ttyUSB1.
        [Aug 31 20:16:09] VERBOSE[2735] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Aug 31 20:16:09] VERBOSE[2735] logger.c: Found
        [Aug 31 20:16:09] VERBOSE[2735] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Aug 31 20:16:09] VERBOSE[2735] logger.c: Found

      • vandyk escribió

        Hi again,

        I found 2 devices on sebi.conf. I corrected (remove one) and now I have this results:

        [Aug 31 21:18:15] DEBUG[2736] chan_sebi.c: device usb 12d1/1001 bus usb 4-1.
        [Aug 31 21:18:15] DEBUG[2736] chan_sebi.c: device usb 12d1/1001 (data) port ttyUSB2.
        [Aug 31 21:18:15] DEBUG[2736] chan_sebi.c: device usb 12d1/1001 (imei) 35305XXXXXXXXXX.
        [Aug 31 21:18:15] DEBUG[2736] chan_sebi.c: device usb 12d1/1001 (voice) port ttyUSB1.
        [Aug 31 21:18:15] VERBOSE[2736] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Aug 31 21:18:15] VERBOSE[2736] logger.c: Found
        [Aug 31 21:18:15] VERBOSE[2736] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Aug 31 21:18:15] VERBOSE[2736] logger.c: Found
        [Aug 31 21:18:15] DEBUG[2736] chan_sebi.c: Loading device 4-1.
        [Aug 31 21:18:15] DEBUG[2736] chan_sebi.c: Imei found for usb device 4-1 => channel huawei1.
        [Aug 31 21:18:15] DEBUG[2736] chan_sebi.c: Opening port /dev/ttyUSB2 from device huawei1. Result (10).
        [Aug 31 21:18:15] VERBOSE[2736] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)
        ]Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_write() (huawei1) [ATE0
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [OK]
        ]Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_write() (huawei1) [AT+CGSN
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [35305XXXXXXXXXX]
        ]Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_write() (huawei1) [AT+CPIN?
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [OK]
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [+CPIN: READY]
        ]Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_write() (huawei1) [AT^CARDLOCK?
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [OK]
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [^CARDLOCK: 2,10,0]
        ]Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_write() (huawei1) [AT+CLIP=1
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [OK]
        ]Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_write() (huawei1) [AT+CREG?
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [OK]
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [+CREG: 0,1]
        ]Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_write() (huawei1) [AT+COPS=3,0
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [OK]
        ]Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_write() (huawei1) [AT+COPS?
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [OK]
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [+COPS: 0,0,"P OPTIMUS",2]
        [Aug 31 21:18:15] DEBUG[2849] chan_sebi.c: data_read() (huawei1) [OK]

      • odicha escribió

        Let me see chan_sebi.conf … nothing else in log?

      • vandyk escribió

        Hi Odicha,

        Finally I have the driver working. I found what I did wrong. The sebi.conf file I copied from one link that I found (probably old syntax, where I had sms_enabled=yes and voice_enabled=yes)

        I copied the sample sebi.conf.sample and change to my values, now it’s working.

        Now, is there a way to set specific inbound route to chan_sebi? It’s reaching on Asterisk without DID

        Thanks again for your precious help.

        Best regards

      • vandyk escribió

        Odicha, sorry for a lot of posts but I’m trying to make it work. I have this huwaei modem borrowed for 2 days, if I can make it work, I’ll by one for me, so that’s my urgency on make it working.

        Actually my “sebi show devices”
        ID IMEI Group Provider Connected State Voice SMS
        huawei1 35305XXXXXXXXXX 1 P OPTIMUS Yes Free Yes Yes

        I’m able to receive calls if I dial to my GSM card number, and with a any DID/CID inbound route, I can pass it through an extension.

        I’m able to dial out through the GSM card either.

        Now I’m trying to send SMS.

        On asterisk console, I’m using the following command:
        originate sip/3001 application SebiSendSMS sebi/huawei1|93XXXXXXX|”SMS from Asterisk”

        But can’t receive SMSs. Am I doing something wrong?

        thanks again.

      • vandyk escribió

        Ok, I sent SMS now. I had to change my line originate sip/3001 application SebiSendSMS sebi/huawei1|93XXXXXXX|”SMS from Asterisk”

        to:

        originate sip/3001 application SebiSendSMS huawei1|93XXXXXXX|”SMS from Asterisk”

        But this works only if I have my 3001 extension registered, so to send the SMS I have to answer (pickup the call) originated.

        Is this the only way?

        Thanks again.

      • odicha escribió

        Hi! For send and receive sms, chan_sebi is the same as chan_mobile, so any chan_mobile howto will do the job.

        Voice is working fine??

      • vandyk escribió

        Hi Odicha,

        Thanks again for your reply. Yes, voice is working pretty fine.

        I was able to send the SMS, but only if I originate a call to an extension, pickup the call, then the SMS is sent.

      • odicha escribió

        Here you have some basic samples on send & receive sms

        http://snapvoip.blogspot.com/2007/10/configuring-using-and-debugging.html

      • vandyk escribió

        Thank you very much.

        I’ll take a look with details.

        Other thing I noticed, I’m not able to catch DTMF tones. Is there a limitation or I could be set something wrong?

        I configured to inbound the call from GSM and set to an IVR. Did not work.

        I changed to a DISA, did not work too.

      • odicha escribió

        Not dtmf tones. I have to look at it. (not time to look at neither…)
        Perhaps next week…

      • vandyk escribió

        Hi Odicha,

        I’m facing another issue (not sure if it’s really an issue). I try to dial to GSM card, the call is delivered to an extension.

        When I answer the call, if the call does not long too much time (let’s say I just asnwered and 2 seconds later, hang up the call) the sebi device remains with Busy state.

        The same is true, if I dial from Asterisk, and in my mobile phone I drop the call (or Ignore it), the sebi device still keeps the Busy state.

        There is a timeout for this?

        How can I “reset” the busy state to free?

        I noticed that I’m only able to do this if a stop the asterisk (not only amportal stop).

        Thanks and best regards

      • odicha escribió

        Hi
        It seems like an issue. full log grep sebi please…

      • vandyk escribió

        Hi, I discovered how to check the firmware version:

        I used minicom -s, and the ati command

        Manufacturer: huawei
        Model: E169G
        Revision: 11.314.11.00.00

  9. vlad escribió

    SVN server not work! Any news about code for astersisk 1.6?

  10. vandyk escribió

    [Aug 31 20:16:09] DEBUG[2735] chan_sebi.c: Loading device 4-1.
    [Aug 31 20:16:09] VERBOSE[2735] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)
    [Aug 31 20:19:35] DEBUG[2730] chan_sebi.c: device usb 12d1/1001 bus usb 4-1.
    [Aug 31 20:19:35] DEBUG[2730] chan_sebi.c: device usb 12d1/1001 (data) port ttyUSB2.
    [Aug 31 20:19:35] DEBUG[2730] chan_sebi.c: device usb 12d1/1001 (imei) 35305XXXXXXXXXX.
    [Aug 31 20:19:35] DEBUG[2730] chan_sebi.c: device usb 12d1/1001 (voice) port ttyUSB1.
    [Aug 31 20:19:35] VERBOSE[2730] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Aug 31 20:19:35] VERBOSE[2730] logger.c: Found
    [Aug 31 20:19:35] VERBOSE[2730] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Aug 31 20:19:35] VERBOSE[2730] logger.c: Found
    [Aug 31 20:19:35] DEBUG[2730] chan_sebi.c: Loading device 4-1.
    [Aug 31 20:19:35] DEBUG[2730] chan_sebi.c: Imei found for usb device 4-1 => channel huawei1.
    [Aug 31 20:19:35] DEBUG[2730] chan_sebi.c: Opening port /dev/ttyUSB2 from device huawei1. Result (10).
    [Aug 31 20:19:35] VERBOSE[2730] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)
    ]Aug 31 20:19:35] DEBUG[2848] chan_sebi.c: data_write() (huawei1) [ATE0
    [Aug 31 20:19:35] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [OK]
    ]Aug 31 20:19:35] DEBUG[2848] chan_sebi.c: data_write() (huawei1) [AT+CGSN
    [Aug 31 20:19:35] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [35305XXXXXXXXXX]
    ]Aug 31 20:19:35] DEBUG[2848] chan_sebi.c: data_write() (huawei1) [AT+CPIN?
    [Aug 31 20:19:35] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [OK]
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [+CPIN: READY]
    ]Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_write() (huawei1) [AT^CARDLOCK?
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [OK]
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [^CARDLOCK: 2,10,0]
    ]Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_write() (huawei1) [AT+CLIP=1
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [OK]
    ]Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_write() (huawei1) [AT+CREG?
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [OK]
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [+CREG: 0,1]
    ]Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_write() (huawei1) [AT+COPS=3,0
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [OK]
    ]Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_write() (huawei1) [AT+COPS?
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [OK]
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [+COPS: 0,0,"P OPTIMUS",2]
    [Aug 31 20:19:36] DEBUG[2848] chan_sebi.c: data_read() (huawei1) [OK]

  11. vandyk escribió

    Odicha,

    Another question, how can I check my actual firmware version?

    Gracias

  12. odicha escribió

    Yes. It is a known issue. I have to take a look at it. Some people from asterisk-es group reported to me the same. No tone detection at the moment.

  13. vandyk escribió

    Hi Odicha,

    When you say the log, do you mean cat /var/log/asterisk/full | grep sebi ?

    Actually I have the verbose set to 3. Do you believe that it’s Ok or should I improve the verbosity?

    • odicha escribió

      It’s ok
      level 3
      yes, cat /var/log/asterisk/full | grep sebi

      • vandyk escribió

        the steps I did:

        1) call from my mobile, ring on extension and ignore on x-lite
        2) call from extension to GSM. Answered the call, on mobile hang up the call. On X-lite it keeps the call.

        The log:

        [Sep 2 19:48:38] VERBOSE[2729] logger.c: == Setting global variable ‘OUT_19′ to ‘AMP:sebi/huawei1/$OUTNUM$’
        [Sep 2 19:48:38] VERBOSE[2729] logger.c: == Setting global variable ‘OUT_20′ to ‘AMP:sebi/huawei2/$OUTNUM$’
        [Sep 2 20:19:02] VERBOSE[3313] logger.c: == Setting global variable ‘OUT_19′ to ‘AMP:sebi/huawei1/$OUTNUM$’
        [Sep 2 20:19:02] VERBOSE[3313] logger.c: == Setting global variable ‘OUT_20′ to ‘AMP:sebi/huawei2/$OUTNUM$’
        [Sep 2 20:19:36] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [RING]
        [Sep 2 20:19:36] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [+CLIP: "93XXXXXXX",131,,,,0]
        [Sep 2 20:19:41] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:19:42] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [RING]
        [Sep 2 20:19:42] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [+CLIP: "93XXXXXXX",131,,,,0]
        [Sep 2 20:19:48] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [RING]
        [Sep 2 20:19:48] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [+CLIP: "93XXXXXXX",131,,,,0]
        [Sep 2 20:19:48] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [^CEND:1,0,104,16]
        [Sep 2 20:19:48] DEBUG[3318] chan_sebi.c: Hanging up device huawei1.
        ]Sep 2 20:19:48] DEBUG[3318] chan_sebi.c: data_write() (huawei1) [AT+CHUP
        [Sep 2 20:19:48] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:19:48] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [OK]
        [Sep 2 20:19:48] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:20:42] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [RING]
        [Sep 2 20:20:42] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [+CLIP: "93XXXXXXX",131,,,,0]
        ]Sep 2 20:20:46] DEBUG[3329] chan_sebi.c: data_write() (huawei1) [AT^DDSETEX=2
        ]Sep 2 20:20:46] DEBUG[3329] chan_sebi.c: data_write() (huawei1) [ATA
        [Sep 2 20:20:46] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [OK]
        [Sep 2 20:20:46] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:20:46] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [OK]
        [Sep 2 20:20:47] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [^CONN:1,0]
        [Sep 2 20:20:49] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [^CEND:1,3,104,16]
        [Sep 2 20:22:21] DEBUG[3329] chan_sebi.c: Hanging up device huawei1.
        ]Sep 2 20:22:21] DEBUG[3329] chan_sebi.c: data_write() (huawei1) [AT+CHUP
        [Sep 2 20:22:21] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:22:21] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:22:21] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [OK]
        [Sep 2 20:23:01] VERBOSE[3335] logger.c: — Executing [s@macro-dialout-trunk:21] Set(“SIP/3001-08d568b0″, “pre_num=AMP:sebi/huawei1/”) in new stack
        [Sep 2 20:23:01] VERBOSE[3335] logger.c: — Executing [s@macro-dialout-trunk:26] Dial(“SIP/3001-08d568b0″, “sebi/huawei1/93XXXXXXX|300|Tt”) in new stack
        [Sep 2 20:23:01] DEBUG[3335] chan_sebi.c: Calling huawei1/93XXXXXXX on Sebi/huawei1-d6d9
        ]Sep 2 20:23:01] DEBUG[3335] chan_sebi.c: data_write() (huawei1) [AT^DDSETEX=2
        [Sep 2 20:23:01] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [OK]
        ]Sep 2 20:23:02] DEBUG[2847] chan_sebi.c: data_write() (huawei1) [ATD93XXXXXXX;
        [Sep 2 20:23:02] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [OK]
        [Sep 2 20:23:02] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:23:02] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [^ORIG:1,0]
        [Sep 2 20:23:03] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [^CONF:1]
        [Sep 2 20:23:15] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [^CEND:1,0,104,17]
        [Sep 2 20:23:15] DEBUG[3335] chan_sebi.c: Hanging up device huawei1.
        ]Sep 2 20:23:15] DEBUG[3335] chan_sebi.c: data_write() (huawei1) [AT+CHUP
        [Sep 2 20:23:15] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:23:15] DEBUG[2847] chan_sebi.c: data_read() (huawei1) [OK]
        [Sep 2 20:23:15] DEBUG[2770] chan_sebi.c: Checking device state for device huawei1
        [Sep 2 20:23:15] VERBOSE[3335] logger.c: — Executing [s@macro-dialout-trunk:21] Set(“SIP/3001-08d568b0″, “pre_num=AMP:sebi/huawei2/”) in new stack
        [Sep 2 20:23:15] VERBOSE[3335] logger.c: — Executing [s@macro-dialout-trunk:26] Dial(“SIP/3001-08d568b0″, “sebi/huawei2/93XXXXXXX|300|Tt”) in new stack
        [Sep 2 20:23:15] WARNING[3335] chan_sebi.c: Request to call on device huawei2 which is not connected / already in use.
        [Sep 2 20:23:15] WARNING[3335] app_dial.c: Unable to create channel of type ‘sebi’ (cause 44 – Requested channel not available)

  14. gmpp escribió

    Hi Odicha,

    Thanks for such a great project that you developed.
    I follow your instruction on your website.
    And I setup the chan_sebi on my system successfully(using the Elastix 1.5.2)

    Now I can dial and recive phone call on asterisk using Huawei E169.
    It works very well and the sound quality is very impressive.

    But I found a little problem(I am not sure whether other people experienced)
    which is when I dialed the phone from asterisk(using chan_sebi) to remote mobile phone.

    Sound from asterisk to mobile is amost no delay, but sound from remote mobile to asterisk is not only amost 1~2 second delay but also smaller volume.

    I will very appreciate if you can give me some suggestion to solve the problem.

    Thanks for your cooperation in advance and best regards,

    Gmpp

  15. Taity escribió

    No me puedo bajar el codigo del svn, donde lo puedo conseguir para probar este channel.
    Graias

  16. Álvaro escribió

    Hola,

    De donde me puedo bajar la version para 1.6?, he estado buscando en el svn y ya no está.

    gracias

  17. Freddy escribió

    Hello odicha i habe 2 K3520 sticks and i test it with a trixbox system 2.6.18-164.el5 and asterisk 1.4 and this source here http://asterisk-es-rsp.irontec.com/svn/team/Odicha/asterisk-addons-1.4.7/.
    I can call but i have no voice. Can you help me?

    [huawei2]
    imei=3534XXXXXXXX2 ; imei of modem
    ;pin=1234 ; pin (use only if sim card has pin request enabled)
    csca=+491770610000 ; SMS centre number (Vodafone ES – example)
    sms=yes ; Enable sms send/receive
    voice=yes ; Enable voice for calls
    context=from-pstn ; dialplan context for incoming calls
    group=2 ; this phone is in channel group 1
    volume=5 ; Modem Volume (1-5)
    language=de ; Channel language
    ;nocallsetup=yes ; set this only if you want override call status notifications

    [3-1]
    data = /dev/ttyUSB2
    imei = 353436033529149
    voice = /dev/ttyUSB1

    sebi show devices
    ID IMEI Group Provider Connected State Voice SMS
    huawei2 3534XXXXXXXX2 2 BASE DE Yes Free Yes Yes

    [Oct 9 10:06:34] VERBOSE[2868] logger.c: == Setting global variable ‘OUT_1′ to ‘AMP:sebi/huawei2/$OUTNUM$’
    [Oct 9 10:06:35] DEBUG[2868] chan_sebi.c: device usb 12d1/1001 bus usb 3-2.
    [Oct 9 10:06:35] DEBUG[2868] chan_sebi.c: device usb 12d1/1001 (data) port ttyUSB2.
    [Oct 9 10:06:35] DEBUG[2868] chan_sebi.c: device usb 12d1/1001 (imei) 3534XXXXXXXX1.
    [Oct 9 10:06:35] DEBUG[2868] chan_sebi.c: device usb 12d1/1001 (voice) port ttyUSB1.
    [Oct 9 10:06:35] VERBOSE[2868] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Oct 9 10:06:35] VERBOSE[2868] logger.c: Found
    [Oct 9 10:06:35] VERBOSE[2868] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Oct 9 10:06:35] VERBOSE[2868] logger.c: Found
    [Oct 9 10:06:35] DEBUG[2868] chan_sebi.c: Loading device 3-2.
    [Oct 9 10:06:35] VERBOSE[2868] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)
    [Oct 9 10:12:36] VERBOSE[2864] logger.c: == Setting global variable ‘OUT_1′ to ‘AMP:sebi/huawei2/$OUTNUM$’
    [Oct 9 10:12:37] DEBUG[2864] chan_sebi.c: device usb 12d1/1001 bus usb 3-1.
    [Oct 9 10:12:37] DEBUG[2864] chan_sebi.c: device usb 12d1/1001 (data) port ttyUSB2.
    [Oct 9 10:12:37] DEBUG[2864] chan_sebi.c: device usb 12d1/1001 (imei) 3534XXXXXXXX2.
    [Oct 9 10:12:37] DEBUG[2864] chan_sebi.c: device usb 12d1/1001 (voice) port ttyUSB1.
    [Oct 9 10:12:37] VERBOSE[2864] logger.c: == Parsing ‘/etc/asterisk/sebi_devices.conf’: [Oct 9 10:12:37] VERBOSE[2864] logger.c: Found
    [Oct 9 10:12:37] VERBOSE[2864] logger.c: == Parsing ‘/etc/asterisk/sebi.conf’: [Oct 9 10:12:37] VERBOSE[2864] logger.c: Found
    [Oct 9 10:12:37] DEBUG[2864] chan_sebi.c: Loading device 3-1.
    [Oct 9 10:12:37] DEBUG[2864] chan_sebi.c: Imei found for usb device 3-1 => channel huawei2.
    [Oct 9 10:12:37] DEBUG[2864] chan_sebi.c: Opening port /dev/ttyUSB2 from device huawei2. Result (15).
    [Oct 9 10:12:37] DEBUG[2864] chan_sebi.c: Opening port /dev/ttyUSB1 from device huawei2. Result (17).
    [Oct 9 10:12:37] VERBOSE[2864] logger.c: chan_sebi.so => (Sebi Modem Device Channel Driver)
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [ATE0
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+CGSN
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [3534XXXXXXXX2]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+CPIN?
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [+CPIN: READY]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT^CARDLOCK?
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [^CARDLOCK: 2,10,0]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+CLIP=1
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+CREG?
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [+CREG: 0,1]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+COPS=3,0
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+COPS?
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [+COPS: 0,0,"BASE DE",2]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+CLVL=5
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT^DDSETEX=2
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT^CVOICE=?
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [^CVOICE:(0)]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+CMGF=1;+CPMS="ME","ME","ME";+CNMI=1,1,0,1,0
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [+CPMS: 0,23,0,23,0,23]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [AT+CSCA="+491770610000",145
    ]
    [Oct 9 10:12:37] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:15:06] VERBOSE[3453] logger.c: == Setting global variable ‘OUT_1′ to ‘AMP:sebi/huawei2/$OUTNUM$’
    [Oct 9 10:15:24] VERBOSE[3476] logger.c: — Executing [s@macro-dialout-trunk:22] Set(“SIP/30-08506828″, “pre_num=AMP:sebi/huawei2/”) in new stack
    [Oct 9 10:15:24] VERBOSE[3476] logger.c: — Executing [s@macro-dialout-trunk:27] Dial(“SIP/30-08506828″, “sebi/huawei2/0176XXXXXXX|300|”) in new stack
    [Oct 9 10:15:24] DEBUG[3476] chan_sebi.c: Calling huawei2/0176XXXXXXX on Sebi/huawei2-b8b6
    [Oct 9 10:15:24] DEBUG[3476] chan_sebi.c: data_write() (huawei2) [AT^DDSETEX=2
    ]
    [Oct 9 10:15:24] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:15:25] DEBUG[2891] chan_sebi.c: data_write() (huawei2) [ATD0176XXXXXX;
    ]
    [Oct 9 10:15:26] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]
    [Oct 9 10:15:26] DEBUG[2870] chan_sebi.c: Checking device state for device huawei2-b8b6
    [Oct 9 10:15:26] DEBUG[2870] chan_sebi.c: Checking device state for device huawei2
    [Oct 9 10:15:26] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [^ORIG:1,0]
    [Oct 9 10:15:27] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [^CONF:1]
    [Oct 9 10:15:36] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [^CONN:1,0]
    [Oct 9 10:15:36] DEBUG[2870] chan_sebi.c: Checking device state for device huawei2-b8b6
    [Oct 9 10:15:36] DEBUG[2870] chan_sebi.c: Checking device state for device huawei2
    [Oct 9 10:16:15] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [^CEND:1,39,104,16]
    [Oct 9 10:16:22] DEBUG[3476] chan_sebi.c: Hanging up device huawei2.
    [Oct 9 10:16:22] DEBUG[3476] chan_sebi.c: data_write() (huawei2) [AT+CHUP
    ]
    [Oct 9 10:16:22] DEBUG[2870] chan_sebi.c: Checking device state for device huawei2-b8b6
    [Oct 9 10:16:22] DEBUG[2870] chan_sebi.c: Checking device state for device huawei2
    [Oct 9 10:16:22] DEBUG[2870] chan_sebi.c: Checking device state for device huawei2-b8b6
    [Oct 9 10:16:22] DEBUG[2870] chan_sebi.c: Checking device state for device huawei2
    [Oct 9 10:16:22] DEBUG[2891] chan_sebi.c: data_read() (huawei2) [OK]

  18. Thomas Kenyon escribió

    Martin Stubbs wrote a patch to allow chan_sebi to work with 1.6, I don’t have the patch to hand, but I do have the source patched, is Odicha doesn’t mind me making it available. (sorry if the below is illegible, I don’t know what the spanish word for patch is, and otherwise my spanish is not good).

    Martin Stubbs escribió un patch para permitir chan_sebi para trabajar con 1.6, no tengo el patch en la mano, pero tengo la fuente de parches, es Odicha no me hagas hacerlo disponible.

  19. Thomas Kenyon escribió

    originate local/1027@internal application SebiSendSMS huawei1,,”This is a Test”

    Seems to work fine, (I chose local/exten@internal, because an extension that doesn’t call a handset, in this case it’s just Echo).

    (note the commas, |’s were supposed to have stopped being used as delimeters after asterisk 1.2).

    This works, as do the above examples (and handy since you can do it from command line, oddly, both methods produce the error:

    ERROR[11755]: chan_sebi.c:334 modem_sendsms_exec: args huawei1.

    While still sending the SMS.

  20. Freddy escribió

    Hi all, i have no sound but connection.
    http://odicha.wordpress.com/2009/06/30/chan_sebi-1-que-como-y-por-que/#comment-123
    can you help me?

  21. marco escribió

    hola estoy intentando con el e156g pero no va… aparentemente si lo detecta pero en sms me sale no y en voz tambien sale no, le di permisos a los ttyUSB incluso libere el modem pero el state siempre sale en Init y no me genera el fichero sebi_devices.conf que podrá ser…

    Aqui dejo el CLI

    ID IMEI Group Provider Connected State Voice SMS
    huawei 3541370xxxxxxxx 1 Yes Init No No

    estos son mis logs:

    [Oct 17 06:55:47] ERROR[31567] chan_sebi.c: Unable to read config file sebi.conf. Not loading module.
    [Oct 17 07:04:10] ERROR[2496] chan_sebi.c: Unable to open data port /dev/ttyUSB2. Not loading device huawei1.
    [Oct 17 07:04:23] ERROR[2718] chan_sebi.c: Unable to open data port /dev/ttyUSB2. Not loading device huawei1.
    [Oct 17 07:23:19] ERROR[2602] chan_sebi.c: Unable to open data port /dev/ttyUSB2. Not loading device huawei1.
    [Oct 17 07:23:50] ERROR[2841] chan_sebi.c: Unable to open data port /dev/ttyUSB2. Not loading device huawei1.
    [Oct 17 07:27:29] ERROR[2926] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 07:37:30] ERROR[3237] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 09:33:35] ERROR[3865] chan_sebi.c: Unable to open data port /dev/ttyUSB2. Not loading device huawei1.
    [Oct 17 09:38:34] ERROR[3865] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 09:40:17] ERROR[3865] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 15:20:14] ERROR[27723] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 15:21:41] ERROR[27810] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 15:22:02] ERROR[27874] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 15:27:53] ERROR[2715] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 15:29:31] ERROR[2942] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 15:31:08] ERROR[3048] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 15:44:01] ERROR[2715] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 15:50:27] ERROR[2970] chan_sebi.c: Unable to open data port /dev/ttyUSB5. Not loading device huawei2.
    [Oct 17 16:09:04] ERROR[2719] chan_sebi.c: Unable to open voice port /dev/ttyUSB1. Not loading device huawei1.

  22. Christian escribió

    Buenas, he estado leyendo del uso de los modem Huawei como troncales GSM, mi duda es si funcionan con el modelo E176, ya que es el único que he podido encontrar y no quiero comprarlo hasta conocer si es compatible.
    Agradecería mucho tu ayuda
    Saludos.
    Christian

  23. Phylevn escribió

    Wow.. acabo de leer sobre chan_sebi y vaya que es interesante como alternativa a los costosos telulares.. alguien sabe dónde se pueden adquirir estos modems ?

Deja un comentario

Fill in your details below or click an icon to log in:

Logo de WordPress.com

You are commenting using your WordPress.com account. Log Out / Cambiar )

Twitter picture

You are commenting using your Twitter account. Log Out / Cambiar )

Facebook photo

You are commenting using your Facebook account. Log Out / Cambiar )

Connecting to %s

 
Seguir

Get every new post delivered to your Inbox.