Hi all,
let's say SER receives this invite:
INVITE sip:foopbx@ip.com SIP/2.0
Via: ...
To: "058633345880101" <058633345880101(a)ip.com>
[cut]
and assume that there is an entry in the user location table
for ''foopbx(a)ip.com" (ie it registered with SER)
and assume that entry in userloc has a "Server: Bar 1.0 PBX" value
I'm wondering if is possible to do something like that:
if (!lookup("location")) {
log(1, "User not in user database...\n");
route(whatever);
break;
};
if(get_server_string_from_userloc() =~ "Bar 1.0 PBX") {
take the number from the "To:" header and
write it in the request uri. So the forwarded msg will
look like:
INVITE sip:058633345880101@ip.com SIP/2.0
Via: ...
To: "058633345880101" <058633345880101(a)ip.com>
[cut]
};
thank you very much, I really need your help
Ciao
FF