Thank you Iñaki.  Not only did I find that my syntax made no sense, I  
also found that openser would not start because of it.

I believe that I have found my solution with your help.  The below  
syntax appears to be working with the results I intended.

         alias_db_lookup("dbaliases");

         if (!lookup("location")) {

                          ...

                 }
         }
         else
         {
           avp_pushto("$ru/username", "$oU");
         }

What the above does for me is that OpenSER can receive an invite from  
one of my SIP providers.  I can determine if the call is intended for  
one of the PBX's that are registered to OpenSER and appropriately  
route the call to the PBX that serves the number.

Thanks
Stagg


On Jun 29, 2008, at 3:42 PM, Iñaki Baz Castillo wrote:

> El Domingo, 29 de Junio de 2008, Stagg Shelton escribió:
>> I guess where I am most confused is the interaction that AVP has on
>> the current message.  Does AVP have the ability to rewrite the  
>> current
>> message URI before I use t_relay to send it to its destination?  Is  
>> it
>> as simple as the following:
>>
>> avp(s:$rU) = $oU;
>
> The above is incorrent, you cannot do "avp(s:$rU), it makes no  
> sense. An AVP
> must have an intenger or string identifier:
>
>  avp(s:name1)
>  avp(s:name1)
>  avp(i:1)
>  avp(i:2)
>
> But you cannot do:
>
>  avp(s:$rU)  <-- Why it???
>
>
> Anyway what I mean is that if you have modified RURI (maybe using
> alias_db_lookup, lookup('location')...) you still can get the
> **original**RURI via $ou, $oU... variables.
>
> Example:
>
> -------
> RURI = sip:[EMAIL PROTECTED]
>
> alias_db_lookup();
> # Now RURI => [EMAIL PROTECTED]
>
> $ou => sip:[EMAIL PROTECTED]
>
> lookup('location');
> # Now RURI => [EMAIL PROTECTED]:5060
>
> $ou => sip:[EMAIL PROTECTED]
> -------
>
>
> -- 
> Iñaki Baz Castillo
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.openser.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.openser.org/cgi-bin/mailman/listinfo/users

Reply via email to