Closed maciasr closed 1 year ago
Thank you for your help.
Hello,
It seems that the environmental variables are not set. Is that screenshot from a Windows machine? If so, I believe under Windows you need to use "set" and not "export", but I'm not an expert:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/set_1
Thank you the environment variable did the trick. however I'm still facing issue with the granstream. I opened a ticket with them, below is a copy of the trace. I thank you very much.
Grandstream claims that the issue since to be the RTP out port 5xxxx coming from the computer. I tried different versions of Windows. On W7 I'm getting partial response but breaks on W10 works a little better but breaks too. On W11 does not work at all. Just bought a raspberry pi will advise how it goes..
Below is grandstream respond..
Francisco @September 14, 2023 11:19
We suspect there is some misconfiguration at the rotaryGPT. It is sending RTP out of a port in 5xxxx, and is imposing the HT send to port 5004. The RTP port for sending and receiving ought to be the same one.
Can you please link to the full conversation with them? I'd like to see what you sent them.
I've the same issue with the Granstream HT801 (hardware version: v6.0A / software version: v1.0.49). Audio is (always) getting cut off during the greeting. Only "Hello" is audible, thenafter all following receiving audio (from the RTP queue) is ignored / trashed / etc.
Voice commands back to Rotary-GTP work fine; answers are created, sent back, but again not audible.
Then i've hooked up a Gigaset E630A GO, made a direct IP call to Rotary-GTP, and everything works right out of the box....
Something with the Granstream HT801 is incorrectly set / parameterized. Already tried several settings but without success so far.
I'm sorry you're having a trouble here. I suspect that the hardware version might be a culprit, yours is much newer than mine.
As I wrote in #1, I think it would be useful to run debugging on the HT801: https://www.loom.com/share/a480ec34037944649282994a1a42cf4a?sid=ce15ddba-bb28-4d7d-abea-d701c5e14cba
This might reveal some issues.
No problem. Thanks. I saw the debug option as well.
I will continue testing/debugging and/or hook up a Cisco ATA.
As for using Rotary-GPT with home automation.... Have you ever thought about creating an interface for Home Assistant (https://developers.home-assistant.io/docs/api/rest/)? That would be great!
I'm not familiar with Home Assistant, I only made connectors for stuff I own/use but contribs are welcome! Let me know if I can help with the debug! It's exciting to hear you're setting up RotaryGPT!
Attached is my interaction with Grandstream.
I've the same issue with the Granstream HT801 (hardware version: v6.0A / software version: v1.0.49). Audio is (always) getting cut off during the greeting. Only "Hello" is audible, thenafter all following receiving audio (from the RTP queue) is ignored / trashed / etc.
Voice commands back to Rotary-GTP work fine; answers are created, sent back, but again not audible.
Then i've hooked up a Gigaset E630A GO, made a direct IP call to Rotary-GTP, and everything works right out of the box....
Something with the Granstream HT801 is incorrectly set / parameterized. Already tried several settings but without success so far. Same exact device.
So, I've done some debugging with different logging levels... The most detailed debug logging level is quite cryptic, and no documentation for it is available anywhere. I saw some RTCP buffer issues. Which may disrupt the RTP setup process.
I disagree with Grandstream Helpdesk's response. Each side in a bidirectional RTP session assigns their source ports independently. Each side in a unicast session simply indicates to the other side where it wants to receive RTP packets.
Today I tested a Cisco ATA 191/192. This works instantly with factory default settings.
Also "off-hook auto dial" is possible with this ATA device. My dial plan setting is (where xxx are ip address decimals):
(P0 <:xxx.xxx.xxx.xxx:5060>)
For now I'm happy with (the more robust) Cisco ATA.
So, I've done some debugging with different logging levels... The most detailed debug logging level is quite cryptic, and no documentation for it is available anywhere. I saw some RTCP buffer issues. Which may disrupt the RTP setup process.
I disagree with Grandstream Helpdesk's response. Each side in a bidirectional RTP session assigns their source ports independently. Each side in a unicast session simply indicates to the other side where it wants to receive RTP packets.
Today I tested a Cisco ATA 191/192. This works instantly with factory default settings.
Also "off-hook auto dial" is possible with this ATA device. My dial plan setting is (where xxx are ip address decimals):
(P0 <:xxx.xxx.xxx.xxx:5060>)
For now I'm happy with (the more robust) Cisco ATA.
Same issues with Grandstream so I tried using a Cisco ATA 192 and followed the same dial plan setting with my RPI's IP address but it doesn't seem to be calling out to my Raspberry PI. Anything else in the menu that I need to change for it to work?
Yes, i forgot to mention that you need to set "Make Call Without Reg:" to "Yes" in section "Proxy and Registration" settings for "Line 1" or "Line 2".
Hi, Thank you for your reply unfortunately I don't see that entry on FXS port session of the HT801 device.
[A screenshot of a computer Description automatically generated]
From: dick-nds @.> Sent: Thursday, September 21, 2023 4:22 AM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Manual @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
Yes, i forgot to mention that you need to set "Make Call Without Reg:" to "Yes" in section "Proxy and Registration" settings for "Line 1" or "Line 2".
- Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1729085407, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QB6EGAS5KU6E7FU4D3X3P2KVANCNFSM6AAAAAA4HWEL5A. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>
It's was mentioned for the Cisco ATA (in reply to @tusabez).
I disagree with Grandstream Helpdesk's response. Each side in a bidirectional RTP session assigns their source ports independently.
I agree with @dick-nds here, Grandstream's response is strange.
@raulmaciascam have you been able to debug HT801 as suggested in #1? I'd love to see that log.
I will try and post the results.
@dick-nds That did the trick! Thanks! @tcz If I wanted to change the default voice to American English and pick a server in the Western United States, would I need to make changes just in aws.py? I'm still new to this type of project so trying to figure things out.
Yes, changing this line
self.target_host = "polly.eu-west-1.amazonaws.com"
Should change the region. I guess it could have been a parameter.
Regarding the voice, indeed, change this line:
default_voice = "Daniel"
It's important that you need to pick a voice that supports Neural Voice. Here's the full list: https://docs.aws.amazon.com/polly/latest/dg/voicelist.html
Hi
Can you share pictures of your ATA 191/192 settings. Got me one but cant get it to work.
From: Zoltan Toth-Czifra @.> Sent: Wednesday, September 27, 2023 1:54 PM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Mention @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
Yes, changing this line
self.target_host = "polly.eu-west-1.amazonaws.com"
Should change the region. I guess it could have been a parameter.
Regarding the voice, indeed, change this line:
default_voice = "Daniel"
It's important that you need to pick a voice that supports Neural Voice. Here's the full list: https://docs.aws.amazon.com/polly/latest/dg/voicelist.html
- Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1737839654, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QBAZTMQIWP57L664ADX4RR2NANCNFSM6AAAAAA4HWEL5A. You are receiving this because you were mentioned.Message ID: @.**@.>>
Log from HT801 below..
<15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.485465 LIBGSDSP: CSS: RTPSTART: dec_chan=0, coderTypeDec = 46, status = 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.492825 LIBGSDSP: CSS: RTPSTART: enc_chan=1coderTypeEnc = 46, status = 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.493362 LIBGSDSP: CSS: Value of sid_update for G711 is 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.498513 LIBGSDSP: CSS: pLineData->dwCapabilities = 3146059, pLineData->dec_chan = 0, jib_instance = 180a <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.498866 LIBGSDSP: CSS: @@@@@ Value of pktsize 10 ms is 1 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.499340 LIBGSDSP: CSS: @@ ### JB ADAPTATION TYPE is ENABLED <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.499553 LIBGSDSP: CSS: The MAX JIB value received from User space 1000 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.499748 LIBGSDSP: CSS: The ADAPTATION TYPE value received from User space 1 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.504103 LIBGSDSP: CSS: The RESYNCRONISATION THRESHOLD received from User space 3 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.504476 LIBGSDSP: CSS: The TARGET PLAYOUT DELAY received from User space 20 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.507813 LIBGSDSP: CSS: The MONITORING INTERVAL value received from User space 2000 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.508364 LIBGSDSP: CSS: The ADAPTATION STEPSIZE RESET TIME value received from User space 60 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.508596 LIBGSDSP: CSS: The ADAPTATION SLOPE value received from User space 24 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.508799 LIBGSDSP: CSS: The POST ADAPTATION STEP SIZE MEDIUM value received from User space 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.509160 LIBGSDSP: CSS: The POST ADAPTATION STEP SIZE value received from User space 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.509396 LIBGSDSP: CSS: The MIN JIB value received from User space 120 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.509595 LIBGSDSP: CSS: The JIB has been initialized to this 23926b8 for line id 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.520238 LIBGSDSP: CSS: Function p_rtpapp_Start;Line 1848; STATE 2 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.520608 LIBGSDSP: CSS: Line variables: bBufSize: 160;bDecFrameSize: 80;bDecPackedFrameSize: 80;bFrameSize: 80;bPackedBufSize: 160, bPackedFrameSi <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.520748 LIBGSDSP: ze: 80 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.521155 LIBGSDSP: CSS: voice_request_start_chan returning 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.521414 LIBGSDSP: CSS: In API callback event = 281, inst = 1 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.521627 LIBGSDSP: CSS: p_rtpapp_AUCCallback is getting called <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.521824 LIBGSDSP: CSS: p_rtpapp_AUCMssgHandler: Encoder chan 1 started for line 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.522176 LIBGSDSP: CSS: In API callback event = 281, inst = 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.528446 LIBGSDSP: CSS: p_rtpapp_AUCCallback is getting called <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.528730 LIBGSDSP: CSS: p_rtpapp_AUCMssgHandler: Decoder chan 0 started for line 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.529094 LIBGSDSP: CSS: p_rtpapp_SetSesionStatus: started decoder and encoder for line 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.529346 LIBGSDSP: CSS: ##### AUC Channel started sending COMA REPLY ##### <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.529556 LIBGSDSP: CSS: Function create_voice_message; Sending coma response 5 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.535437 LIBGSDSP: CSS: Function p_rtpapp_SetSesionStatus;Line 703; STATE CHANGE: to 3 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.538246 LIBGSDSP: CSS: voice_request_start_rtcp:756: Calling voice_start_rtcp <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.538535 LIBGSDSP: CSS: Function p_rtpapp_RtcpStart;Line 151; Calling p_rtcp_SessionInit <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.538751 LIBGSDSP: CSS: rtcp interval 5 and opts flag 19 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.539088 LIBGSDSP: CSS: ### p_rtcp_SessionInit 5 opts 19 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.544595 LIBGSDSP: CSS: The RTCP Feedback type is '0' fb_bw '0' fb_trr_interval '0' max_rtt 0 and sizeof RTCP_config 816 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.544880 LIBGSDSP: CSS: Session RB TYPE :: 255 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.545291 LIBGSDSP: CSS: AFTER COPY TO rtcpsession interval 5 opts 19 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.545511 LIBGSDSP: CSS: The RTCP XR - thining 3 & gmin 16 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.546221 LIBGSDSP: CSS: p_rtcp_xr_SessionInit function called ---- Number Of SIP SESSIONS '8' <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.546483 LIBGSDSP: CSS: p_rtcp_xr_SessionInit called with Gmin : 16 and Thining : 3 value <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.551348 LIBGSDSP: CSS: Modes of RTCP 19 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.551718 LIBGSDSP: CSS: ######## RTCP interval given from user space 5 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.552145 LIBGSDSP: CSS: p_rtcp_xr_SessionStart function called ---- <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.555197 LIBGSDSP: CSS: Function create_voice_message; Sending coma response 14 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.555492 LIBGSDSP: CSS: p_rtp_SeqInit 75 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364491.560415 LIBGSDSP: CSS: p_rtp_SeqInit 77 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.645840 SigCtrl::performRegistration on acct 0, Registered: 1, proxyUrl: 254.255.107.58.site.sil6.broadviewnet.net, preferPrimary:0, perfer Primary <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG OBP:0, obpIndex:0, failbackTimer: 0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.651109 SigCtrl::performRegistration on acct 0, reset clear reachable flag to true <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.656127 SIPStack(0)::cb_snd_message, host=212232ABJJ.sil6.broadviewnet.net, original port=5060 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.656429 SIPStack(0)::cb_snd_message: t retry count =1 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.656638 SIPStack(0)::snd_message, dst port:5060 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.656880 SIPStack(0)::snd_message: Copy registrarIP[] to registrarIPAddr: 216.214.56.86, port: 5060 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.659464 Line 452, DNS::lookup, Fetch DNS A record from preferred IP[0] for host 212232ABJJ.sil6.broadviewnet.net, IP: 216.214.56.86, port =5060 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.659785 SIPStack(0)::snd_message: UDP case. setNetworkConnected <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.660200 SIPStack(0)::snd_message: Present IP: 216.214.56.86, port: 5060 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.660427 SIPTransaction::setTargetIPandPort, host: 212232ABJJ.sil6.broadviewnet.net, IP: 216.214.56.86, port: 5060 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.660651 Line 452, DNS::lookup, Fetch DNS A record from preferred IP[0] for host 212232ABJJ.sil6.broadviewnet.net, IP: 216.214.56.86, port =5060 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.660836 SIPStack(0)::snd_message: Save registrarIP: 216.214.56.86, registrarPort: 5060 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.661730 SIPStack(0)::snd_message, update credential successful for server IP: 216.214.56.86 <14> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.INFO 1696364494.665323 SIPClientTransaction::sendRequest: Request 362 is sent <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG 1696364494.674130 SIPStack(0)::snd_message:(973)REGISTER sip:254.255.107.58.site.sil6.broadviewnet.net SIP/2.0 <15> HT801 [c0:74:ad:ca:6f:20] [1.0.49.2] GS_ATA: USER.DEBUG Via: SIP/2.0/UDP 254.255.107.58:5060;branch=z9hG4bK1904225867;rport Route:Got the Cisco device recommended no voice in either direction. Grandstream device I got voice outgoing but not incoming. I can see the replies from ChatGPT on the console but cant hear..
I am having the same issue with my HT801 (Hardware version: V1.1C). The sound is cut off during the greeting. No sound on polly playback. Mic works the whole time and I can see the response in the console but no audio playback after the greeting is cut short.
I can also add that it doesn't always cut out at the same time. I have a custom greeting.pcm that is a bit longer. A few times I've got the complete message, but most of the time it cuts mid-message.
I have tried with a software phone, MicroSIP, then I can hear the full greeting every time, but I still have not managed to get it to detect silence when calling from that program, so I have not been able to verify that polly sounds works.
@maciasr is that log from a RotaryGPT call? What's "Tech Room"
@Mikklo I'd maybe try to change the Jitter Buffer Length setting to High under the FXS PORT tab on the HT801 config but this really shouldn't be an issue.
hi,
yes I used the video that you provided to get the logs. At this point I think is a network problem seems the Grandstream device works one way and the cisco device not at all. I bought Raspberry pi, but still the same issue. I also bought the cisco device to tried but it did not work either. I still see the same message "polly sending to rtp" but no audio is heard.
Regards, Raul
From: Zoltan Toth-Czifra @.> Sent: Wednesday, October 4, 2023 5:22 PM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Mention @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
@maciasrhttps://github.com/maciasr is that log from a RotaryGPT call? What's "Tech Room"
@Mikklohttps://github.com/Mikklo I'd maybe try to change the Jitter Buffer Length setting to High under the FXS PORT tab on the HT801 config but this really shouldn't be an issue.
— Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1747660768, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QAWNFK63XMOZJKMTHLX5XHQRAVCNFSM6AAAAAA4HWEL5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBXGY3DANZWHA. You are receiving this because you were mentioned.Message ID: @.***>
@tcz Yeah, already tried that. I have a bit newer software version so not all settings match your screenshots, but I have matched them as far as possible and then played around with the extra settings I have that aren't in your screenshots but no success. I was really hoping to find a solution, so I don't have to go and buy another APA.
The reason it's so hard for me to debug this is that this seems to be an issue with the later hardware versions and it works perfectly on my earlier HT801. I looked at buying a new one but they only sell HT802 here for some reason.
I can mail you my HT801 and see if it works with that to discard other stuff like network.
Wow, that's so kind of you. I will mail it back to you or mail you a new one, just let me know your address. My address is below.
Raul Macias 45 Broadway, 25th Floor New York, NY 10006
From: Zoltan Toth-Czifra @.> Sent: Thursday, October 5, 2023 7:53 AM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Mention @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
The reason it's so hard for me to debug this is that this seems to be an issue with the later hardware versions and it works perfectly on my earlier HT801. I looked at buying a new one but they only sell HT802 here for some reason.
I can mail you my HT801 and see if it works with that to discard other stuff like network.
- Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1748733138, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QAMCPXIFMEFUEQKCO3X52NSFAVCNFSM6AAAAAA4HWEL5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBYG4ZTGMJTHA. You are receiving this because you were mentioned.Message ID: @.**@.>>
Where do you configure auto dial on Cisco ATA 191/192?
From: RaspiPico Noob @.> Sent: Wednesday, September 20, 2023 7:03 PM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Manual @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
So, I've done some debugging with different logging levels... The most detailed debug logging level is quite cryptic, and no documentation for it is available anywhere. I saw some RTCP buffer issues. Which may disrupt the RTP setup process.
I disagree with Grandstream Helpdesk's response. Each side in a bidirectional RTP session assigns their source ports independently. Each side in a unicast session simply indicates to the other side where it wants to receive RTP packets.
Today I tested a Cisco ATA 191/192. This works instantly with factory default settings.
Also "off-hook auto dial" is possible with this ATA device. My dial plan setting is (where xxx are ip address decimals):
(P0 <:xxx.xxx.xxx.xxx:5060>)
For now I'm happy with (the more robust) Cisco ATA.
Same issues with Grandstream so I tried using a Cisco ATA 192 and followed the same dial plan setting with my IP address but it doesn't seem to be calling out to my Raspberry PI. Anything else in the menu that I need to change for it to work?
- Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1728532906, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QFKYUAULPLKNHCHUPDX3NY37ANCNFSM6AAAAAA4HWEL5A. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>
Hi, any setting that we can modify to fixed that as it works on old HT801 devices.
Thank you,
From: Grandstream Help Desk @.> Sent: Thursday, October 5, 2023 4:58 PM To: Raul Macias @.> Subject: Our Engineers have added a comment to Ticket 20230908155004
There is a reply for Ticket 20230908155004
Dear Raul Macias,
Our engineers have replied to ticket 20230908155004.
Ticket Title: Audio Gets cuts off
Reply:
The port that rotary app proposes is 5004, and the audio is coming out of that app on port 55995. This the HT accepts in the beginning but then it locks on listening on audio coming from 5004 only.
Please check the ticket HEREhttps://helpdesk.grandstream.com/users/show_ticket/333116.
*** Please do not respond to this email regarding the support ticket, please respond directly through your HelpDesk account.
Thanks and have a great day!
@tcz I'm no expert on python and don't really know anything about RTP traffic. But I have a hard time seeing how it would end with audio on port 55995 as per grandstreams response to @raulmaciascam
Could it somehow be that newer versions of HT801 somehow doesn't read the body of the 200 response properly and doesn't get the m=audio 5004 RTP/AVP 0
part where port 5004 is specified?
I will have to try and get debug logging working properly during the weekend. My debug log looks more like what @maciasr posted and not like the logs you get in your video. It does not show the 200 response from the RotaryGPT application at all.
Please see attached Wireshark capture. Grandstream HT801 device 192.168.10.169 SIP server=192.168.10.176 RTP traffic keeps selecting random ports to communicate from the SIP server. Any way to force the server to only use port 5004 to communicate to Ht801?
From: Mikklo @.**@.>> Sent: Friday, October 6, 2023 9:40 AM To: tcz/rotary-gpt @.**@.>> Cc: Raul Macias @.**@.>>; Mention @.**@.>> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
@tczhttps://github.com/tcz I'm no expert on python and don't really know anything about RTP traffic. But I have a hard time seeing how it would end with audio on port 55995 as per grandstreams response to @raulmaciascamhttps://github.com/raulmaciascam Could it somehow be that newer versions of HT801 somehow doesn't read the body of the 200 response properly and doesn't get the m=audio 5004 RTP/AVP 0 part where port 5004 is specified?
I will have to try and get debug logging working properly during the weekend. My debug log looks more like what @maciasrhttps://github.com/maciasr posted and not like the logs you get in your video. It does not show the 200 response from the RotaryGPT application at all.
- Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1750700890, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QFCXUGBLJWDUKOGBP3X6AC33AVCNFSM6AAAAAA4HWEL5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQG4YDAOBZGA. You are receiving this because you were mentioned.Message ID: @.**@.>>
Grandstream's answer makes very little sense to me.
See the comment from @dick-nds here: https://github.com/tcz/rotary-gpt/issues/2#issuecomment-1726595755
RTP is a full-duplex protocol, meaning there's a separate socket for receiving as well as sending audio. Each UDP socket is defined by a two IP-address-port pairs. One of the receiver and the other one of the sender. The sender may assign an ephemeral port (meaning randomly chosen, usually from the higher port numbers) to send the data out of. The receiver usually assigns a fix port so that the sender knows where to send to. The sender's ephemeral port is typically transparently assigned by the operating system, since usually there's no reason to choose this manually at all.
An example socket could be: [192.168.1.2][5555] <--- [192.168.1.3][56789]
In case of RotaryGPT, we have two sockets (again, RTP is full-duplex):
During the SIP session both sides exchange port numbers using Session Description Protocol (SDP). The port numbers they exchange are the ones they expect the other party to connect to. It has nothing to do with the ephemeral ports used by the socket.
HT801 sends an INVITE SIP request to the RaspberryPi and in it it includes the protocols and ports it accepts the connection to (using the format defined by SDP). RotaryGPT parses this and extracts HT801's port to connect to, in this format:
r"audio (\d+) RTP"
This is the port RTPSender will connect to.
It also sends back its own port where it expect HT801 to connect. It case of RotaryGPT it's fix 5004. This is the port RTPReceiver will listen on.
Nowhere in this process the ephemeral ports play a part. This is why I'm very confused about Grandstream's response.
FYI- Grandstream just attached this two files to the case no explanation.
From: Zoltan Toth-Czifra @.> Sent: Friday, October 6, 2023 10:27 AM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Mention @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
Grandstream's answer makes very little sense to me.
See the comment from @dick-ndshttps://github.com/dick-nds here:
RTP is a full-duplex protocol, meaning there's a separate socket for receiving as well as sending audio. Each UDP socket is defined by a two IP-address-port pairs. One of the receiver and the other one of the sender. The sender may assign an ephemeral port (meaning randomly chosen, usually from the higher port numbers) to send the data out of. The receiver usually assigns a fix port so that the sender knows where to send to. The sender's ephemeral port is typically transparently assigned by the operating system, since usually there's no reason to choose this manually at all.
An example socket could be: [192.168.1.2][5555] <--- [192.168.1.3][56789]
In case of RotaryGPT, we have two sockets (again, RTP is full-duplex):
During the SIP session both sides exchange port numbers using Session Description Protocol (SDP). The port numbers they exchange are the ones they expect the other party to connect to. It has nothing to do with the ephemeral ports used by the socket.
HT801 sends an INVITE SIP request to the RaspberryPi and in it it includes the protocols and ports it accepts the connection to (using the format defined by SDP). RotaryGPT parses this and extracts HT801's port to connect to, in this format:
r"audio (\d+) RTP"
This is the port RTPSender will connect to.
It also sends back its own port where it expect HT801 to connect. It case of RotaryGPT it's fix 5004. This is the port RTPReceiver will listen on.
Nowhere in this process the ephemeral ports play a part. This is why I'm very confused about Grandstream's response.
— Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1750773588, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QGZNKXRXQ2GOGV6BATX6AIJ5AVCNFSM6AAAAAA4HWEL5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQG43TGNJYHA. You are receiving this because you were mentioned.Message ID: @.**@.>>
From Grandstream..
There is a reply for Ticket 20230908155004
Dear Raul Macias,
Our engineers have replied to ticket 20230908155004.
Ticket Title: Audio Gets cuts off
Reply:
The screenshot you provided highlights the audio stream from HT to SIP server. This obeys the SDP negotiation.
The streams that do not obey SDP negotiation are the ones coming from 192.168.10.176 (SIP server, Raspberry...) . Please see attached.
Please check the ticket HEREhttps://helpdesk.grandstream.com/users/show_ticket/333116.
*** Please do not respond to this email regarding the support ticket, please respond directly through your HelpDesk account.
Thanks and have a great day!
From: Zoltan Toth-Czifra @.> Sent: Friday, October 6, 2023 10:27 AM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Mention @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
Grandstream's answer makes very little sense to me.
See the comment from @dick-ndshttps://github.com/dick-nds here:
RTP is a full-duplex protocol, meaning there's a separate socket for receiving as well as sending audio. Each UDP socket is defined by a two IP-address-port pairs. One of the receiver and the other one of the sender. The sender may assign an ephemeral port (meaning randomly chosen, usually from the higher port numbers) to send the data out of. The receiver usually assigns a fix port so that the sender knows where to send to. The sender's ephemeral port is typically transparently assigned by the operating system, since usually there's no reason to choose this manually at all.
An example socket could be: [192.168.1.2][5555] <--- [192.168.1.3][56789]
In case of RotaryGPT, we have two sockets (again, RTP is full-duplex):
During the SIP session both sides exchange port numbers using Session Description Protocol (SDP). The port numbers they exchange are the ones they expect the other party to connect to. It has nothing to do with the ephemeral ports used by the socket.
HT801 sends an INVITE SIP request to the RaspberryPi and in it it includes the protocols and ports it accepts the connection to (using the format defined by SDP). RotaryGPT parses this and extracts HT801's port to connect to, in this format:
r"audio (\d+) RTP"
This is the port RTPSender will connect to.
It also sends back its own port where it expect HT801 to connect. It case of RotaryGPT it's fix 5004. This is the port RTPReceiver will listen on.
Nowhere in this process the ephemeral ports play a part. This is why I'm very confused about Grandstream's response.
— Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1750773588, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QGZNKXRXQ2GOGV6BATX6AIJ5AVCNFSM6AAAAAA4HWEL5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQG43TGNJYHA. You are receiving this because you were mentioned.Message ID: @.**@.>>
I don't think Github picks up your email attachments.
You are correct, I just attached manually on the site. It's packet capture.
HT801 ip = 192.168.10.169 SIP server ip = 192.168.10.176
From: Zoltan Toth-Czifra @.> Sent: Friday, October 6, 2023 10:45 AM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Mention @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
I don't think Github picks up your email attachments.
- Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1750803523, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QAFC4TGI3H4K5F3GLDX6AKNXAVCNFSM6AAAAAA4HWEL5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQHAYDGNJSGM. You are receiving this because you were mentioned.Message ID: @.**@.>>
From Grandstream..
++++++++++++++++++++++++++++++++++
The screenshot you provided highlights the audio stream from HT to SIP server. This obeys the SDP negotiation.
The streams that do not obey SDP negotiation are the ones coming from 192.168.10.176 (SIP server, Raspberry...) . Please see attached.
Honestly I think they somehow get confused here and want to use the same socket for both directions. It's certainly possible with UDP but it's unusual and that's not how RTP is usually implemented.
My hunch is that the source of their confusion is perhaps the fact that we suggest using the same incoming port at RotaryGPT as they use on HT801. Perhaps in the newer hardware there's some "heuristics" that if the SIP server suggests the same port as the client then it has to be the same socket for audio in and out. This would be super odd and I still don't really get how and why they "cut" the communication when this happens.
My suggestion to verify this theory is to change the port of RotaryGPT:
Do these two changes and please test again. Wireshark captures are useful if it still doesn't work.
hi,
My apologies, don't know much about programming, getting the error above. I'm my suppose to run the file using "python port_change.path" please see the error Im getting. I put the files on the same directory.
You need to apply the patch first:
git apply port_change.path
Then run RotaryGPT as usual.
Thank you, just tried with the update and encounter the same issue. Attached are the new wireshark captures.
Seems like this did nothing. Would you mind sending my response to Grandstream to see what they say to this? https://github.com/tcz/rotary-gpt/issues/2#issuecomment-1750773588
Maybe they will suggest using the same socket, I just don't really get why. Especially because it works well on the old hardware.
Zoltan-
I did, they usually take 24 hours to answer. I appreciate the effort. Thank you very much.
Raul
From: Zoltan Toth-Czifra @.> Sent: Friday, October 6, 2023 12:17 PM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Mention @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
Seems like this did nothing. Would you mind sending my response to Grandstream to see what they say to this?
Maybe they will suggest using the same socket, I just don't really get why. Especially because it works well on the old hardware.
- Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1751030988, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QFLKY6IFE4A7VAHCODX6AVIRAVCNFSM6AAAAAA4HWEL5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRGAZTAOJYHA. You are receiving this because you were mentioned.Message ID: @.**@.>>
Zoltan-
Reply from grandstream to your questions.
Regards,
Raúl
On Oct 6, 2023, at 4:52 PM, Grandstream Help Desk @.***> wrote:
There is a reply for Ticket 20230908155004
Dear Raul Macias,
Our engineers have replied to ticket 20230908155004.
Ticket Title: Audio Gets cuts off
Reply:
Please check the ticket HEREhttps://helpdesk.grandstream.com/users/show_ticket/333116.
*** Please do not respond to this email regarding the support ticket, please respond directly through your HelpDesk account.
Thanks and have a great day!
Regards,
Raúl
On Oct 6, 2023, at 12:25 PM, Raul Macias @.***> wrote:
Zoltan-
I did, they usually take 24 hours to answer. I appreciate the effort. Thank you very much.
Raul
From: Zoltan Toth-Czifra @.> Sent: Friday, October 6, 2023 12:17 PM To: tcz/rotary-gpt @.> Cc: Raul Macias @.>; Mention @.> Subject: Re: [tcz/rotary-gpt] Audio Get Code off (Issue #2)
Seems like this did nothing. Would you mind sending my response to Grandstream to see what they say to this?
Maybe they will suggest using the same socket, I just don't really get why. Especially because it works well on the old hardware.
— Reply to this email directly, view it on GitHubhttps://github.com/tcz/rotary-gpt/issues/2#issuecomment-1751030988, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5645QFLKY6IFE4A7VAHCODX6AVIRAVCNFSM6AAAAAA4HWEL5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRGAZTAOJYHA. You are receiving this because you were mentioned.Message ID: @.**@.>>
hi there, hope all is well. I'm trying to setup but my audio is getting cut off. No a programmer, can you tell me where to add/edit the API key and the txt you suggested to add for GPT?
export OPENAI_API_KEY="xxxx" export AWS_ACCESS_KEY="yyyy" export AWS_SECRET_KEY="zzz"
Set it to the name of the city you leave. Used for weather.
export ROTARYGPT_PHYSICAL_LOCATION="Barcelona, Spain"
Getting the error below..