[Kamailio-Users] Question about redirect if user is not online
Daniel-Constantin Mierla
miconda at gmail.com
Tue Sep 23 10:53:14 CEST 2008
Hello,
On 09/22/08 16:16, Ali Jawad wrote:
>
> Hi
> I got the below fixed, however I do need to achieve something else as
> well. When I forward the call to asterisk I need asterisk to forward
> it in turn to my cellphone number. Where an how should I re-write the
> DID number of my SIP packet that acts as the destination URI to my
> cell phone number.
>
>
>
to be sure I understand your needs, if the user is not online, you want
to send the call to user's mobile.
Perhaps you already have the mobile number in some table in database.
You can use avp_db_query() to load it in an AVP (see avpops module for
more).
avp_db_query("select __gsm_number__ from __your_table__ where
username='$rU'", "$avp(s:gsm_number)");
if(is_avp_set("$avp(s:gsm_number)"))
{
$rU = $avp(s:gsm_number);
$rd = "__your_pstn_gw_ip__";
t_relay();
exit;
}
Hope it helps,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
More information about the Users
mailing list