Infactum/tg2sip

Could you please provide an example of minimal PJSIP configuration?

sergei-mironov opened this issue · 9 comments

Hi, I'm not an Asterisk neither a SIP expert, but still want to setup a simple voice-telegram relay. Could you please provide an example PJSIP configuration?

The related issue is #15. AFAIK the manual mentioned there provides the configuration for SIP Asterisk module, while I'm asking for PJSIP one.
BR

I'm also not an Asterisk expert. You could try to ask help in some VoIP related telegram groups - here for example.

Got it, thanks. Will ask Asterisk guys.

Updated
I've sketched a configuration prototype and tried to run it. Tg2sip does show some reaction, but the communication is not yet establised. The error from tg2sip's side is Request verification failed: Not Acceptable Here [status=170488] and I also see a warning mentioning codecs. @Infactum could you please have a look at https://community.asterisk.org/t/help-translating-a-simple-peer-config-to-pjsip/86601/4 ? What should I possibly change in configs?

I think you should comapre INVITE SDP between pjsip and old asterisk sip config.

So here is the log of the connection using older chan_sip of Asterisk. Unfortunately, the problem is the same Request verification failed: Not Acceptable Here [status=170488], plus codec warning.

https://gist.github.com/grwlf/cd78f2581c71125fa8b026fb66bb6ae5

Also I've noticed that someone mentioned the same error in the comments to the original setup guide. Do you have any ideas? https://voxlink.ru/kb/asterisk-configuration/ustanovka-i-nastrojka-sip-shljuza-dlja-telegram/#comment-908

Does tg2sip use codec directly or relies to pjsip instead?

Update: So it looks like the problem was related to my PJSIP installation which had opus codec disabled. After enabling it the 'not acceptable here' problem seems gone.

But I see next issue, which is

[15:00:03.039][t:13070][p:13064][pjsip][trace] State changed from Trying to Proceeding, event=TX_MSG                                                                                                                                                 
[15:00:03.039][t:13070][p:13064][pjsip][trace] Transaction tsx0x7fc734005e28 state changed to Proceeding                                                                                                                                             
[15:00:03.039][t:13064][p:13064][core][debug] [13064-1] associated with SIP#0                                                                                                                                                                        
[15:00:03.046][t:13064][p:13064][core][warning] [13064-1] called invalid extension  

Update2: called invalid extension problem is also sovled. It was the wrong sip address format.

Finally, I now have working Asterisk+tg2sip configuration which is based on chan_sip, but setting up chan_pjsip is yet to be done..