What you can do is:

1) before applying aliases, save the RURI into an AVP
2) do alias ->userXY, do whatever other routing stuff, including 
lookup("location");
3) just before sending out the request, do: if $du (destination URI) is 
empty, copy the current RURI into $du ($du = $ru); (id $du already set, 
skip that step). After that, copy the stored AVP into RURI and send it out.

more or less you will the desitnation URI to point to userXY and put in 
RURI the alias stuff..

Regards
Bogdan

Robert Borz wrote:
> Hi Bogdan,
>
> yes, that's exactly what I want... :-)
>
>
> Regards,
> Robert.
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] 
> Sent: Tuesday, April 21, 2009 11:38 AM
> To: [email protected]
> Cc: [email protected]; [email protected]
> Subject: Re: [OpenSIPS-Users] SIP trunk provider lab
>
> Hi Robert,
>
> you mean, at the end, you want to sent it to [email protected] phone, but 
> with [email protected] in RURI, right ?
>
> Regards,
> Bogdan
>
> Robert Borz wrote:
>   
>> Hi Bogdan,
>>
>> could you be more specific here, please?
>>
>> I want to setup a similar configuration. I want to forward let's say 300 
>> numbers (sip accounts) to a single SIP account without loosing the R-URI, 
>> because the box receiving the forwarded calls should be able to distinct 
>> which number was dialed. What do I have to insert in the alias table to do 
>> this:
>>
>> [email protected]
>> [email protected]
>> [email protected]       -- forward to ---> [email protected]
>> ...
>> [email protected]
>>
>> Another thing I'm currently completely lost in is how to handle the outgoing 
>> part. [email protected] should be able to place outgoing calls with the 
>> originator set to one of the [email protected] ... [email protected] addresses.
>>
>> How can I achieve this behaviour? Thanks a lot!
>>
>>
>> Regards,
>> Robert
>>
>>
>> -----Original Message-----
>> From: [email protected] 
>> [mailto:[email protected]] On Behalf Of Bogdan-Andrei Iancu
>> Sent: Monday, March 16, 2009 9:14 AM
>> To: [email protected]
>> Cc: [email protected]
>> Subject: Re: [OpenSIPS-Users] SIP trunk provider lab
>>
>> Hi Elnor,
>>
>> [email protected] wrote:
>>   
>>     
>>> Hi,
>>>
>>> thank you for your response!
>>> correct me if I'm wrong, but aren't we going to loose dest phone number if 
>>> we use dbaliases?
>>>   
>>>     
>>>       
>> Not necessary - depends of how you define the alias. For ex, you can do:
>>     d...@server -> DID@ trunk
>>
>> preserve the username part and change only the domain to point to the trunk.
>>
>>
>> Also, if you have blocks of DIDs which are easy to detect based on 
>> regexp, you may consider using the dialplan module:
>>        http://www.opensips.org/html/docs/modules/1.4.x/dialplan.html
>>
>> See example 1.4.1.2 - 
>> http://www.opensips.org/html/docs/modules/1.4.x/dialplan.html#id227187
>>
>> Regards,
>> Bogdan
>>
>>   
>>     
>>> Also please provide hints on ENUM, how do I use it for this purpose?
>>>
>>> Thank you.
>>>
>>> Elnour
>>>
>>>
>>> ----- Original Message ----- 
>>> From: "Iñaki Baz Castillo" <[email protected]>
>>> To: <[email protected]>
>>> Sent: Saturday, March 14, 2009 3:59 PM
>>> Subject: Re: [OpenSIPS-Users] SIP trunk provider lab
>>>
>>>
>>>   
>>>     
>>>       
>>>> El Sábado, 14 de Marzo de 2009, [email protected] escribió:
>>>>     
>>>>       
>>>>         
>>>>> if we have a SIP subscriber registered with a user name companyA which 
>>>>> has
>>>>> 8 DID phone lines from PSTN say 5551001-08, our setup should dynamicaly
>>>>> route all incomming calls to the "location" of the regisration.
>>>>>
>>>>> Is this possbile? I mean is this possible to achive dynamicaly?
>>>>>       
>>>>>         
>>>>>           
>>>> Of course, use ENUM or dbaliases.
>>>>
>>>>
>>>> -- 
>>>> Iñaki Baz Castillo
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [email protected]
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>> !DSPAM:49bb9c46608611888415445!
>>>>
>>>>
>>>>     
>>>>       
>>>>         
>>> _______________________________________________
>>> Users mailing list
>>> [email protected]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>   
>>>     
>>>       
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>   
>>     
>
>
>   


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to