[SR-Users] Kamailio IMS: Contact validation during INVITE

Daniel-Constantin Mierla miconda at gmail.com
Tue Nov 24 12:22:45 CET 2015


Hello,

updated the subject of the email to reflect it refers to IMS extensions,
which are different than the standard IETF registrars.

That makes it easier to be spotted by the people using IMS and the dev
guys can shed some light on why the implemented that way.

Cheers,
Daniel

On 24/11/15 11:59, Prashant Desai wrote:
> Hi,
>
>  
>
>   We observe that the following kamailio API is trying to find out
> user registration by comparing source IP and port with stored contact,
> if it fails, then it compares based on incoming SIP msg contact uri.
>
>  
>
> is_registered(struct sip_msg* _m, udomain_t* _d){
>
>                getContactP(_m,_d);
>
> }
>
>  
>
> pcontact_t * getContactP(struct sip_msg* _m, udomain_t* _d) {);
>
>                                              //Getting pcontact from
> source IP and port
>
>                                              if
> (ul.get_pcontact_by_src(_d, &received_host, _m->rcv.src_port,
> _m->rcv.proto, &c) == 1) {
>
>                                                             LM_DBG("No
> entry in usrloc for %.*s:%i (Proto %i) found!\n", received_host.len,
> received_host.s, _m->rcv.src_port, _m->rcv.proto);
>
>                                              }
>
>                               if (c == NULL) {
>
>                                              //Getting pcontact from
> contact uri.
>
> if (ul.get_pcontact(_d, &ct->uri, &c) == 0) {
>
>                                                                           
>
>
>                                              }
>
>                               }
>
> We have use case where INVITE message is from same source IP and port
> but having unregistered contact.With this scenario,is_registered()
> will return success.         
>
> We would like to know reason behind comparing the source IP and port
> to fetch the pcontact?
>
>  
>
> Regards,
>
> Prashant
>
>
>
> _______________________________________________
> 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
Book: SIP Routing With Kamailio - http://www.asipto.com
Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151124/5446659e/attachment.html>


More information about the sr-users mailing list