[SR-Users] How to get Destination port UDP

Daniel-Constantin Mierla miconda at gmail.com
Tue Nov 8 14:16:53 CET 2016


Hello,

one way is to add an onsend_route and there use the $sndto(port) to
update the record inserted before.

Even better, set the dst addr/port when receiving the 200ok for initial
invite, this copes better when the INVITE is forked to many destinations
-- in this way you store only the one that answered.

Of course, the solution is also a matter when you need the dst port.

Cheers,
Daniel


On 08/11/16 12:23, andrzej.ciupek-asterisk.edu.pl wrote:
> Hello
>
> I am using Kamailio to collect data about active calls. I write
> INVITEs to database, and delete it on BYE or any REL.
> I would like to write source and destination port too, but don't know
> how to get destination port.
> I have tried variables:
>
> $dp, $rp, $Rp, $op
>
> But when I don't have port in URI like INVITE IP:PORT, $rp have
> default value of 5060.
>
> I would like to get real UDP port, that INVITE does to. Is it possible
> using PSEUDO VARIABLES?
>
> Greetings
> Andrzej
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com




More information about the sr-users mailing list