mojolingo / sippy_cup

Create SIP load test scenarios the easy way
http://mojolingo.github.io/sippy_cup
MIT License
218 stars 78 forks source link

GRUU Support for REGISTER #17

Open bklang opened 11 years ago

bklang commented 11 years ago

From @saghul:

@bklang When registering, the To header needs to contain the AoR to which we are registering, it's typically the same as the From, unless third-party registration is taking place.

About GRUU. When using GRUU, one needs to indicate the instance id in the contact header:

Contact: <sip:hui4hf9h4f9@192.0.2.1>;+sip.instance="<urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6>"

Then the 200 OK will contain the public and temporary GRUUs, if supported:

Contact: <sip:hui4hf9h4f9@192.0.2.1>;pub-gruu="sip:saghul@sip2sip.info;gr=urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6";temp-gruu="sip:tgruu.7hs==jd7vnzga5w7fajsc7-ajd6fabz0f8g5@sip2sip.info;gr";+sip.instance="<urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6>";expires=3600

Now, if the proxy supports GRUU and someone dials sip:saghul@sip2sip.info;gr=urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6 only this instance will ring, it will not fork.

bklang commented 11 years ago

Two more comments:

So to your question about GRUU, we would need to modify the Contact header in the REGISTER request to include a supplied UUID? I think we can accommodate that.

Yes, oh, and also add a "Supported: gruu" header, that will do. If the server supports GRUU it will send them in the 200 OK, else you'll get the usual response. In case you want to know all the details: http://tools.ietf.org/html/rfc5627#section-9 but there is not much to it from the client side.