[OpenSER-Users] get number of headers

Daniel-Constantin Mierla daniel at voice-system.ro
Fri Aug 31 18:51:19 CEST 2007


Hello,

to get the number of the headers is not very easy. There might be a 
possibility to use recursive routes, but it is quite complex. I have to 
think about. This might be a useful tool in the config, if the time will 
allow, next stable version will have such feature.

However, it is possible to read a header by index

$hdr(Via[1]) is the second via header. If the header at that index does 
not exists, you will get null.

http://openser.org/dokuwiki/doku.php/pseudovariables:1.2.x#headers

Cheers,
Daniel

On 08/31/07 17:16, Aymeric Moizard wrote:
>
> Hi all,
>
> I wish to get from the script the number of Record-Route, Via headers, 
> Contact (in the order they appear of course...)
>
> Additionnaly, I would be interested to "read" them. To me, it
> look like the search() can't be used for this?
>
> I searched the doc and google, but could not find any tips for
> this specific operation.
>
> tks,
> Aymeric MOIZARD / ANTISIP
> amsip - http://www.antisip.com
> osip2 - http://www.osip.org
> eXosip2 - http://savannah.nongnu.org/projects/exosip/
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>




More information about the Users mailing list