Author Topic: Record a call in regexroute  (Read 10816 times)

bnaetsch

  • Newbie
  • *
  • Posts: 9
    • View Profile
Record a call in regexroute
« on: July 04, 2017, 04:50:49 AM »
Hello
is there a way to record a call in the regexroute.conf

.*49351898818077$=wave/record//var/records/inbound_${called}_${caller}$(timestamp).2slin
.*49351898818077$=sip/sip:+49302555880114778@213.XX.XX.XX:6045
This creates a valid record but it dials not the following destination

.*49351898818077$=sip/sip:+49302555880114778@213.XX.XX.XX:6045
.*49351898818077$=wave/record//var/records/inbound_${called}_${caller}$(timestamp).2slin
This dials the destination, but the record is empty

The call flow shoud be
Caller => yate where the call will recorded => PBX where the call is distributed to the callee

I will be happy  for any explanation, or better, examples
Thanks
Burkhard

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: Record a call in regexroute
« Reply #1 on: July 05, 2017, 01:46:45 AM »
Remember:
When a target is set in regexroute processing stops, route message returns with specified target.
Lines following the one returning a target to call are ignored!

Recording a call is not an easy thing to do.

Try this:

.*49351898818077$={
    .*=enqueue chan.masquerade;id=${id};message=chan.record;call=wave/record//var/records/inbound_${called}_${caller}$(timestamp).slin;peer=wave/record//var/records/outbound_${called}_${caller}$(timestamp).slin
   .*=sip/sip:+49302555880114778@213.XX.XX.XX:6045
}

Notes:
- you MUST masquerade the chan.record message: the internal channel is required in order to attach its input to record
- media directions are not correlated. Each file stores media when is generated by input
- you may search the code for other modules implementing chan.record (I think dbwave can store recordings in a database)

See also:
http://docs.yate.ro/wiki/Chan.record
http://docs.yate.ro/wiki/Chan.masquerade

bnaetsch

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Record a call in regexroute
« Reply #2 on: July 05, 2017, 03:15:53 AM »
Thank you marian.

your example works fine, I get 2 voice files and the call is connected to the destination.

King regards
Burkhard

Dam Dat

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Record a call in regexroute
« Reply #3 on: August 14, 2018, 08:06:44 PM »
HI bnaetsch, marian
can you tell me
to record call i need add
.*49351898818077$={
    .*=enqueue chan.masquerade;id=${id};message=chan.record;call=wave/record//var/records/inbound_${called}_${caller}$(timestamp).slin;peer=wave/record//var/records/outbound_${called}_${caller}$(timestamp).slin
   .*=sip/sip:+49302555880114778@213.XX.XX.XX:6045
}

on bottom regexroute.conf ?
And can you tell me parameters. what is serial 49351898818077, +49302555880114778
where can i play files recording?

Thanh you very much for helping!