Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000337 [Yate - Yet Another Telephony Engine] module minor always 2013-04-18 14:11 2013-04-19 13:25
Reporter asymetrixs View Status public  
Assigned To paulc
Priority normal Resolution open  
Status acknowledged   Product Version 4.x
Summary 0000337: JS: Calling Channel.callTo("...") does not work from handler
Description Using (DTMF) handler to connect a call does not work (Channel.callTo).
Additional Information JAVASCRIPT:

function onDTMF(message)
{
        Engine.debug("VALUE: " + message.text + " on chan " + message.id);

        if (message.text == '#')
        {
                Engine.debug("HIT #");
                Engine.debug("play voice file");
                Channel.callTo("dbwave/play//tmp/voice.wav");
        }
}

Message.install(onDTMF, "chan.dtmf", 40);


if(message.direction == 'incoming')
{
        Channel.callTo("dbwave/play//tmp/voice.wav");

        Engine.debug("IN JAVASCRIPT ROUTING SCRIPT");
        message.timeout="15000";
        Engine.debug("message.timeout=15000 SET");
        Engine.debug("CALLING dumb/");
        Channel.callTo("dumb/");
        Engine.debug("AFTER dumb/");
}


===========================================================================

OUTPUT:

<sip:INFO> 'udp:0.0.0.0:5060' received 922 bytes SIP message from 172.16.1.29:56802 [0xb8d130]
------
INVITE sip:492XXXXXXXXX@172.16.1.23;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.16.1.29:56802;branch=z9hG4bK-d8754z-01c054f659ed45f6-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4915XXXXXXXXX@172.16.1.29:56802;transport=UDP>
To: <sip:492XXXXXXXXX@172.16.1.23;transport=UDP>
From: <sip:4915XXXXXXXXX@172.16.1.23;transport=UDP>;tag=b54a9b4e
Call-ID: YjU1MzU1MWMwN2I3MjZiOGY3NTllODBiNzYxZTUzOGE.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, X-cisco-serviceuri
User-Agent: Zoiper r16950
Allow-Events: presence, kpml
Content-Length: 238

v=0
o=Z 0 0 IN IP4 172.16.1.29
s=Z
c=IN IP4 172.16.1.29
t=0 0
m=audio 39760 RTP/AVP 3 110 98 8 0 101
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
------
<sip:INFO> 'udp:0.0.0.0:5060' sending code 100 0x7fd098001a00 to 172.16.1.29:56802 [0xb8d130]
------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.16.1.29:56802;branch=z9hG4bK-d8754z-01c054f659ed45f6-1---d8754z-;rport=56802;received=172.16.1.29
From: <sip:4915XXXXXXXXX@172.16.1.23;transport=UDP>;tag=b54a9b4e
To: <sip:492XXXXXXXXX@172.16.1.23;transport=UDP>
Call-ID: YjU1MzU1MWMwN2I3MjZiOGY3NTllODBiNzYxZTUzOGE.
CSeq: 1 INVITE
Server: YATE/4.3.1
Content-Length: 0

------
<sip/2:ALL> YateSIPConnection::YateSIPConnection(0x7fd0980053c0,0x7fd09002b500) [0x7fd0980093f0]
<sip/2:ALL> NAT address is '(null)' [0x7fd0980093f0]
<INFO> Could not classify call from '4915XXXXXXXXX', wasted 0 usec
<sip/2:ALL> NAT address is '(null)' [0x7fd0980093f0]
<wave:INFO> Play from wave file '/tmp/voice.wav'
<wave/2:ALL> WaveChan::WaveChan(play) [0x7fd0a000eed0]
<wave:ALL> WaveSource::WaveSource("/tmp/voice.wav",0x7fd0a000eed0) [0x7fd0a000f0c0]
<MILD> .wav not supported yet, assuming raw signed linear
<sip/2:NOTE> Answering now call sip/2 because we have no targetid [0x7fd0980093f0]
<yrtp:ALL> RTP/AVP message received
<yrtp:INFO> Guessed local IP '172.16.1.23' for remote '172.16.1.29'
<yrtp:ALL> YRTPWrapper::YRTPWrapper('172.16.1.23',0x7fd0980093f0,'audio',bidir,0x7fd0a0010c40,false) [0x7fd0a0011490]
<yrtp:ALL> YRTPWrapper::setupRTP("172.16.1.23",true) [0x7fd0a0011490]
<javascript:NOTE> Channel 'sip/2' already assisted!
<yrtp:INFO> Session 'yrtp/855983934' 0x7fd0a0011600 bound to 172.16.1.23:23606 +RTCP [0x7fd0a0011490]
<yrtp:ALL> YRTPSource::YRTPSource(0x7fd0a0011490) [0x7fd0a0011880]
<yrtp:ALL> YRTPConsumer::YRTPConsumer(0x7fd0a0011490) [0x7fd0a00119d0]
<INFO> DataTranslator::attachChain [0x7fd0a000f0c0] 'slin' -> [0x7fd0a00119d0] '(null)' not possible
<yrtp:ALL> YRTPWrapper::setupSRTP(false) [0x7fd0a0011490]
<sip:INFO> 'udp:0.0.0.0:5060' sending code 200 0x7fd0a0010680 to 172.16.1.29:56802 [0xb8d130]
------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.1.29:56802;branch=z9hG4bK-d8754z-01c054f659ed45f6-1---d8754z-;rport=56802;received=172.16.1.29
From: <sip:4915XXXXXXXXX@172.16.1.23;transport=UDP>;tag=b54a9b4e
To: <sip:492XXXXXXXXX@172.16.1.23;transport=UDP>;tag=1243883796
Call-ID: YjU1MzU1MWMwN2I3MjZiOGY3NTllODBiNzYxZTUzOGE.
CSeq: 1 INVITE
Server: YATE/4.3.1
Contact: <sip:492XXXXXXXXX@172.16.1.23:5060>
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Type: application/sdp
Content-Length: 314

v=0
o=yate 1366283190 1366283190 IN IP4 172.16.1.23
s=SIP Call
c=IN IP4 172.16.1.23
t=0 0
m=audio 23606 RTP/AVP 3 110 98 8 0 101
a=rtpmap:3 GSM/8000
a=rtpmap:110 SPEEX/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
------
<sip:INFO> 'udp:0.0.0.0:5060' received 469 bytes SIP message from 172.16.1.29:56802 [0xb8d130]
------
ACK sip:492XXXXXXXXX@172.16.1.23:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.1.29:56802;branch=z9hG4bK-d8754z-0a1a658ef2f362b2-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4915XXXXXXXXX@172.16.1.29:56802;transport=UDP>
To: <sip:492XXXXXXXXX@172.16.1.23;transport=UDP>;tag=1243883796
From: <sip:4915XXXXXXXXX@172.16.1.23;transport=UDP>;tag=b54a9b4e
Call-ID: YjU1MzU1MWMwN2I3MjZiOGY3NTllODBiNzYxZTUzOGE.
CSeq: 1 ACK
User-Agent: Zoiper r16950
Content-Length: 0

------
<yrtp:ALL> RTP/AVP message received
<yrtp:ALL> Wrapper 0x7fd0a0011490 found by CallEndpoint 0x7fd0980093f0
<yrtp:ALL> YRTPWrapper::startRTP("172.16.1.29",39760) [0x7fd0a0011490]
<yrtp:INFO> RTP starting format 'gsm' payload 3 [0x7fd0a0011490]
>>> DataTranslator::detachChain(0x7fd0a000f0c0,0x7fd0a00119d0)
<<< DataTranslator::detachChain
<ALL> GsmCodec::GsmCodec("slin","gsm",encoding) [0x7fd098001630]
<ALL> Created DataTranslator 0x7fd098001630 for 'slin' -> 'gsm' by factory 0x7fd0c19d10a8 (len=1)
<ALL> DataTranslator::attachChain [0x7fd0a000f0c0] 'slin' -> [0x7fd0a00119d0] 'gsm' succeeded
<NOTE> Choosing started 'audio' format 'gsm' [0x7fd09800a920]
<wave:ALL> WaveSource '(null)' end of data (62604 played) chan=0x7fd0a000eed0 [0x7fd0a000f0c0]
<wave:ALL> WaveSource cleanup, total=62604, chan=(nil) [0x7fd0a000f0c0]
>>> DataTranslator::detachChain(0x7fd0a000f0c0,0x7fd0a00119d0)
  >>> DataTranslator::detachChain(0x7fd0a000f0c0,0x7fd098001630)
  <<< DataTranslator::detachChain
  <ALL> GsmCodec::~GsmCodec() [0x7fd098001630]
<<< DataTranslator::detachChain
<sip/2:ALL> YateSIPConnection::disconnected() '(null)' [0x7fd0980093f0]
<wave:ALL> WaveSource::~WaveSource() [0x7fd0a000f0c0] total=62604 stamp=31200
<wave:INFO> WaveSource rate=16039 b/s
<wave/2:ALL> WaveChan::~WaveChan() wave/2 [0x7fd0a000eed0]
<NOTE> IN JAVASCRIPT ROUTING SCRIPT
<NOTE> message.timeout=15000 SET
<NOTE> CALLING dumb/
<yrtp:INFO> YRTPWrapper::gotDTMF('1') [0x7fd0a0011490]
<NOTE> VALUE: 1 on chan sip/2
<yrtp:INFO> YRTPWrapper::gotDTMF('2') [0x7fd0a0011490]
<NOTE> VALUE: 2 on chan sip/2
<yrtp:INFO> YRTPWrapper::gotDTMF('#') [0x7fd0a0011490]
<NOTE> VALUE: # on chan sip/2
<NOTE> HIT #
<NOTE> play voice file
<javascript:WARN> JsChannel::callToReRoute(): No message!











<sip:INFO> 'udp:0.0.0.0:5060' received 469 bytes SIP message from 172.16.1.29:56802 [0xb8d130]
------
BYE sip:492XXXXXXXXX@172.16.1.23:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.1.29:56802;branch=z9hG4bK-d8754z-e610f68952fca4cc-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4915XXXXXXXXX@172.16.1.29:56802;transport=UDP>
To: <sip:492XXXXXXXXX@172.16.1.23;transport=UDP>;tag=1243883796
From: <sip:4915XXXXXXXXX@172.16.1.23;transport=UDP>;tag=b54a9b4e
Call-ID: YjU1MzU1MWMwN2I3MjZiOGY3NTllODBiNzYxZTUzOGE.
CSeq: 2 BYE
User-Agent: Zoiper r16950
Content-Length: 0

------
<sip:INFO> 'udp:0.0.0.0:5060' sending code 100 0x7fd098008220 to 172.16.1.29:56802 [0xb8d130]
------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.16.1.29:56802;branch=z9hG4bK-d8754z-e610f68952fca4cc-1---d8754z-;rport=56802;received=172.16.1.29
From: <sip:4915XXXXXXXXX@172.16.1.23;transport=UDP>;tag=b54a9b4e
To: <sip:492XXXXXXXXX@172.16.1.23;transport=UDP>;tag=1243883796
Call-ID: YjU1MzU1MWMwN2I3MjZiOGY3NTllODBiNzYxZTUzOGE.
CSeq: 2 BYE
Server: YATE/4.3.1
Content-Length: 0

------
<yrtp:ALL> RTP/AVP message received
<yrtp:ALL> Wrapper 0x7fd0a0011490 found by ID 'yrtp/855983934'
<yrtp:INFO> YRTPWrapper::terminate() [0x7fd0a0011490]
<yrtp:ALL> YRTPSource::~YRTPSource() [0x7fd0a0011880] wrapper=0x7fd0a0011490 ts=107200
<yrtp:ALL> YRTPConsumer::~YRTPConsumer() [0x7fd0a00119d0] wrapper=0x7fd0a0011490 ts=31040
<yrtp:ALL> YRTPWrapper::~YRTPWrapper() bidir 'audio' [0x7fd0a0011490]
<ALL> Cleaning up RTP 0x7fd0a0011600 [0x7fd0a0011490]
<sip/2:ALL> YateSIPConnection::hangup() state=3 trans=(nil) error='(null)' code=0 reason='(null)' [0x7fd0980093f0]
<ALL> DumbChannel::disconnected() '(null)'
<sip/2:ALL> YateSIPConnection::~YateSIPConnection() [0x7fd0980093f0]
<sip:INFO> 'udp:0.0.0.0:5060' sending code 200 0x7fd098001e50 to 172.16.1.29:56802 [0xb8d130]
------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.1.29:56802;branch=z9hG4bK-d8754z-e610f68952fca4cc-1---d8754z-;rport=56802;received=172.16.1.29
From: <sip:4915XXXXXXXXX@172.16.1.23;transport=UDP>;tag=b54a9b4e
To: <sip:492XXXXXXXXX@172.16.1.23;transport=UDP>;tag=1243883796
Call-ID: YjU1MzU1MWMwN2I3MjZiOGY3NTllODBiNzYxZTUzOGE.
CSeq: 2 BYE
P-RTP-Stat: PS=195,OS=6435,PR=677,OR=21645,PL=0
Server: YATE/4.3.1
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Length: 0

------
<javascript:ALL> Assistant for 'sip/2' deleted
<ALL> Rescanning handler list for 'chan.hangup' [0x7fd098001300] at priority 15
<ALL> Rescanning handler list for 'chan.disconnected' [0x7fd098007e10] at priority 15
<dumb/2:ALL> DumbChannel::~DumbChannel() src=(nil) cons=(nil)
<javascript:ALL> Assistant for 'dumb/2' deleted
<ALL> Rescanning handler list for 'chan.hangup' [0x7fd090021690] at priority 15
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-04-18 14:11 asymetrixs New Issue
2013-04-19 13:25 paulc Assigned To => paulc
2013-04-19 13:25 paulc Status new => acknowledged


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker