[Serusers] RV: [Serdev] Parse Referred-By

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Oct 20 16:59:41 CEST 2005


do
parse_headers(HDR_EOH)
to parse all hdrs and go over the entire hdr list (in msg->headers) and 
look for hdr with "name" equal to "Referred-By".

bogdan


Ing. Francisco Talavera wrote:

>Andy:
>
>I was write a module "MyModule" in SER, It communicates with other program
>(MyProgram) via Socket. This Module (MyModule) need to send the Referred-By
>header field to MyProgram. That’s my problem.
>
>The communication between MyModule and MyProgram is XML message, I need to
>parse the Referred header field and encapsulate in XML message.
>
>I now SER have a function "parse_headers()", with this function I parse the
>call-id header field... like this.. parse_headers(msg, (int) HDR_CALLID, 0)
>
>But I can NOT do this ... parse_headers(msg, (int) HDR_REFERRED_BY, 0)...
>because HDR_REFERRED_BY doesn’t exist..
>
>Now I think it was more clearly.
>
>Thank in advance
>Francisco Talavera
>
>-----Mensaje original-----
>De: serusers-bounces at iptel.org [mailto:serusers-bounces at lists.iptel.org] En nombre
>de Andreas Granig
>Enviado el: miércoles, 19 de octubre de 2005 16:02
>Para: Ing. Francisco Talavera
>CC: 'SER Users'
>Asunto: Re: [Serusers] RV: [Serdev] Parse Referred-By
>
>Ing. Francisco Talavera wrote:
>  
>
>>I need send to other Process the Referred_By header field in the Invite
>>Method. How can I do this?
>>
>>I read the Parser (parser/hf.h) directory but it can not parse this header
>>field.
>>    
>>
>
>You only need to parse the header field if you want to load parts of it 
>into avp or use them in other code parts of SER. In newer versions of 
>SER (don't know exactly from which version upwards) you can also load 
>the content of the header into avp using the avpops module.
>
>If you just want to pass it to a script called by exec_dset() or 
>exec_msg(), you can access any header field using the environment 
>variable SIP_HF_<header-name>.
>
>So I'm not sure if it's really needed to touch the parser unless you 
>tell us how exactly you plan to use it.
>
>Andy
>
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>  
>




More information about the sr-users mailing list