[SR-Users] msilo on proxy in front of registrar

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 19 18:30:03 CET 2018


Hello,


On 15.03.18 22:41, Stefan Sayer wrote:
> Hello,
>
> I have a bit of a strange situation where I want to add SIP MESSAGE
> reliability (store and forward) for a proxy that is in front of the
> (message-wise unreliable) registrar/message originator. So I m_store
> MESSAGEs in the failure_route of MESSAGE requests.
>
> By default, msilo's m_dump works only for REQUEST_ROUTE, thus I can't
> use that in the 200 to REGISTER. But when I add a function to msilo
> for ONREPLY_ROUTE (without the check for MESSAGE support) it works.

m_dump() uses the From URI, so it is no reason not to work for a reply.
Likely this limitation comes from the planned use for registration
request processing.

>
> So, is there a reason that there's m_dump only for REQUEST_ROUTE? And,
> is this:
>   if ((msg->first_line).type == SIP_REQUEST)
> the correct way to check whether we're handling a request or reply?

If you don't handle other protocol, yes. Otherwise you can also add the
constraint with IS_SIP() or IS_SIP_REPLY() macros (iirc, you still need
to check if it is a SIP_REQUEST ...).
>
> Also, is there a way to check the expires of contacts in the 200 to
> REGISTER from the script, so I don't try to m_dump on de-REGISTER? Or
> does this have to go into the m_dump function for the ONREPLY_ROUTE case?
>
See:
https://www.kamailio.org/wiki/cookbooks/5.1.x/pseudovariables#expires_key_-_expires_values

Cheers,
daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com




More information about the sr-users mailing list