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?
Thx Christian
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.
Cheers, Daniel
Thx Christian
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
On Mon, 19 Mar 2007 18:21:33 +0200 Daniel-Constantin Mierla daniel@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@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
Hello,
duri must be a valid sip uri
"sip:username@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@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@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
huh, that was fast ;-) thx
On Tue, 27 Mar 2007 16:54:16 +0300 Daniel-Constantin Mierla daniel@voice-system.ro wrote:
Hello,
duri must be a valid sip uri
"sip:username@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@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@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
never mind, got it working with
avp_printf("$avp(to_destination)", "sip:$avp(to_ip):$avp (to_port);transport=tcp"); $duri= $avp(to_destination);
thx for your kind support Christian
Hi Benko,
do the new support for script variables, you can write that even simpler: $duri= "sip:"+$avp(to_ip)+":"+$avp(to_port)+";transport=tcp";
regards, bogdan
Benko wrote:
never mind, got it working with
avp_printf("$avp(to_destination)", "sip:$avp(to_ip):$avp (to_port);transport=tcp"); $duri= $avp(to_destination);
thx for your kind support Christian
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Ah, cool, thx!
On Fri, 30 Mar 2007 16:56:29 +0300 Bogdan-Andrei Iancu bogdan@voice-system.ro wrote:
Hi Benko,
do the new support for script variables, you can write that even simpler: $duri= "sip:"+$avp(to_ip)+":"+$avp(to_port)+";transport=tcp";
regards, bogdan
Benko wrote:
never mind, got it working with
avp_printf("$avp(to_destination)", "sip:$avp(to_ip):$avp (to_port);transport=tcp"); $duri= $avp(to_destination);
thx for your kind support Christian
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users