Author Topic: MGCP FXS call to IAX trunk not signalling ringing  (Read 797 times)

andrew867

  • Newbie
  • *
  • Posts: 10
    • View Profile
MGCP FXS call to IAX trunk not signalling ringing
« on: June 22, 2018, 07:29:26 AM »
Hi!

I currently have an FXS channel bank connected to Yate using MGCPCA and the Analog driver. When I make a call from the analog line to another FXS port or IAX trunk the MGCP device never receives a request to play ringback.

It seems the problem is in:

bool AnalogChannel::msgRinging(Message& msg)

No matter what I do in that function (which does get called) the MGCP channel driver never gets the SignallingCircuitEvent::GenericTone. Changing the ringback= option in analog.conf has no effect on it working.

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: MGCP FXS call to IAX trunk not signalling ringing
« Reply #1 on: June 25, 2018, 06:32:28 AM »
Please post logs for each case.
Make sure iax messages are printed on output (iax module debug must be at level 9).
Make sure message sniffer is enabled.

You may want to look at:
http://docs.yate.ro/wiki/Debugging_in_Yate
http://docs.yate.ro/wiki/Debug_Output
http://docs.yate.ro/wiki/Debugging_and,_or_Investigation_of_messages

andrew867

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: MGCP FXS call to IAX trunk not signalling ringing
« Reply #2 on: June 25, 2018, 08:36:03 AM »
I found that the problem actually originates in the analog.cpp module. The MGCP channel supports early media so analog.cpp ignores the ringback=yes directive. Even when ringback=no the module doesn't try to generate internal ringback using tone/ring. I modified line 1516 in analog.cpp from 'else if' to 'if', this works fine for my use case and now the FXS analogue line has ringback generated by the MGCP gateway.

https://github.com/vir/yate/blob/master/modules/server/analog.cpp#L1516


marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: MGCP FXS call to IAX trunk not signalling ringing
« Reply #3 on: June 25, 2018, 08:54:13 AM »
This is not a good idea:
I suppose this will indicate to the gateway to generate ringback (early media).
What will be GW's bahaviour when early media is received:
- ignore it ?
- stop generating ringback and forward early media?
- worst case: mix them?
Each gateway may have its own handling.

If you have targets indicating early media without actually playing it you should handle it by catching call.ringing/call.progress messages and explicitly set earlymedia=false