On 13 Mar 2015, at 18:45, Daniel Tryba d.tryba@pocos.nl wrote:
On Friday 13 March 2015 17:14:31 Olle E. Johansson wrote:
I'd love to find out why this is the case. I would have estimated 9 out of 10 people need to fine-tune DTMF + codec settings in Asterisk.
The most common solution I've seen is to have kamailio use 10 different ports and have 10 different matching peers in the Asterisk SIP config to select settings.
Cumbersome, why not just use some custom headers (stored in usr_preferences)?
There are settings you can't set from the dialplan, but when you can this is a good idea.
/O
kamailio stuff: if($avp(src_dtmfmode)!="") { append_hf("X-DTMFMode: $avp(src_dtmfmode)\r\n"); }
asterisk stuff: exten => _[+X].,n,ExecIf($[${LEN(${SIP_HEADER(X-DTMFMode)})} > 0]?SIPDtmfMode(${SIP_HEADER(X-DTMFMode)}))
The other way around is bit more tricky. YOu have to dial using the M option (i'm using AGI instead of RT): M(setdtmftx^".$row['dtmftx'].")
[macro-setdtmftx] exten => s,1,NoOp() exten => s,n,SIPDtmfMode(${ARG1}) exten => s,n,MacroExit
--
Telefoon: 088 0100 700 Sales: sales@pocos.nl | Service: servicedesk@pocos.nl http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 17097024