[sr-dev] domain attributes

Jan Janak jan at iptel.org
Thu Jul 2 16:13:05 CEST 2009


On 02-07 16:04, Klaus Darilion wrote:
>
>
> Jan Janak schrieb:
>> On 02-07 15:53, Juha Heinanen wrote:
>>> Jan Janak writes:
>>>
>>>  > route[DOMAIN]
>>>  > {
>>>  >         # Check whether the caller is from a local domain.
>>>  >         lookup_domain("$fd", "@from.uri.host");
>>>  >  >         # Check whether the callee is at a local domain
>>>  >         lookup_domain("$td", "@ruri.host");
>>>  > }
>>>  >  > The first call will store the did of the domain in $fd.did if 
>>> it finds a
>>>  > match. The second call will store the did in $td.did.
>>>
>>> jan,
>>>
>>> i start to get it, although i'm not familiar with ser's avp naming
>>> system. can each avp name be followed by .something? what does @ sign
>>> mean in front of ruri.host in above?  can the same call be written as:
>>>
>>> lookup_domain("$td", "$rd") ?
>>
>> Identifiers starting with $ denote AVPs. Identifiers starting with @ denote
>> selects. Selects are similar to pseudo-variables in Kamailio.
>
> Hi Jan!
>
> So, how are ser identifiers and Kamailio pseudo-variables  
> differentiated? Both start with $.
>
> e.g. in Kamailio $fd is the domain of the URI in the From header.

Ohh, that's a very good point and this is also probably the reason why Juha
was asking about the lookup_domain("$fd", "$fd") example--but I didn't get it.

I am not sure now whether $fd in the second parameter of lookup_domain will be
treated as an AVP or as a pseudo-variable, Andrei?

  Jan.



More information about the sr-dev mailing list