Author Topic: Ringback problem  (Read 12028 times)

daimond025

  • Newbie
  • *
  • Posts: 13
    • View Profile
Ringback problem
« on: July 29, 2014, 06:48:16 AM »
Good day!

I debug library libyate.php on nodejs. I have a problem with implementation follow library https://github.com/shimaore/yate/blob/master/share/scripts/ringback.php

below i show messages from/to yate
%%<install:50:call.ringing:true
%%<watch:call.ringing:true
%%<setlocal:restart:true:true
%%>message:0xb4eef0e0.1408803016:1406636652:call.ringing::id=sip/2:module=sip:status=ringing:address=172.17.2.44%z65007:targetid=sip/1:billid=1406636584-1:peerid=sip/1:lastpeerid=sip/1:answered=false:direction=outgoing:callid=sip/1655745038@172.17.2.181/1331911989/8e5dec24:sip_contact=<sip%z127@172.17.2.44%z65007;rinstance=75edb7ef90183ba8>:sip_user-agent=3CXPhone 6.0.18815.0:earlymedia=false:handlers=javascript%z15,callfork%z20,yrtp%z50,cdrbuild%z50


I answer for this  - %%<message:0xb4eef0e0.1408803016:true:call.ringing::id=sip/2:module=sip:status=ringing:address=172.17.2.44%z65007:targetid=sip/1:billid=1406636584-1:peerid=sip/1:lastpeerid=sip/1:answered=false:direction=outgoing:callid=sip/1655745038@172.17.2.181/1331911989/8e5dec24:sip_contact=<sip%z127@172.17.2.44%z65007;rinstance:sip_user-agent=3CXPhone 6.0.18815.0:earlymedia=true:handlers=javascript%z15,callfork%z20,yrtp%z50,cdrbuild%z50:formats=mulaw:ringback=dtmfstr/11111


Yate send me - %%<message::true:call.ringing::id=sip/2:module=sip:status=ringing:address=172.17.2.44%z65007:targetid=sip/1:billid=1406636584-1:peerid=sip/1:lastpeerid=sip/1:answered=false:direction=outgoing:callid=sip/1655745038@172.17.2.181/1331911989/8e5dec24:sip_contact=<sip%z127@172.17.2.44%z65007;rinstance:sip_user-agent=3CXPhone 6.0.18815.0:earlymedia=true:handlers=javascript%z15,callfork%z20,yrtp%z50,cdrbuild%z50:formats=mulaw:ringback=dtmfstr/11111


Then I answer - %%>message:15660swb9t85bmf49.621474312:1406636653:chan.masquerade::id=sip/1:module=sip:status=ringing:address=172.17.2.44%z65007:targetid=sip/1:billid=1406636584-1:peerid=sip/1:lastpeerid=sip/1:answered=false:direction=outgoing:callid=sip/1655745038@172.17.2.181/1331911989/8e5dec24:sip_contact=<sip%z127@172.17.2.44%z65007;rinstance:sip_user-agent=3CXPhone6.0.18815.0:earlymedia=true:handlers=javascript%z15,callfork%z20,yrtp%z50,cdrbuild%z50:formats=mulaw:ringback=dtmfstr/11111:message=chan.attach:replace=dtmfstr/11111:autorepeat=true:single=true

yate send me - %%<message:15660swb9t85bmf49.621474312:false:chan.attach::id=sip/1:module=sip:status=accepted:address=172.17.2.44%z65007:targetid=sip/2:billid=1406636584-1:peerid=sip/2:lastpeerid=sip/2:answered=false:direction=incoming:callid=sip/1655745038@172.17.2.181/1331911989/8e5dec24:sip_contact=<sip%z127@172.17.2.44%z65007;rinstance:sip_user-agent=3CXPhone6.0.18815.0:earlymedia=true:handlers=javascript%z15,callfork%z20,yrtp%z50,cdrbuild%z50,fax%z10,sip%z10,dbwave%z90,analogdetect%z100,mux%z100,yrtp%z100,tonedetect%z100,analyzer%z100,pbx%z100,moh%z100,tone%z100,wave%z100,filetransfer%z100,mrcp%z100:formats=mulaw:ringback=dtmfstr/11111:replace=dtmfstr/11111:autorepeat=true:single=true:callid=sip/ODJhNTJhYzIzMDg1ZmJhOGYxNDgxZmQ3MzBkMGM2ZTU./240a3e07/

Why do i get a false? Do you have a ideas for it?

And next may be this is due to next parameters: targetid,peerid,lastpeerid. What is it  responsible?
Is it connected with SipChannelImcoming / SipChannelOutgoing?
I know than id is the number of channel.

I will appreciate any ideas

Monica Tepelus

  • Administrator
  • Full Member
  • *****
  • Posts: 198
    • View Profile
Re: Ringback problem
« Reply #1 on: July 29, 2014, 07:43:17 AM »
Hi daimond025,

It looks like you are copying the old the message parameters in in the chan.masquerade message.
Looking in the original script from https://github.com/shimaore/yate/blob/master/share/scripts/ringback.php you can see that a new Yate message is created: $m = new Yate("chan.masquerade"); that has less  parameters than the one in the above log.

Good luck


daimond025

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Ringback problem
« Reply #2 on: July 30, 2014, 05:56:25 AM »
Thank you  -your comments were pure truth

But i have question (for further understanding of yate)

 Why is this script not work with ringback - tone/noise?
%%>message:203658lzs2tou5k77.727980780:1406720852:chan.masquerade::message=chan.attach:id=sip/1:replace=tone/noise:autorepeat=true:single=true


marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: Ringback problem
« Reply #3 on: July 31, 2014, 12:56:30 AM »
Can you post a yate log with sniffed messages to see what happens?