Search code examples
sipvoipfreeswitchlinphone

Multiple contact headers in 200OK response for a Register request


I am using a Linphone mobile app on android and a Freeswitch server for Audio/video calls.

Now when Linphone sends a Register request to server it gets multiple contact headers in the 200OK response from the Freeswitch Server.

**Contact: ;expires=3211 **Contact: ;expires=3303 **Contact: ;expires=3475 **Contact: ;expires=3600

Because of these bindings,server tries to send invite to multiple contacts for B-leg at the time of call. Can somebody help me with the probable cause for multiple contact headers in 200OK from server side?


Solution

  • RFC 3261 states in 10.2.4 Refreshing Bindings:

    The 200 (OK) response from the registrar contains a list of Contact fields enumerating all current bindings.

    Multiple bindings for a single AOR can be registered

    • by different SIP instances, each registering their own contact address, and/or
    • by a single SIP instance when it has multiple contact addresses
    • by a single SIP instance when it registers its new contact address without first unregistering its previous (outdated) address

    Looking at your comment it appears the same number (1008) is registered with multiple IP addresses. You should check the REGISTER request(s) your Linphone app sends:

    • If it contains multiple contact addresses then the host your app runs on is multihomed.
    • If it registers different contact addresses in subsequent sessions you could consider unregistering a contact address before ending a session.
    • Otherwise probably other SIP phones in the system register with the same number.

    Update: Extended answer to reflect comment by @artemy-vysotsky