Il 24/07/2012 10.37, Ishfaq Malik ha scritto:
It there a native asterisk dialplan function which will tell me the
position of a specific character in a given string?
eg if I wanted to find what position the '@' was at in ${SIPURI}
if you are trying to extract parts from a string then look at the
function called 'CUT'.
verbose example:
exten => s,1,NoOp(set DID from SIP TO header)
exten => s,n,Set(DID_INFO=${SIP_HEADER(To)})
exten => s,n,Set(DID_INFO=${CUT(DID_INFO,@,1)})
exten => s,n,Set(DID_INFO=${CUT(DID_INFO,:,2)})
exten => s,n,Goto(sip-routing,${DID_INFO},1)
--
TeeBX VoIP communication platform (coming soon)
http://code.google.com/p/teebx/
-----------------------------------------------
Lightweight++ User Friendly++ Open++
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users