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:boby@domain.com
alias_db_lookup();
# Now RURI => 201(a)domain.com
$ou => sip:boby@domain.com
lookup('location');
# Now RURI => 201@99.88.100.123:5060
$ou => sip:boby@domain.com
-------
--
Iñaki Baz Castillo
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users