[Users] t_relay() with variables(proto:ip:port)
Daniel-Constantin Mierla
daniel at voice-system.ro
Tue Mar 27 15:54:16 CEST 2007
Hello,
duri must be a valid sip uri
"sip:username at domain;transport=xxx"
Cheers,
Daniel
On 03/27/07 16:48, Benko wrote:
> On Mon, 19 Mar 2007 18:21:33 +0200
> Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>
>
>> Hello,
>>
>> On 03/19/07 17:14, Benko wrote:
>>
>>> Hello!
>>>
>>> I would like to relay messages to a location("proto:ip:port") i
>>> retrieve from a db-table with avp_db_query, unfortunately t_relay
>>> doesn't allow using avps or pseudo-variables currently(iirc). Do you
>>> know a workaround without using t_relay or is there a way to use
>>> avps/pseudo-variables with t_relay() since 1.2?
>>>
>>>
>> you can do it via destiantion uri, which is a field in the internal
>> structure of a SIP message. You can access it from the script via
>> $duri (or $du) pseud-variable.
>>
>> $duri = "sip:openser.org";
>> t_relay();
>>
>> will send the request to openser.org nomater what is in the R-URI.=
>>
>
>
> Hello Daniel!
>
> Sorry for the late reply, i was absent a few days. $duri looks
> promising, however, i'm having trouble using it with tcp:
>
> Mar 27 13:23:03 [/sbin/openser] INSIDE-ROUTE5 LOG3 duri
> <tcp:6x.xxx.xxx.xx3:5060> time [Tue Mar 27 13:23:03 2007] method
> <INVITE> r-uri <sip:00498911112222 at test.domain.org>
> username <00498911112222> 2nd via <<null>>_
> Mar 27 13:23:03 [/sbin/openser]
> ERROR: parse_uri: bad uri, state 0 parsed: <tcp:> (4) /
> <tcp:6x.xxx.xxx.xx3:5060> (22)_
> Mar 27 13:23:03 [/sbin/openser] ERROR:
> uri2proxy: bad_uri: tcp:6x.xxx.xxx.xx3:5060_ Mar 27 13:23:03
> [/sbin/openser] ERROR:tm:t_forward_nonack: failure to add branches_
>
> i've been using it with $duri= "tcp:6x.xxx.xxx.xx3:5060" resp.
> avp-variables for the values. I can relay the invite when i use sip:
> instead of tcp:(Of course i get no answer as the other side only
> accepts sip over tcp), so far i'd be very happy to use duri. Is there a
> syntax to use duri with tcp in 1.2.0?
>
> Thanks
> Christian
>
>
>
More information about the sr-users
mailing list