gnu
1
Hi, I’am receiving a call from a SIP Trunk.
I have this in extensions.conf:
[from-siptrunk]
exten=>s,1,Answer()
exten=>n,NoOp(${SIP_HEADER(From)})
exten=>n,Dial(SIP/2001)
exten=>n,Hangup()
When I see in the console, it displays this:
…
…
In a single like I get this:
I just want to get the part: Jhon Doe (without quotes)
If i use: NoOp(${CALLERID(Name)}) it will display: mytrunk
So, How can I Clean all the string to only display: Jhon Doe?
Thanks.
gnu
3
hehe Yeeh, since somes minutes ago I’m trying to figure out.
I try using this:
exten => n,Set(foo=${SIP_HEADER(From)})
exten => n,Set(ti=${CUT(foo, <,-2)})
and now i get this: “Jhon Doe” (including quotes)
How can I replace quotes using REPLACE()?? Please, give me a hand.
Like:
....
same => n,Set(foo=${SIP_HEADER(From)})
same => n,Set(ti=${CUT(foo, <,-2)})
same => n,Set(ti2=${REPLACE(ti,"\"",)})
same => n,NoOp(ti2)