[asterisk-users] Get phone number from SIP header PAI

Jonas Kellens jonas.kellens at telenet.be
Tue Mar 29 08:19:05 CDT 2011


Hello list,

I want to get the phone number out of the following P-Asserted-Identity 
header :

/"BlaBlaBla" <sip://88779922//@192.168.8.10;user=phone>"/

I do the following in the dialplan :

/exten => _XXX.,n,Set(PY=${SIP_HEADER(P-Asserted-Identity)})
exten => _XXX.,n,Set(PY2=${CUT(PY,@,1)})/

This gives me :

/"BlaBlaBla" <sip://88779922/

How can I extract /88779922/ out of this string ??

I'm trying this :
/exten => _XXX.,n,Set(PY4=${CUT(PY2,\:,1-)}) /
but this does not change a thing to the string...

I just want everything after the comma...


Kind regards,
Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110329/5b94de12/attachment.htm>


More information about the asterisk-users mailing list