Fwd: [Users] uri:host

Ramin Dousti dousti at gmail.com
Wed Sep 20 16:17:50 CEST 2006


If you/someone could point me to a document as to how to manipulate the
SIP header programatically, I really appreciate it. All the documents I read
show  to set things with static values, for example, for send or forward it
shows forward("UDP:1.2.3.4:5060"), what if the decision making of what
protocol/dst/port should be used is a variable that should be determined
during the processing of the message itself. Let me give a concrete example:

I get a message destined for user at somedoamin.com, I need to be able to
determine the host for that domain, depending on what the host is I need to
use either TCP or UDP, besides let's say, somedomain.com resolves to
two IP addresses, I also need to try the first IP and if it fails (IP
connectivity-wise)
then I try the second one.

I really appreciate any pointer/assistance.

Ramin

On 9/20/06, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>
>
> On 09/19/06 23:21, Ramin Dousti wrote:
> > Thanks, Daniel.
> >
> > So according to the document forward_<proto>(host:port) becomes
> > foward(proto:host:port).
> >
> > But how should I then create a string which replaces the argument of
> > forward_tcp(uri:host):
> uri:host, uri:port have been eliminated, because when you give no
> parameter to forward(), same behavior happen. You can play with
> rewriteuri() or setdsturi() to make combinations of how to forward the
> request (or you can use avp_pushto() to achive similar results but with
> more flexible parameters).
>
> Cheers,
> Daniel




More information about the Users mailing list