[Kamailio-Users] add uri as a special header

Juan Asencio juan at asencio.dk
Fri Feb 20 14:18:50 CET 2009


Hi Daniel,

I tried to add the new uri from carrierroute as a special header.

But I can't figure it out how to do it. Do you have an example or can you
point me where I could find the information about it?

Now I forward the invite to the gateway IP address, but I'm not sure if
the new assigned uri by cr is on the header. How can I see that?

The address 50.118 is my x-lite, 50.93 is Kamailio and 50.114 is my gateway

U 192.168.50.118:60560 -> 192.168.50.93:5060
INVITE sip:456789 at 192.168.50.93 SIP/2.0.
Via: SIP/2.0/UDP
192.168.50.118:60560;branch=z9hG4bK-d8754z-0924d953ee50f428-1---d8754z-;rport.
Max-Forwards: 70.
Contact: <sip:1002 at 192.168.50.118:60560>.
To: "456789"<sip:456789 at 192.168.50.93>.
From: "1002"<sip:1002 at 192.168.50.93>;tag=2a692168.


U 192.168.50.93:5060 -> 192.168.50.118:60560
SIP/2.0 100 Giving a try.
Via: SIP/2.0/UDP
192.168.50.118:60560;branch=z9hG4bK-d8754z-0924d953ee50f428-1---d8754z-;rport=60560.
To: "456789"<sip:456789 at 192.168.50.93>.
From: "1002"<sip:1002 at 192.168.50.93>;tag=2a692168.

U 192.168.50.93:5060 -> 192.158.50.114:5060
INVITE sip:456789 at 192.168.50.93 SIP/2.0.
Via: SIP/2.0/UDP 192.168.50.93;branch=z9hG4bK81cd.0e7f7944.0.
Via: SIP/2.0/UDP
192.168.50.118:60560;branch=z9hG4bK-d8754z-0924d953ee50f428-1---d8754z-;rport=60560.
Max-Forwards: 69.
Contact: <sip:1002 at 192.168.50.118:60560>.
To: "456789"<sip:456789 at 192.168.50.93>.
From: "1002"<sip:1002 at 192.168.50.93>;tag=2a692168.

This is my log:


Feb 20 14:47:57 localhost /sbin/kamailio[18371]: time [Fri Feb 20 14:47:57
2009] method (INVITE) r-uri (sip:456789 at 192.168.50.93) 2nd via (<null>)
Feb 20 14:47:57 localhost /sbin/kamailio[18371]:
INFO:carrierroute:cr_do_route: uri 456789 was rewritten to
sip:456789 at host5.dk-ws
Feb 20 14:47:57 localhost /sbin/kamailio[18371]:
ERROR:tm:t_forward_nonack: no branch for forwarding
Feb 20 14:47:57 localhost /sbin/kamailio[18371]: ERROR:tm:w_t_relay:
t_forward_nonack failed
Feb 20 14:47:57 localhost /sbin/kamailio[18371]: time [Fri Feb 20 14:47:57
2009] method (INVITE) r-uri (sip:456789 at host5.dk-ws) 2nd via (<null>)
Feb 20 14:48:27 localhost /sbin/kamailio[18377]:
CRITICAL:tm:t_should_relay_response: pick_branch failed (lowest==-1) for
code 408

Cheers,

Juan.-

> Hello,
>
> your issue has nothing to do with a call stateful server.
>
> You simply do record route in your config so for within dialog requests
> the routing is don properly.
>
> For initial invite, I assume (as I never used it) carrierroute sets the
> R-URI so you just use:
>
>  t_relay("udp:asteriskip:asteriskport");
>
> and in asterisk you dial the address in the r-uri.
>
> If carrierroute is setting the dst_uri, then add it as special header,
> use same to forward to asterisk, but there use the special header to
> dial out.
>
> Cheers,
> Daniel





More information about the Users mailing list