Skip to content

[Feature request] Allow "Contact" field generation to discover public IP #26

@itay-sho

Description

@itay-sho

Hey, I am trying to compare a softphone app to gophone one in order to understand why I get timeouts when trying to create a call.
it seems like the "Contact" on the working softphone app looks like that:
Contact: <$ua@$MY_PUBLIC_IP:$hole_punched_port>

when using gophone I get:
Contact: <$ua@$MY_LAN_IP:$hole_punched_port>

I couldn't find a way to change it to my public IP, since "-l" flag finds interface by using the the ip provided, and because I am behind NAT it cannot work.
I tried to use -l to forward to a specific IP, port forward this port and override Contact using -sipheader flag, but my SIP provider didn't accept it either.
looking on the packet using Wireshark I noticed that this approach generated two "Contact" fields.
from my checks it seems like it behaves differently compared to To and From, on those fields it overwrites the existing field and not adding another one.

IMO, best approach here is to add another -i flag and not assume the interface from the listen address. this flag can be optional and will be exactly for this kind of a use case. without it everything will behave like today.

In case I missed something and there is a workaround (or an actual feature!) pleaese let me know.
thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions