Hello,
I have a problem with the cut function.
I want to extract a number from a P-Asserted Identity.
To example:
P-Asserted-Identity: sip:1234@1.1.1.1
I allready have the part:
sip:1234@1.1.1.1 saved in a var.
But how can I extract the phone number 1234 ?
Thank you very much…
Do this in two steps. If the string is stored in ${FULLADDR},
exten => _X.,1,Set(locnum=${CUT(FULLADDR,@,1)})
exten => _X.,n,Set(locnum=${CUT(locnum:,2)})
exten => _X.,n,NoOp(stripped number is ${locnum})
davevg
3
This is one way to do it…
Edit: bmcintyre beat me to it 