Attempting native bridge of SIP/2527-f29a and SIP/2527-f772

I am trying to use the option “M” from Dial, when I use the macro I want to execute a Background message and get the digit which was pressed by the user. When a digit is pressed I got the error: “Attempting native bridge of SIP/2527-f29a and SIP/2527-f772” and the audio is mute

I have set canreinvite to “no”. I also would know if use the M is the right way to detect answering.

Here is my context and my macro:

[gestionLLamada]
exten => s,1,Noop(** CONTEXTO gestionLLamada )
exten => s,2,SetLanguage(es)
exten => s,3,AbsoluteTimeout(8000)
exten => s,4,Noop(** LLAMAR A: ${ped_destino})
exten => s,5,Answer
exten => s,6,Wait(3)
exten => s,7,SetGlobalVar(ped_mensaje=${ped_mensaje})
exten => s,8,SetGlobalVar(id_pedido=${id_pedido})
exten => s,9,Dial(SIP/${ped_destino}|20|gM(ejecutarMensaje))
exten => s,10,Goto(s-${DIALSTATUS},1)
;----------------------------------------------- De acuerdo al caso
exten => s-ANSWER,1,noop( CONTESTO )

exten => s-NOANSWER,1,SetVar(causa=NO_CONTESTA)
exten => s-NOANSWER,2,AGI(tts/intentos.php|${id_pedido}|$(causa))

exten => s-CHANUNAVAIL,1,SetVar(causa=CANAL_NO_DISPONIBLE)
exten => s-CHANUNAVAIL,2,AGI(tts/intentos.php|${id_pedido}|$(causa))

exten => s-BUSY,1,SetVar(causa=OCUPADO)
exten => s-BUSY,2,AGI(tts/intentos.php|${id_pedido}|$(causa))

exten => s-CONGESTION,1,SetVar(causa=CONGESTION)
exten => s-CONGESTION,2,AGI(tts/intentos.php|${id_pedido}|$(causa))
exten => _s-.,1,Noop(Ninguna de las opciones)
exten => t,1,Playback(vm-goodbye)
exten => t,2,SetVar(causa=NO_PRESIONA_TECLA)
exten => t,3,Hangup

include => default

[macro-ejecutarMensaje]
exten => s,1,Noop( MACRO ejecutarMensaje )
exten => s,2,ResponseTimeout(10)
exten => s,3,Wait(0.5)
exten => s,4,Background(vm-intro) ;The audio is lost here when a user press a key.
exten => s,5,Read(ACCEPT||1|)
exten => s,6,GotoIf($[${ACCEPT} = 1]?8:6)
exten => s,7,GotoIf($[${ACCEPT} = 2]?10:13)
exten => s,8,SetVar(MACRO_RESULT=CONTINUE)
exten => s,9,AGI(tts/text2wav.php|${ped_mensaje}|${id_pedido})
exten => s,10,Hangup
exten => s,11,Macro(cancelarMensaje|${id_pedido})
exten => s,12,AGI(hangup.php);
exten => s,13,SetVar(causa=NO_PRESIONA_TECLA)
exten => s,14,AGI(tts/intentos.php|${id_pedido}|$(causa))

Thanks

Why don’t you use the Background() application instead of the Dial() if you just want to get the DTMF digits that the caller pressed?

Dial() attempts to make another call in the context of an axisting call, using media bridging. “Native bridge” is a form of a call transfer made by Asterisk.

Also, you can transfer an incoming call using the transfer() application, but it only works for SIP-SIP transfers and has a serious bug because it ignores the “Record-Route” headers when issuing the SIP REFER request.

See:
bugs.digium.com/view.php?id=6240