[OpenSER-Users] Preserving original number when using alias_db_lookup

Iñaki Baz Castillo ibc at in.ilimit.es
Mon Jun 30 10:31:41 CEST 2008


El Monday 30 June 2008 10:17:57 Bogdan-Andrei Iancu escribió:
> Hi Stagg,
>
> This is a common issue when you have an Asterisk with multiple
> extensions and a single registration to OpenSER. A trick you can do is
> to save the username part of the RURI (the extension) and restore if the
> location lookup (for registrations) was successful:
>
>     ......
>     $avp(s:tmp) = $rU;
>     if ( !lookup("location")) {
>        # no location found
>        sl_send_reply("404","Not Found");
>        exit;
>     }
>     # registration found -> restore the username part
>     $rU = $avp(s:tmp)
>
>     t_relay();
>
>     ......


Hi Bogdan, will any SIP UA allow a call if the RURI username doesn't match the 
username in the "Contact" during UA registration?
Well, sure a PBX would allow it (like Asterisk), but what about single phones?
By my experience, most of the phone just allow receiving INVITE's for the same 
RURI username as the "Contact" send by the UA in the REGISTER.


-- 
Iñaki Baz Castillo
ibc at in.ilimit.es




More information about the Users mailing list