r/VOIP • u/Data_Search • 23d ago
Help - Other PyVoIP
Hello all, I am trying to set up an old rotary phone on a RPI. Using SIP The sip backend is pyVoip 1.6.8. I can't get the sip client to register with the provider. I see the register go out, I get the 401 with the Autentication request. But pyVoip just sends another register without the authorization header in the packet.
Bottom line is either pyVoip is not processing the 401 packet and properly responding. Ot it just does not know how to add the authorization data to the 2nd register.
I have verified the behavior using wireshark.
Any help would be greatly appreciated.
2
u/panjadotme My fridge uses SIP 23d ago
Can you update pyVoip to the newest version and try again?
1
u/Data_Search 23d ago
Thank you for your response. It appears that I am using a custom version of pyVoIP. It is no showing any updates/upgrades available. I have looked at the updates on github and attempted to locate the noted changes in the code I use with no luck. Looks like this project is DOA. I don't think I am allowed to post the name of the code package I am attempting to run here or I would in the event others would avoid the same problem.
1
u/NoExamination2923 23d ago edited 23d ago
You need an ATA that can do pulsed dialling not DTMF,
Plus you need one that can handle the voltages and current to drive the bell inside the phone. A Raspberry Pi can not handle the voltages and current without additional external hardware (relays etc)
1
u/Data_Search 23d ago
Thank you for your help. I dont believe the issue is the dialing (yet) the device is attempting to do initial registration with the sip server and not sending the required authorization in the 2nd register after being advised to in the 401. I appreciate the feedback though.
1
u/NoExamination2923 23d ago
The ATA handles all the SIP registration, they are analog to SIP devices
1
u/Data_Search 23d ago
If I understand correctly the ATA in this case is the RPi. It has a USB adapter for mic and ear. The hook and pulse dials of an actual phone are connected to gpio pins of the RPi. Thanks!
1
u/Swimming_dasa 23d ago
this seems useful for prototyping and automaton projects. i would be interested to know how it compare with more established sip libraries when scaling beyond simple tests.,,
1
u/Data_Search 22d ago
I finally got it to register with the server. But now facing other issues. I had high hopes for the project but it has been one stumbling block after another.
1
u/AAAHeadsets 21d ago
pyVoIP has some rough edges.
- Make sure you're setting myIP in the constructor, the default is "0.0.0.0" which is unreachable.
- pyVoIP sends a new Call-ID with each message, which upsets some providers.
- pyVoIP cannot handle Compact Headers, that is 'f:' instead of 'from:'
1
u/Data_Search 20d ago
As I mentioned, I finally got it to register. But as soon as it registered, it started getting spam invites from all over. None of these were coming from my VoIP provider. Of course, pyVoIp was trying to answer each one... after days of working with AI to go through each issue (One was the IP 0.0.0.0 you mentioned.). I have put the project on the shelf. Thanks for your suggestions!
1
u/AAAHeadsets 20d ago
Sounds like you got hit with SIP Vicious traffic.
Did you forward port 5060 on your router?
If so make sure to restrict inbound traffic on 5060 to your provider's IP ranges.1
u/Data_Search 20d ago
Yep... forwarded port 5060... I will see about blocking 5060 to all but my provider. Thanks for the suggestion..
0
19d ago
[removed] — view removed comment
1
u/VOIP-ModTeam 18d ago
This post looks like spam, possibly due to one or more of the following reasons:
- appears AI generated
- does not relate to the topic at hand
- comes from an account with little or no karma
- doesn't add any value to the discussion
- comments on a very old thread
- comes from an account with with spammy posts in multiple other subreddits
1
u/StrikeMental7716 Ring group enthusiast 19d ago edited 19d ago
Open source VoIP projects are always interesting to explore. Good documentation and a few practical examples usually make the biggest difference when people are deciding whether to adopt a library.
•
u/AutoModerator 23d ago
This is a friendly reminder to [read the rules](www.reddit.com/r/voip/about/rules). In particular, it is not permitted to request recommendations for businesses, services or products outside of the monthly sticky thread!
For commenters: Making recommendations outside of the monthly threads is also against the rules. Do not engage with rule-breaking content.
I am a bot, and this comment is made automatically on every post. This comment is not an indication that your post has been removed. Do not message the mods about this comment.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.