[Serusers] RV: [Serdev] Parse Referred-By
Ing. Francisco Talavera
francisco.talavera at conexiongroup.com
Thu Oct 20 15:35:27 CEST 2005
Andy:
I use SER-0.9.0, can i use avp_write with this version?.
Regards
Francisco
-----Mensaje original-----
De: serusers-bounces at iptel.org [mailto:serusers-bounces at lists.iptel.org] En nombre
de Klaus Darilion
Enviado el: jueves, 20 de octubre de 2005 9:00
Para: Ing. Francisco Talavera
CC: 'SER Users'
Asunto: Re: [Serusers] RV: [Serdev] Parse Referred-By
Hi!
I would try to write the referred-by URI into an AVP using avp_write.
Then, in your module, you can read this AVP and send it to YourProgramm.
Take a look at the lcr module, expecially the function next_contacts().
Then you will see how to read from AVPs in a module.
regards
klaus
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. Thats 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 doesnt 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
>
>
_______________________________________________
Serusers mailing list
serusers at lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
More information about the sr-users
mailing list