Jump to content

ndemou

Members
  • Posts

    171
  • Joined

  • Last visited

Everything posted by ndemou

  1. after reverting a group of telephones comming from one IP will not register. I see them sending REGISTER packets to my IP (with tcpdump) but pbxnsip sends back nothing at all. This IP was blacklisted during the period that I was running ver4. I'm puzled -- any ideas?
  2. already reverted but that's not a permanent solution I thought of it also so let's see if you can help me grok the info from the system. On settings -> general the system reports: > Calls: 2251/1599 (CDR: 3371/2421/3925) 13/26 Calls I guess that this means 13 calls with 26 call legs - am I right (I do see around 13 calls in status -> calls)? At almost the same point in time in the logs I see > Call limit reached. Call ports 55, g729 50 I also guess that this means I using 55 call ports for g729 calls while my limit is 50 - am I right? Anything else you suggest I check out in the logs/sip traces? Also is it normal for the system to emit either one of these messages when it thinks the call ports limit has been hit?: > SIP/2.0 415 Unsupported Media Type > SIP/2.0 501 Not Implemented
  3. we are having serius problems with calls not geting in/out our pbx The caller gets an error in his display The callee barely has the chance to hear the phone ring then sees a missed call At almost exactly the time that the call fails I see this message in the logs Call limit reached. Call ports 55, g729 50 and if I do a tcpdump I see either one of these two sip errors SIP/2.0 415 Unsupported Media Type SIP/2.0 501 Not Implemented but at the same time in status -> general I see only 25 call legs: Calls: ... 10/25 Calls From what I can tell when ever I hit 20 call legs the errors appear. When I fall bellow 20 the errors stop. All these hapened today after we’ve made an upgrade from ver3 to ver4 status -> general has this info: Version: 4.3.0.5021 (Linux) Created on: Nov 29 2011 15:16:54 License Status: snom UK - pbxnsip - foo - Hosted - Pro Plus 50 calls - UP Ends on 01st October 2012 License Duration: Permanent Additional license information: Extensions: 834/9999 Accounts: 1460/9999 Upgrade: 10 06 2012 Working Directory: /usr/local/pbxnsip/PBX MAC Addresses: 0024E85C6A37 0024E85C6A38 Calls: 2251/1599 (CDR: 3371/2421/3925) 13/26 Calls SIP packet statistics: Tx: 899504 Rx: 899620 Emails: Successful sent: 315 Unsuccessful attempts: 15 Available file system space: 40% Uptime: 2013/3/20 13:57:32 (uptime: 0 days 15:03:45) (95436 103835072-0) WAV cache: 5 Number of HTTP sessions: Sessions: PAC=0, HTTP=93; Threads: SIP=54, HTTP=8
  4. We need to present to users and domain admins a custom web interface that has some options striped out. As an example we don't want users to see the field to change the sip password and we don't want domain admins to be able to change ANIs so we want those fields not show up. We did that in version 3 long long time ago but nobody remembers how. Now we must do it again for version 4.
  5. Here's a python parser I came up with for the CDRs. It's been tested on a few hundreds CDRs (i,e and t) without any apparent problem but I can give no warranties. def tlvb_parser(a): '''PBXnSIP v4 CDRs parser Acts as a generator so call it like: for key,value in tlvb_parser(data): The CDR files have an .xml extension but are obviously not xml They also start with TLV but they are not Type-Length-Value formated either From what I've seen in a few hundrend files their format is as folows: First 4 bytes is the string "TLVB" After that follow 1 or more records like this: <ll> <string of length ll> <LLLL> <string of length LLLL> where: ll = 2-bytes-integer LLLL = 4-bytes-integer ''' # TODO: the case of 0 length for the value may be either: # 1) expected indicating an empty string --or-- # 2) unexpected indicating a corrupt file # Since I'm not sure I make the behaviour configurable: zero_len_for_value_is_expected = True # I also configure this sanity limit for the length of values maximum_expected_len_for_value = 8192 import struct if a[:4]<>'TLVB': raise ValueError, "Invalid data (they don't start with TLVB)" else: a=a[4:] state='LOOKING_FOR_KEY' # initial state while a: if state=='LOOKING_FOR_KEY': # read key l=struct.unpack('>H',a[:2])[0] # assume 1st 2 bytes are an integer representing the length of data to follow if l==0: raise ValueError, 'Was expecting the key length but instead found 00h 00h' else: if l>len(a)-2: raise ValueError, 'Length for key points after EOF' if l>255: raise ValueError, 'Length for key>255 (%s) which is suspiciously large' % l a=a[2:] key=a[:l] a=a[l:] state='LOOKING_FOR_VALUE' else: # read value l=struct.unpack('>I',a[:4])[0] # assume 1st 4 bytes are an integer representing the length of data to follow if l>len(a)-4: raise ValueError, 'Length for value points after EOF' if l>maximum_expected_len_for_value: raise ValueError, 'Length for value>%s (%s) which is suspiciously large' % (maximum_expected_len_for_value, l) if l==0 : if not zero_len_for_value_is_expected: raise ValueError, 'Was expecting the value length but instead found 00h 00h 00h 00h' a=a[4:] if l: value=a[:l] a=a[l:] else: value='' state='LOOKING_FOR_KEY' yield key,value
  6. From what I can understand the format of the new cdr files is as folows: First 4 bytes is the string "TLVB" After that follow 1 or more records like this: <ll> <string of length ll> <LLLL> <string of length LLLL> where: ll = 2-bytes-integer LLLL = 4-bytes-integer I've tested the above in a few dozen cdrs
  7. have you had the time to check the trace I PM'ed you?
  8. Maybe I wasn't clear enough: What I would like is for you to check the trace of this call and hear your opinion regarding why calls like this one drop after 3min. So can you give me your email in order to sent the trace?
  9. when I saw 5 calls been cut at 2:58 to 3:00 it ring that bell to me also but this box makes hundreds of calls above the 3m limit every day
  10. perhaps I wasn't clear enough: there are only two phones in this hunt group. BOTH of them got the CANCEL message. i.e. even the phone that sent the 200 OK in order to receive the call got a CANCEL!
  11. When a user of one domain makes a call to a hunt group of another domain the call drops after 3min. The pbxnsip is connected to a switch and all domain-2-other-domain calls are sent to the trunk of the switch and back to the pbx. Version is pbxctrl-centos5-3.4.0.320 A sip trace seems to indicate that something goes wrong early in the setup of the call. As far as I can tell the call rings two different phones and when one of them sends a 200 OK message the pbxnsip responds by sending a CANCEL with reason: "Call completed elsewhere" to both phones!! There is however 2-way audio for exactly 3mins Frame # Time Source Destination Protocol 31 6.163960 XX.YYY.47.27 PBX.N.SIP.2 SIP/SDP Status-Line: SIP/2.0 200 OK Frame # Time Source Destination Protocol 32 6.165921 PBX.N.SIP.2 XX.YYY.47.27 SIP Request-Line: ACK sip:52@192.168.100.58:5062;transport=TCP SIP/2.0 Frame # Time Source Destination Protocol 33 6.168142 PBX.N.SIP.2 PP.QQ.18.226 SIP Request-Line: CANCEL sip:52@192.168.1.2:5062;transport=TCP SIP/2.0 Reason: SIP;cause=200;text="Call completed elsewhere" Frame # Time Source Destination Protocol 34 6.168388 PBX.N.SIP.2 XX.YYY.47.27 SIP Request-Line: CANCEL sip:55@192.168.100.68:5062 SIP/2.0 Reason: SIP;cause=200;text="Call completed elsewhere" Should I email tcpdumps?
  12. looking at my init script[2] of pbxnsip I see it uses the killproc funtion[1] which first sends a TERM signal then deletes the pid file. Nick _____________________ [1] have a look at /etc/rc.d/init.d/functions [2] ... stop() { echo -n "Stopping pbxnsip Watchdog:" killproc $PBXWD -TERM echo RETVAL=1 } ...
  13. Can I have two independent pbxnsip instances running on the same server (each bind to a different IP address of course)?
  14. Yes, no problem with one way audio and no side effects spotted
  15. It should be good even if for the novice linux admin who can copy-paste the commands [disclosure: after many years in front of black terminal my opinion may be biased ]. BTW do you have to suggest any visualization tool which can import pbxnsip logs (or something close enough that I can create a bridge for) and display something with colors and graphics? After 7 hours of work following a plain text log seems hard even for those who can deal with bash, sed & Co
  16. (It took me some hours to fine tune these commands so I'm posting them for everyone) What you can achieve with this easy 4-step procedure is to extract the full trace of a call from the pbx logs of a production system whith the log level is set to 7 (which means that you must clean up A LOT of noise). The only thing you need to know is the hour(s) that the call took place and the A-number and B-number (or if you prefer the "from" and "to" sip address) 1) First define the criteria to locate the call (date, hour, A-number, B-number) [don't copy paste blindly -- type your criteria in the corresponding positions] LOG=/usr/local/pbxnsip/PBX_LOGS/pbxnsip_1_ LOG="$LOG"2010-04-07.txt ANUM=210555666 BNUM=6555666777 TIMEST="2010040714" Here I'm trying to trace a call that happened at the 14th hour of 2010-04-07. Be carefull with the TIMEST setting for calls that span two hours -- you should use the [] regex operators like this: (to trace a call that started at the 14th hour but continued to the 15th) 2) the next step is to find the pair of call-IDs for your call (it's one call-id for each one of the two call legs -- PBX to the Caller, PBX to Callee ) grep -A20 $TIMEST $LOG | tr "\n" \~ | tr -d '\015' | sed -e "s/~\[/\n[/g" | grep -v "CSeq: [0-9]* REGISTER" | grep -v "~REGISTER sip" | grep "~INVITE sip" | grep "$ANUM.*$BNUM" | tr \~ "\n" | grep -A10 "^\[" | grep "^\[\|^From\|^To\|Call-ID\|^--" the above command gives the following lines of output for each call it finds matching the criteria: 3) now that you see the CALLIDs copy them to two variables[don't copy paste blindly -- type the CALLIDs for your call in the corresponding positions]: CALLID1=620711228470439051110674375262@192.168.0.100 CALLID2=8bef1ea6@pbx 4) and now you can get a nice trace of the call like this: grep -A20 $TIMEST $LOG | tr "\n" \~ | tr -d '\015' | sed -e "s/~\[/\n[/g" | grep "$CALLID1\|$CALLID2" | tr \~ "\n" __________________________________________ for those interested in understanding the commands here is a quick explanation of the core stuf: tr "\n" \~ | tr -d '\015' the above changes new lines to "~" sed -e "s/~\[/\n[/g" the above changes back ~ to new lines ONLY if [n] follows -- now you have each log message in one big line e.g. a message like this: will become: grep -v "CSeq: [0-9]* REGISTER" | grep -v "~REGISTER sip" the above removes messages regarding REGISTER events which are A LOT in a system with many phones tr \~ "\n" the above changes back ~ to new lines wherever they occur now you have the typical multi-line messages
  17. before we could reproduce the problem "in vitro" (it only happens randomly to us) we found out a hack that seems to have solved the problem in the sense that no user is complaining any more: on the yealink phone navigate to phone -> voice -> JITTER BUFFER set "Type" to "Fixed" set all 3 delays to 120 (Min Delay,Max Delay,Normal Delay) done CAUTION: I don't understand the logic behind this hack and I haven't researched it. The only good thing is that I have a few phones with these settings for many days/weeks and nobody has complained.
  18. any feedback regarding my other questions?
  19. I don't have wireshark on the pbxnsip server but I can run tcpdump following the instructions "Capturing with tcpdump for viewing with Wireshark"[1] Will that be OK? ___________________ [1] http://www.wireshark.org/docs/wsug_html_ch...olstcpdump.html
  20. which of the two phones are you refering to? (the yealink or the linksys) after reading through the forum we've tried both on and off options for the setting: pbxnsip general settings -> ports -> "lock codec during conversation" are yo refering to this setting? If yes as I've written above it made no difference do you mean to go to pbx settings -> ports -> RTP: -> Codec Preference and leave only one codec available ? we have many phones available and we've only seen the problems when the one of the two phones is a yealink and the other is not until now we've seen it in three networks -- each one with a different adsl modem/router
  21. I tried to download the trial version titled "Permanent Demo Key (maximum call duration set to 3 minutes)", I entered my name and email (twice) but I get the error: "Anonymous email accounts are not accepted here"
×
×
  • Create New...