4 posts / 0 new
Last post
matthewmalk248
matthewmalk248's picture
Joined: 2015/08/09
Points: 30

I'm wondering if I'm missing something in my script that I use to record hunt lists. I use the TL_RECORDING ODBC call, and about 95/100 it records and inserts an entry into the 'recording' database table just fine, but when a call comes in and the ${CALLERID(name)} contains a comma (e.g. "DOE,JOHN" ) It causes the last 3 fields of the insert to be incorrect. Basically the comma is causing the persons first name to be stored as the DID in the database record.

Is my formatting missing something? Or should I modify the caller ID name in someway to remove the comma from the caller Id name before it hits TL_RECORDING.

exten => s,n,NoOp(result=${TL_RECORDING(${UNIQUEID},${RELPATHTORECORDING},${RECORD_CALLER},${RECORD_CALLEE},queue,${TOUCH},${CALLERID(num)},${ARG1},${CALLERID(name)},${DIALED_NUMBER},${STRFTIME(,,%F-%H-%M-%S)},${TOUCH},${tenant})})

eeman
eeman's picture
Joined: 2007/11/06
Points: 280

have you tried adding backslashes before the comma?

Erik Smith
dCAP
Thirdlane/Asterisk Support available
esmith.bgnv@gmail.com

matthewmalk248
matthewmalk248's picture
Joined: 2015/08/09
Points: 30

As in modifying the ${CALLERID(num)} variable itself and finding the comma, then inserting backslashes in front of that? To be honest I don't know where to begin on trying to do that with Asterisk code :/

eeman
eeman's picture
Joined: 2007/11/06
Points: 280

in PHP the function is AddSlashes, check to see if there is a application or function that does the same thing in asterisk dialplan.

Erik Smith
dCAP
Thirdlane/Asterisk Support available
esmith.bgnv@gmail.com