[Users] Question about changing an coming call destination.

Howard Tang howard615 at gmail.com
Wed Mar 14 22:29:12 CET 2007


HI Bogdan,

Thank you very much for your reply.

While I am awaiting for someone reply, i have tried something as
follows and it did work for me.

Am i doing the right thing?

                if (is_method("INVITE") && !has_totag() && uri=~"sip:5678")
                {
                        avp_write("$from", "$avp(i:123)");
                        route(4);
                        exit;
                }

route[4] {
        avp_pushto("$ruri", "$avp(i:123)");
        route(1);
}

Regards,
Howard

On 3/15/07, Bogdan-Andrei Iancu <bogdan at voice-system.ro> wrote:
> Hi Howard,
>
> you just need to change the RURI from 5678 to 1234:
>
> ....
> if (uri=~"sip:5678@")
>     rewriteuser("1234");
> .....
>
>
> regards,
> bogdan
>
> Howard Tang wrote:
> > Hi All,
> >
> > I am having a problem to do the following.
> >
> > A call recevied from PSTN
> >
> > Caller is 1234
> > Callee is 5678
> >
> > Normally, the UA 5678 that registered on the openser will receive the
> > call and have caller id display 1234. What i want to do is the UA 1234
> > will recevice the call instead 5678, i don't care about the callid
> > (basically, caller id will remain 1234).
> >
> > where should i preform the modification? I dont need Callerid. so i
> > just want to send the incoming call to the account that match the
> > caller id.
> >
> > My logic will be
> >
> > if sip_to = 5678, then change sip_to(5678) to sip_from(1234).
> > send the call to the user 1234.
> >
> > However, i am not familiar with the code.
> >
> > Can someone show me how i can do that please?
> >
> > Regards,
> > Howard
> >
> > _______________________________________________
> > Users mailing list
> > Users at openser.org
> > http://openser.org/cgi-bin/mailman/listinfo/users
> >
>
>




More information about the Users mailing list