Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request-Line change request in SRF #156

Open
commchip opened this issue Sep 9, 2023 · 3 comments
Open

Request-Line change request in SRF #156

commchip opened this issue Sep 9, 2023 · 3 comments

Comments

@commchip
Copy link

commchip commented Sep 9, 2023

Hello Dave,

I was trying to generate a SIP NOTIFY event using srf.request() function.
Since I am working in local setup (i.e. both clients and servers are reachable via IP Addresses only), the "uri" parameter in srf.request has to be an IP Address.

For example:

srf.request('sip:192.168.0.109:45456;transport=udp', {
        method: NOTIFY,
  headers: {
            'From': 'sip:[email protected]',
            'To': 'sip:[email protected]',

This generates the NOTIFY as

NOTIFY sip:192.168.0.109:45456;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.0.109: 45456;rport;branch=z9hG4bKFFF2BNKKjZptm
Max-Forwards: 70
From: <sip:[email protected]>;tag=eQj2te2c007cK

Although this event is formed correctly and is reaching the client, my understanding is that it does not exactly satisfy the RFC3261.According to RFC 3261, the request line should be of following grammar:

Request-Line = Method SP Request-URI SP SIP-Version CRLF

This in my understanding indicates that the uri present in NOTIFY packet – i.e. sip:192.168.0.109:45456;transport=udp – is not correct.

The question here is as follows:

Is it possible to update the REQUEST line of new event generated via srf.reqest() method where we can specify a SIP URI along with corresponding IP address/port so that the resulting event reaches the intended client as well as complying with Request line related rfc.

Thanks

@davehorton
Copy link
Collaborator

I think you are incorrect about the uri being invalid

NOTIFY sip:192.168.0.109:45456;transport=udp SIP/2.0

is a valid request line.

Beyond that, I do not understand the change that you want to see. Perhaps you can give an example of what you want the message to look like

@commchip
Copy link
Author

Hello Dave,

Thanks for the reply. What we want the message to look like is:

NOTIFY sip:[email protected] SIP/2.0

@davehorton
Copy link
Collaborator

Let's be clear first of all that there is no violation of RFC 3261.

Secondly, the uri appears exactly as you formatted it in the srf.request command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants