[Freeswitch-users] Changing the username portion of the RURI with registered devices

Brian West brian at freeswitch.org
Fri Jan 15 12:40:04 PST 2010


you can set the sip-force-user param on the user in the directory to force it.

or

    <!--                                                                                                                                                        
        This is an example of how to override the RURI on an outgoing invite to a registered contact.                                                           
    -->                                                                                                                                                         

    <extension name="ruri">                                                                                                                                     
      <condition field="destination_number" expression="^ruri$">                                                                                                
        <action application="bridge" data="sofia/${ruri_profile}/${ruri_user}${regex(${sofia_contact(${ruri_contact})}|^[^\@]+(.*)|%1)}"/> 
      </condition>                                                                                                                                              
    </extension>                                                                                                                                                
                                                                                                                                                                
    <extension name="7004">                                                                                                                                     
      <condition field="destination_number" expression="^7004$">                                                                                                
        <action application="set" data="ruri_profile=default"/>                                                                                                 
        <action application="set" data="ruri_user=2000"/>                                                                                                       
        <action application="set" data="ruri_contact=1001@${domain_name}"/>                                                                                     
        <action application="execute_extension" data="ruri"/>                                                                                                   
      </condition>                                                                                                                                              
    </extension>                                                                                                                                                

/b


On Jan 15, 2010, at 2:33 PM, Kristian Kielhofner wrote:

> Hello everyone,
> 
>  Is there (or can we get) a way to set the username portion of the
> request URI (along with To:) arbitrarily?  Obviously this can be done
> when specifying a bridge string but I'm wondering if it would be
> possible with registered contacts.  So...
> 
>  Let's say I have another FS/Asterisk/etc system registered with the
> username "gw".  Let's say I want to direct multiple DIDs to that
> registered endpoint.  I'd bridge to:
> 
> sofia/internal/gw%domain.local
> 
> (or whatever my domain was)
> 
>  The INVITE will go out with a destination URI of the registered
> contact.  Probably something like:
> 
> gw at 192.168.1.10 (assuming that's where I was registered)
> 
>  I'd like to be able to do something like:
> 
> {user_uri=9415551212}sofia/internal/gw%local.domain
> 
>  Before sending the INVITE to the device, FS/Sofia would replace the
> username portion in the RURI/To: with 9415551212, something like:
> 
> 9415551212 at 192.168.1.10
> 
>  Is this currently possible?
> 
>  Basically I don't want to have to independently register each DID in
> this scenario.
> 
> -- 
> Kristian Kielhofner
> http://www.astlinux.org
> http://blog.krisk.org
> http://www.star2star.com
> http://www.submityoursip.com
> http://www.voalte.com
> 
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list