Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] sip.conf to pjsip.conf conversion script


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
johnkiniston at gmail.com
Guest





PostPosted: Mon Oct 27, 2014 6:35 pm    Post subject: [asterisk-users] sip.conf to pjsip.conf conversion script Reply with quote

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 <module>
    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!
--
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
---Heinlein
Back to top
kharwell at digium.com
Guest





PostPosted: Tue Oct 28, 2014 9:38 am    Post subject: [asterisk-users] sip.conf to pjsip.conf conversion script Reply with quote

On Mon, Oct 27, 2014 at 6:35 PM, John Kiniston <johnkiniston@gmail.com (johnkiniston@gmail.com)> wrote:
Quote:
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 <module>
    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'




Based on the error I am guessing that you don't have the option 'udpbindaddr' or 'bindaddr' specified in the 'general' section of your sip.conf.  If you add one of those options to the 'general' configuration section in your sip.conf it should hopefully work around the issue.


However, the script shouldn't error out in such a manner, so please file an issue [1] to the bug tracker and be sure to mention the documentation too since that should be updated as well.  Asterisk issue guidelines can be found at the following [2].

[1] https://issues.asterisk.org/jira
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines#AsteriskIssueGuidelines-Submittingthebugreport


 
Quote:


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!
--
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
---Heinlein


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



Thanks,

--
Quote:
Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
Back to top
mjordan at digium.com
Guest





PostPosted: Tue Oct 28, 2014 9:51 am    Post subject: [asterisk-users] sip.conf to pjsip.conf conversion script Reply with quote

On Tue, Oct 28, 2014 at 9:38 AM, Kevin Harwell <kharwell@digium.com> wrote:
Quote:

On Mon, Oct 27, 2014 at 6:35 PM, John Kiniston <johnkiniston@gmail.com> wrote:
Quote:

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 <module>
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'


Based on the error I am guessing that you don't have the option 'udpbindaddr' or 'bindaddr' specified in the 'general' section of your sip.conf. If you add one of those options to the 'general' configuration section in your sip.conf it should hopefully work around the issue.

However, the script shouldn't error out in such a manner, so please file an issue [1] to the bug tracker and be sure to mention the documentation too since that should be updated as well. Asterisk issue guidelines can be found at the following [2].

[1] https://issues.asterisk.org/jira
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines#AsteriskIssueGuidelines-Submittingthebugreport


It throws this error for me as well on the sample sip.conf, which does
have a udpbindaddr defined in the [general] context - so it's a
legitimate bug in the script.

--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services