qboss / unimrcp

Automatically exported from code.google.com/p/unimrcp
Apache License 2.0
0 stars 0 forks source link

unimrcpserver #141

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hello all 

there is a small problem when hangup call the unimrcpserver give an error 

*** glibc detected *** /usr/sbin/asterisk: double free or 
corruption (out): 0x000000001fddd2a0 *** 
======= Backtrace: ========= 
/lib64/libc.so.6[0x307907230f] 
/lib64/libc.so.6(cfree+0x4b)[0x307907276b] 
/lib64/libpthread.so.0[0x3079805ad9] 
/lib64/libpthread.so.0[0x307980674b] 
/lib64/libc.so.6(clone+0x6d)[0x30790d3f6d] 
======= Memory map: ======== 
....

and this is my configuration 

thanks for your help :)

unimrcpserver.xml
 <?xml version="1.0" encoding="UTF-8"?>
<!-- UniMRCP server document -->
<unimrcpserver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="unimrcpserver.xsd" version="1.0">
  <properties>
    <!-- By default, network interface (IP address) to bind to will be implicitly identified. 
         Alternatively, it can be explicitly set.
    -->
    <ip>118.139.163.102</ip>
    <!-- <ext-ip>a.b.c.d</ext-ip> -->
  </properties>

  <components>
    <!-- Factory of MRCP resources -->
    <resource-factory>
      <resource id="speechsynth" enable="false"/>
      <resource id="speechrecog" enable="true"/>
      <resource id="recorder" enable="false"/>
    </resource-factory>

    <!-- SofiaSIP MRCPv2 signaling agent -->
    <sip-uas id="SIP-Agent-1" type="SofiaSIP">
      <!-- By default, "ip" and "ext-ip" addresses set in the properties will be used. 
           They still can be explicitly specified (overriden) here.
      -->
      <!-- <sip-ip>10.10.0.1</sip-ip> -->
      <!-- <sip-ext-ip>a.b.c.d</sip-ext-ip> -->
      <sip-port>8070</sip-port>
      <sip-transport>udp,tcp</sip-transport>
      <!-- <force-destination>true</force-destination> -->
      <ua-name>UniMRCP SofiaSIP</ua-name>
      <sdp-origin>UniMRCPServer</sdp-origin>
      <!-- <sip-t1>500</sip-t1> -->
      <!-- <sip-t2>4000</sip-t2> -->
      <!-- <sip-t4>4000</sip-t4> -->
      <!-- <sip-t1x64>32000</sip-t1x64> -->
    </sip-uas>

    <!-- MRCPv2 connection agent -->
    <mrcpv2-uas id="MRCPv2-Agent-1">
      <!-- By default, "ip" set in the properties will be used. 
           It still can be explicitly specified (overriden) here.
      -->
      <!-- <mrcp-ip>10.10.0.1</mrcp-ip> -->
      <mrcp-port>1544</mrcp-port>
      <max-connection-count>100</max-connection-count>
      <force-new-connection>true</force-new-connection>
      <rx-buffer-size>2048</rx-buffer-size>
      <tx-buffer-size>2048</tx-buffer-size>
    </mrcpv2-uas>

    <!-- Media processing engine -->
    <media-engine id="Media-Engine-1">
      <realtime-rate>1</realtime-rate>
    </media-engine>

    <!-- Factory of RTP terminations -->
    <rtp-factory id="RTP-Factory-1">
      <!-- By default, "ip" and "ext-ip" addresses set in the properties will be used. 
           They still can be explicitly specified (overriden) here.
      -->
      <!-- <rtp-ip>10.10.0.1</rtp-ip> -->
      <!-- <rtp-ext-ip>a.b.c.d</rtp-ext-ip> -->
      <rtp-port-min>5000</rtp-port-min>
      <rtp-port-max>6000</rtp-port-max>
    </rtp-factory>

    <!-- Factory of plugins (MRCP engines) -->

    <plugin-factory>
      <engine id="Cepstral-Swift-1" name="mrcpcepstral" enable="false"/>
      <engine id="PocketSphinx-1" name="mrcppocketsphinx" enable="true"/>
      <engine id="Flite-1" name="mrcpflite" enable="false"/>
      <engine id="Demo-Synth-1" name="demosynth" enable="false"/>
      <engine id="Demo-Recog-1" name="demorecog" enable="true"/>
      <engine id="Recorder-1" name="mrcprecorder" enable="true"/>

      <!-- Engines may have additional named and generic params
      <engine id="Your-Engine-1" name="yourengine" enable="true">
        <max-channel-count>100</max-channel-count>
        <param name="..." value="..."/>
      </engine>
      -->
    </plugin-factory>
  </components>

  <settings>
    <!-- RTP/RTCP settings -->
    <rtp-settings id="RTP-Settings-1">
      <jitter-buffer>
        <playout-delay>50</playout-delay>
        <max-playout-delay>200</max-playout-delay>
      </jitter-buffer>
      <ptime>20</ptime>
   <!--   <codecs own-preference="false">PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>-->
      <codecs own-preference="true">GSM PCMU PCMA L16/96/64000 PCMU/97/64000 PCMA/98/16000 L16/99/64000 </codecs> 
      <!-- enable/disable RTCP support -->
      <rtcp enable="true">
        <!-- RTCP BYE policies (RTCP must be enabled first)
              0 - disable RTCP BYE
              1 - send RTCP BYE at the end of session
              2 - send RTCP BYE also at the end of each talkspurt (input)
        -->
        <rtcp-bye>2</rtcp-bye>
        <!-- rtcp transmission interval in msec (set 0 to disable) -->
        <tx-interval>5000</tx-interval>
        <!-- period (timeout) to check for new rtcp messages in msec (set 0 to disable) -->
        <rx-resolution>1000</rx-resolution>
      </rtcp>
    </rtp-settings>
  </settings>

  <profiles>
    <!-- MRCPv2 default profile -->
    <mrcpv2-profile id="uni2">
      <sip-uas>SIP-Agent-1</sip-uas>
      <mrcpv2-uas>MRCPv2-Agent-1</mrcpv2-uas>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-1</rtp-factory>
      <rtp-settings>RTP-Settings-1</rtp-settings>

      <!-- It's possible to define profile based map of resources and engines.-->
      <resource-engine-map>
       <!-- <param name="speechsynth" value="Flite-1"/>-->
        <param name="speechrecog" value="PocketSphinx-1"/>
      </resource-engine-map>

    </mrcpv2-profile>

    <!-- more profiles might be added here -->
  </profiles>
</unimrcpserver>

mrcp.conf

[general]
default-asr-profile = speech-nuance5-mrcp2
default-tts-profile = speech-nuance5-mrcp2
; UniMRCP logging level to appear in Asterisk logs.  Options are:
; EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG -->
log-level = DEBUG
max-connection-count = 100
offer-new-connection = 1
; rx-buffer-size = 1024
; tx-buffer-size = 1024
; request-timeout = 60

[speech-nuance5-mrcp1]
; +++ MRCP settings +++
version = 1
;
; +++ RTSP +++
; === RSTP settings ===
server-ip = 118.139.163.102
server-port = 8070
; force-destination = 1
resource-location = media
speechsynth = speechsynthesizer
speechrecog = speechrecognizer
;
; +++ RTP +++
; === RTP factory ===
; rtp-ip = 0.0.0.0
rtp-ip = 118.139.163.102
; rtp-ext-ip = auto
rtp-port-min = 4000
rtp-port-max = 5000
; === RTP settings ===
; --- Jitter buffer settings ---
playout-delay = 50
; min-playout-delay = 20
max-playout-delay = 200
; --- RTP settings ---
ptime = 20
codecs = PCMU PCMA L16/96/8000
; --- RTCP settings ---
rtcp = 1
rtcp-bye = 2
rtcp-tx-interval = 5000
rtcp-rx-resolution = 1000

[speech-nuance5-mrcp2]
; +++ MRCP settings +++
version = 2
;
; +++ SIP +++
; === SIP settings ===
server-ip = 118.139.163.102
server-port = 8070
; server-username = test
force-destination = 1
; === SIP agent ===
; client-ip = 0.0.0.0
client-ip = 118.139.163.102
; client-ext-ip = auto
client-port = 5093
sip-transport = udp
; ua-name = Asterisk
; sdp-origin = Asterisk
;
; +++ RTP +++
; === RTP factory ===
; rtp-ip = 0.0.0.0
rtp-ip = 118.139.163.102
; rtp-ext-ip = auto
rtp-port-min = 4000
rtp-port-max = 5000
; === RTP settings ===
; --- Jitter buffer settings ---
playout-delay = 50
; min-playout-delay = 20
max-playout-delay = 200
; --- RTP settings ---
ptime = 20
codecs = PCMU PCMA L16/96/8000
; --- RTCP settings ---
rtcp = 1
rtcp-bye = 2
rtcp-tx-interval = 5000
rtcp-rx-resolution = 1000

pocketsphinx.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- PocketSphinx Document -->
<pocketsphinx>
  <!-- Senstitivity level and timeout are used for voice activity (speech) detection 
       reasonable values: level is in [2..250] range, timeout is in [100..500] msec range
  -->
  <sensitivity level="1" activity-timeout="300" inactivity-timeout="304"/>

  <!-- Default values for noinput and recognition timeout,
       these values can be overriden by client's requests
  -->
  <timers noinput-timeout="10000" recognition-timeout="15"/>

  <!-- PocketSphinx related model and dictionary data.
       Default dir (dir="") is InstallDir/data
  -->
 <model dir="/home/hiyassat/tutorial/pocketsphinx/model/hmm/ar_hafiz/an4.cd_semi_1000/" narrowband="/home/hiyassat/tutorial/pocketsphinx/model/hmm/ar_hafiz/an4.cd_semi_1000/" wideband="wsj1" dictionary="/home/hiyassat/tutorial/pocketsphinx/model/lm/ar_hafiz/an4.dic" preferred="narrowband"/>
  <!--  <model dir="/usr/local/freeswitch/grammar" narrowband="model/communicator" wideband="model/wsj1" dictionary="default.dic"/> -->

  <!-- Enable to save utterance.
       Default dir (dir="") is InstallDir/data
  -->
  <save-waveform dir="/home/hiyassat/online_project/record" enable="1"/>
</pocketsphinx>

Original issue reported on code.google.com by muneer.a...@gmail.com on 5 Jun 2012 at 10:15

GoogleCodeExporter commented 9 years ago

*** glibc detected *** /usr/sbin/asterisk: double free or 
corruption (out): 0x000000001fddd2a0 *** 

is this bug in asterisk or unimrcp ?? 

Original comment by muneer.a...@gmail.com on 5 Jun 2012 at 10:16

GoogleCodeExporter commented 9 years ago
any help ?

Original comment by muneer.a...@gmail.com on 17 Jun 2012 at 8:53

GoogleCodeExporter commented 9 years ago
Try updating app_unimrcp.c to the latest revision.
If you see this bug again, send the backtrace.

Please, see https://groups.google.com/d/topic/unimrcp/erE2eJjkpaM/discussion .

Original comment by rodolfor...@gmail.com on 22 Aug 2012 at 2:59

GoogleCodeExporter commented 9 years ago
This problem should have been fixed in trunk, and has nothing to do with the 
UniMRCP server itself. The problem was in the UniMRCP module for Asterisk: 
app_unimrcp.so.

Original comment by achalo...@gmail.com on 6 Mar 2013 at 8:14