Sip.conf To Pjsip.conf Conversion Script

Home » Asterisk Users » Sip.conf To Pjsip.conf Conversion Script
Asterisk Users 2 Comments

Howdy,

I’m trying to get my feet wet with pjsip using the conversion script mentioned on the Wiki on this page:

https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip

I’m using the copy of the script that’s included with Asterisk 13

/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip

I assume I run it from /etc/asterisk with the input and output file as arguments however there’s no instructions and I don’t Grok python.

Unfortunately it’s not working, Despite what the below error states I do have a udpbindaddr set to 0.0.0.0 in my configuration.

root@kiniston01:/etc/asterisk#
/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py sip.conf pjsip.conf Traceback (most recent call last):
File
“/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py”, line 1158, in
pjsip, non_mappings = convert(sip, pjsip_filename, dict(), False)
File
“/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py”, line 1090, in convert
map_transports(sip, pjsip, nmapped)
File
“/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py”, line 817, in map_transports
create_udp(sip, pjsip, nmapped)
File
“/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py”, line 590, in create_udp
bind = sip.multi_get(‘general’, [‘udpbindaddr’, ‘bindaddr’])[0]
File
“/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/astconfigparser.py”, line 407, in multi_get
(key_list, section))
LookupError: keys [‘udpbindaddr’, ‘bindaddr’] not found for section
‘general’

I’ve not turned up anything useful with Google so the mailing list is my next step.

I can provide my configuration if needed however it is just the stock sip.conf with a phone and two trunks added at the bottom.

Thanks!

2 thoughts on - Sip.conf To Pjsip.conf Conversion Script