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

Create new request from incoming request #38

Closed
moksh-samespace opened this issue Aug 30, 2023 · 2 comments
Closed

Create new request from incoming request #38

moksh-samespace opened this issue Aug 30, 2023 · 2 comments

Comments

@moksh-samespace
Copy link

Is it possible to generate a new SIP request based on an existing one, preserving attributes such as Call ID and body, while only modifying the 'To', 'From' and 'Contact' fields to align with the proxy's requirement for forwarding to the client?

@emiago
Copy link
Owner

emiago commented Aug 30, 2023

Updating those headers is straight forward as they are parsed specially due to other modules.
So there is no special function YET, but also depending on strict vs loose routing could be some special functions added.
For now you can easily access those headers
`to = req.To()
from = req.From() .
or using GetHeader func.

to, from, contact are parsed specially and have predefined objects you can find in
sip.ToHeader ....

So updating them will be easy., like changing host port etc

In any case I see maybe some room to have special functions that wrap but hard to make those generic.

@moksh-samespace
Copy link
Author

Thanks for help

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