#usr/lib/asterisk/modules/res_monitor.so
#usr/lib/asterisk/modules/res_musiconhold.so
#usr/lib/asterisk/modules/res_watchdog.so
+#usr/lib/asterisk/modules/app_saycountpl.so
+#usr/lib/asterisk/modules/format_mp3.so
+#usr/lib/asterisk/modules/format_ogg_vorbis.so
#usr/lib/pkgconfig/asterisk.pc
usr/sbin/asterisk
usr/sbin/astgenkey
#var/lib/asterisk/sounds/vm-unknown-caller.gsm
#var/lib/asterisk/sounds/vm-whichbox.gsm
#var/lib/asterisk/sounds/vm-youhave.gsm
+#var/lib/asterisk/sounds/1-for-am-2-for-pm.gsm
+#var/lib/asterisk/sounds/1-yes-2-no.gsm
+#var/lib/asterisk/sounds/T-changed-to.gsm
+#var/lib/asterisk/sounds/T-is-not-available.gsm
+#var/lib/asterisk/sounds/T-to-disable-ancmnt.gsm
+#var/lib/asterisk/sounds/T-to-enable-ancmnt.gsm
+#var/lib/asterisk/sounds/T-to-hear-cur-ancmnt.gsm
+#var/lib/asterisk/sounds/T-to-leave-msg.gsm
+#var/lib/asterisk/sounds/T-to-reach-main-office.gsm
+#var/lib/asterisk/sounds/T-to-rec-ancmnt.gsm
+#var/lib/asterisk/sounds/T-to-rtrn-to-main-menu.gsm
+#var/lib/asterisk/sounds/a-charge-for-this-svc.gsm
+#var/lib/asterisk/sounds/a-collect-charge-of.gsm
+#var/lib/asterisk/sounds/a-collect-charge.gsm
+#var/lib/asterisk/sounds/a-connect-charge-of.gsm
+#var/lib/asterisk/sounds/a-connect-charge.gsm
+#var/lib/asterisk/sounds/abandon-all-hope.gsm
+#var/lib/asterisk/sounds/abandons.gsm
+#var/lib/asterisk/sounds/academic-support.gsm
+#var/lib/asterisk/sounds/access-code.gsm
+#var/lib/asterisk/sounds/accessible-through-system.gsm
+#var/lib/asterisk/sounds/account-balance-is.gsm
+#var/lib/asterisk/sounds/accounting.gsm
+#var/lib/asterisk/sounds/accounts-payable.gsm
+#var/lib/asterisk/sounds/accounts-receivable.gsm
+#var/lib/asterisk/sounds/activated.gsm
+#var/lib/asterisk/sounds/added-to.gsm
+#var/lib/asterisk/sounds/added.gsm
+#var/lib/asterisk/sounds/address.gsm
+#var/lib/asterisk/sounds/administration.gsm
+#var/lib/asterisk/sounds/advised-to-seek-shelter.gsm
+#var/lib/asterisk/sounds/after-the-tone.gsm
+#var/lib/asterisk/sounds/afternoon.gsm
+#var/lib/asterisk/sounds/airport.gsm
+#var/lib/asterisk/sounds/alabama.gsm
+#var/lib/asterisk/sounds/alaska.gsm
+#var/lib/asterisk/sounds/albuquerque.gsm
+#var/lib/asterisk/sounds/all-circuits-busy-now.gsm
+#var/lib/asterisk/sounds/all-outgoing-lines-unavailable.gsm
+#var/lib/asterisk/sounds/all-reps-busy.gsm
+#var/lib/asterisk/sounds/all-your-base.gsm
+#var/lib/asterisk/sounds/altitude.gsm
+#var/lib/asterisk/sounds/ampersand.gsm
+#var/lib/asterisk/sounds/an-error-has-occured.gsm
+#var/lib/asterisk/sounds/and-area-code.gsm
+#var/lib/asterisk/sounds/and-or.gsm
+#var/lib/asterisk/sounds/and-prs-pound-whn-finished.gsm
+#var/lib/asterisk/sounds/and.gsm
+#var/lib/asterisk/sounds/another-time.gsm
+#var/lib/asterisk/sounds/approaching.gsm
+#var/lib/asterisk/sounds/approximately.gsm
+#var/lib/asterisk/sounds/are-you-still-there.gsm
+#var/lib/asterisk/sounds/are-you-still-there2.gsm
+#var/lib/asterisk/sounds/arizona.gsm
+#var/lib/asterisk/sounds/arkansas.gsm
+#var/lib/asterisk/sounds/arlington.gsm
+#var/lib/asterisk/sounds/astcc-account-balance-is.gsm
+#var/lib/asterisk/sounds/astcc-account-number-invalid.gsm
+#var/lib/asterisk/sounds/astcc-balance-of-account-is.gsm
+#var/lib/asterisk/sounds/astcc-card-number-invalid.gsm
+#var/lib/asterisk/sounds/astcc-digit-account-number.gsm
+#var/lib/asterisk/sounds/astcc-followed-by-pound.gsm
+#var/lib/asterisk/sounds/astcc-followed-by-the-hash-key.gsm
+#var/lib/asterisk/sounds/astcc-followed-by-the-pound-key.gsm
+#var/lib/asterisk/sounds/astcc-login12pound.gsm
+#var/lib/asterisk/sounds/astcc-please-enter-your.gsm
+#var/lib/asterisk/sounds/astcc-skipping-any-punctuation.gsm
+#var/lib/asterisk/sounds/asterisk-friend.gsm
+#var/lib/asterisk/sounds/at-any-time.gsm
+#var/lib/asterisk/sounds/at-customers-request.gsm
+#var/lib/asterisk/sounds/at-following-number.gsm
+#var/lib/asterisk/sounds/at-sign.gsm
+#var/lib/asterisk/sounds/at-tone-time-exactly.gsm
+#var/lib/asterisk/sounds/at.gsm
+#var/lib/asterisk/sounds/athletics.gsm
+#var/lib/asterisk/sounds/atlanta.gsm
+#var/lib/asterisk/sounds/atlantic.gsm
+#var/lib/asterisk/sounds/attention-required.gsm
+#var/lib/asterisk/sounds/auditing.gsm
+#var/lib/asterisk/sounds/austin.gsm
+#var/lib/asterisk/sounds/available-options.gsm
+#var/lib/asterisk/sounds/available.gsm
+#var/lib/asterisk/sounds/avg-speed-answer.gsm
+#var/lib/asterisk/sounds/away-naughty-boy.gsm
+#var/lib/asterisk/sounds/away-naughty-girl.gsm
+#var/lib/asterisk/sounds/backslash.gsm
+#var/lib/asterisk/sounds/bad.gsm
+#var/lib/asterisk/sounds/baltimore.gsm
+#var/lib/asterisk/sounds/bar.gsm
+#var/lib/asterisk/sounds/barn.gsm
+#var/lib/asterisk/sounds/barns.gsm
+#var/lib/asterisk/sounds/barometric.gsm
+#var/lib/asterisk/sounds/bearing.gsm
+#var/lib/asterisk/sounds/beaufort.gsm
+#var/lib/asterisk/sounds/because-paranoid.gsm
+#var/lib/asterisk/sounds/before-the-number.gsm
+#var/lib/asterisk/sounds/believe-its-free.gsm
+#var/lib/asterisk/sounds/billing-and-collections.gsm
+#var/lib/asterisk/sounds/billing.gsm
+#var/lib/asterisk/sounds/billionth.gsm
+#var/lib/asterisk/sounds/bits.gsm
+#var/lib/asterisk/sounds/blue-eyed-polar-bear.gsm
+#var/lib/asterisk/sounds/bookstore.gsm
+#var/lib/asterisk/sounds/boston.gsm
+#var/lib/asterisk/sounds/box.gsm
+#var/lib/asterisk/sounds/brian.gsm
+#var/lib/asterisk/sounds/business-development.gsm
+#var/lib/asterisk/sounds/busy-hangovers.gsm
+#var/lib/asterisk/sounds/busy-pls-hold.gsm
+#var/lib/asterisk/sounds/but.gsm
+#var/lib/asterisk/sounds/by.gsm
+#var/lib/asterisk/sounds/bytes.gsm
+#var/lib/asterisk/sounds/cafeteria.gsm
+#var/lib/asterisk/sounds/california.gsm
+#var/lib/asterisk/sounds/call-forward.gsm
+#var/lib/asterisk/sounds/call-forwarding.gsm
+#var/lib/asterisk/sounds/call-fwd-cancelled.gsm
+#var/lib/asterisk/sounds/call-fwd-no-ans.gsm
+#var/lib/asterisk/sounds/call-fwd-on-busy.gsm
+#var/lib/asterisk/sounds/call-fwd-parallel.gsm
+#var/lib/asterisk/sounds/call-fwd-unconditional.gsm
+#var/lib/asterisk/sounds/call-preempted.gsm
+#var/lib/asterisk/sounds/call-quality-menu.gsm
+#var/lib/asterisk/sounds/call-requres.gsm
+#var/lib/asterisk/sounds/call-terminated.gsm
+#var/lib/asterisk/sounds/call-waiting.gsm
+#var/lib/asterisk/sounds/call.gsm
+#var/lib/asterisk/sounds/calls-taken-by.gsm
+#var/lib/asterisk/sounds/calls-waiting-for-rep.gsm
+#var/lib/asterisk/sounds/calls.gsm
+#var/lib/asterisk/sounds/campground-office.gsm
+#var/lib/asterisk/sounds/cancelled.gsm
+#var/lib/asterisk/sounds/cannot-complete-as-dialed.gsm
+#var/lib/asterisk/sounds/cannot-complete-network-error.gsm
+#var/lib/asterisk/sounds/cannot-complete-otherend-error.gsm
+#var/lib/asterisk/sounds/cannot-complete-temp-error.gsm
+#var/lib/asterisk/sounds/card-balance-is.gsm
+#var/lib/asterisk/sounds/card-is-invalid.gsm
+#var/lib/asterisk/sounds/card-number.gsm
+#var/lib/asterisk/sounds/carried-away-by-monkeys.gsm
+#var/lib/asterisk/sounds/cause-code.gsm
+#var/lib/asterisk/sounds/celsius.gsm
+#var/lib/asterisk/sounds/cent.gsm
+#var/lib/asterisk/sounds/central.gsm
+#var/lib/asterisk/sounds/cents-per-minute.gsm
+#var/lib/asterisk/sounds/cents.gsm
+#var/lib/asterisk/sounds/ceo-office.gsm
+#var/lib/asterisk/sounds/chance-of.gsm
+#var/lib/asterisk/sounds/changing.gsm
+#var/lib/asterisk/sounds/channel-insecure-warn.gsm
+#var/lib/asterisk/sounds/channel-secure.gsm
+#var/lib/asterisk/sounds/channel.gsm
+#var/lib/asterisk/sounds/charlotte.gsm
+#var/lib/asterisk/sounds/chat-room.gsm
+#var/lib/asterisk/sounds/check-number-dial-again.gsm
+#var/lib/asterisk/sounds/chemistry.gsm
+#var/lib/asterisk/sounds/chicago.gsm
+#var/lib/asterisk/sounds/chris.gsm
+#var/lib/asterisk/sounds/claims.gsm
+#var/lib/asterisk/sounds/clear.gsm
+#var/lib/asterisk/sounds/clearing.gsm
+#var/lib/asterisk/sounds/cleveland.gsm
+#var/lib/asterisk/sounds/clli.gsm
+#var/lib/asterisk/sounds/close-parenthesis.gsm
+#var/lib/asterisk/sounds/clouds.gsm
+#var/lib/asterisk/sounds/cloudy.gsm
+#var/lib/asterisk/sounds/collections.gsm
+#var/lib/asterisk/sounds/colorado-springs.gsm
+#var/lib/asterisk/sounds/colorado.gsm
+#var/lib/asterisk/sounds/columbus.gsm
+#var/lib/asterisk/sounds/comma.gsm
+#var/lib/asterisk/sounds/communications.gsm
+#var/lib/asterisk/sounds/company-dir-411.gsm
+#var/lib/asterisk/sounds/complaint.gsm
+#var/lib/asterisk/sounds/compliance.gsm
+#var/lib/asterisk/sounds/computer-friend1.gsm
+#var/lib/asterisk/sounds/computer-friend2.gsm
+#var/lib/asterisk/sounds/conditions.gsm
+#var/lib/asterisk/sounds/conf-banned.gsm
+#var/lib/asterisk/sounds/conf-full.gsm
+#var/lib/asterisk/sounds/conf-hasentered.gsm
+#var/lib/asterisk/sounds/conf-onlypersonleft.gsm
+#var/lib/asterisk/sounds/conf-peopleinconf.gsm
+#var/lib/asterisk/sounds/conf-sysop.gsm
+#var/lib/asterisk/sounds/conf-sysopreq.gsm
+#var/lib/asterisk/sounds/conf-sysopreqcancelled.gsm
+#var/lib/asterisk/sounds/conf-youareinconfnum.gsm
+#var/lib/asterisk/sounds/conference-call.gsm
+#var/lib/asterisk/sounds/conference-reservations.gsm
+#var/lib/asterisk/sounds/conference.gsm
+#var/lib/asterisk/sounds/confirm-number-is.gsm
+#var/lib/asterisk/sounds/connected.gsm
+#var/lib/asterisk/sounds/connecticut.gsm
+#var/lib/asterisk/sounds/connecting.gsm
+#var/lib/asterisk/sounds/connection-failed.gsm
+#var/lib/asterisk/sounds/connection-timed-out.gsm
+#var/lib/asterisk/sounds/continue-english-press.gsm
+#var/lib/asterisk/sounds/continue-in-english.gsm
+#var/lib/asterisk/sounds/copy-center.gsm
+#var/lib/asterisk/sounds/could-lose-a-few-pounds.gsm
+#var/lib/asterisk/sounds/counseling-services.gsm
+#var/lib/asterisk/sounds/count.gsm
+#var/lib/asterisk/sounds/crash.gsm
+#var/lib/asterisk/sounds/current-time-is.gsm
+#var/lib/asterisk/sounds/currently.gsm
+#var/lib/asterisk/sounds/customer-accounts.gsm
+#var/lib/asterisk/sounds/customer-relations.gsm
+#var/lib/asterisk/sounds/customer-service.gsm
+#var/lib/asterisk/sounds/cyclone.gsm
+#var/lib/asterisk/sounds/dallas.gsm
+#var/lib/asterisk/sounds/dash.gsm
+#var/lib/asterisk/sounds/date.gsm
+#var/lib/asterisk/sounds/day.gsm
+#var/lib/asterisk/sounds/daylight.gsm
+#var/lib/asterisk/sounds/days.gsm
+#var/lib/asterisk/sounds/de-activated.gsm
+#var/lib/asterisk/sounds/deadbeat.gsm
+#var/lib/asterisk/sounds/decode.gsm
+#var/lib/asterisk/sounds/default-attendant.gsm
+#var/lib/asterisk/sounds/degrees.gsm
+#var/lib/asterisk/sounds/delaware.gsm
+#var/lib/asterisk/sounds/denial-of-service.gsm
+#var/lib/asterisk/sounds/denver.gsm
+#var/lib/asterisk/sounds/department-administrator.gsm
+#var/lib/asterisk/sounds/department.gsm
+#var/lib/asterisk/sounds/deposit.gsm
+#var/lib/asterisk/sounds/design.gsm
+#var/lib/asterisk/sounds/detroit.gsm
+#var/lib/asterisk/sounds/development.gsm
+#var/lib/asterisk/sounds/dial-here-often.gsm
+#var/lib/asterisk/sounds/digit.gsm
+#var/lib/asterisk/sounds/digits.gsm
+#var/lib/asterisk/sounds/directory-assistance.gsm
+#var/lib/asterisk/sounds/directory.gsm
+#var/lib/asterisk/sounds/disabled.gsm
+#var/lib/asterisk/sounds/discon-or-out-of-service.gsm
+#var/lib/asterisk/sounds/disconnected.gsm
+#var/lib/asterisk/sounds/disk.gsm
+#var/lib/asterisk/sounds/distribution.gsm
+#var/lib/asterisk/sounds/divided-by.gsm
+#var/lib/asterisk/sounds/dns.gsm
+#var/lib/asterisk/sounds/do-not-disturb.gsm
+#var/lib/asterisk/sounds/doing-enum-lookup.gsm
+#var/lib/asterisk/sounds/dollar.gsm
+#var/lib/asterisk/sounds/dollars.gsm
+#var/lib/asterisk/sounds/dont-know-who-sent.gsm
+#var/lib/asterisk/sounds/doppler-radar.gsm
+#var/lib/asterisk/sounds/dot.gsm
+#var/lib/asterisk/sounds/down.gsm
+#var/lib/asterisk/sounds/driving-directions.gsm
+#var/lib/asterisk/sounds/duplex.gsm
+#var/lib/asterisk/sounds/duplication.gsm
+#var/lib/asterisk/sounds/early.gsm
+#var/lib/asterisk/sounds/east.gsm
+#var/lib/asterisk/sounds/easterly.gsm
+#var/lib/asterisk/sounds/eastern.gsm
+#var/lib/asterisk/sounds/echo-test.gsm
+#var/lib/asterisk/sounds/ed.gsm
+#var/lib/asterisk/sounds/eighteenth.gsm
+#var/lib/asterisk/sounds/eighth.gsm
+#var/lib/asterisk/sounds/eightieth.gsm
+#var/lib/asterisk/sounds/el-paso.gsm
+#var/lib/asterisk/sounds/eleventh.gsm
+#var/lib/asterisk/sounds/email.gsm
+#var/lib/asterisk/sounds/emergency.gsm
+#var/lib/asterisk/sounds/enabled.gsm
+#var/lib/asterisk/sounds/encode.gsm
+#var/lib/asterisk/sounds/engineering.gsm
+#var/lib/asterisk/sounds/ent-target-attendant.gsm
+#var/lib/asterisk/sounds/enter-a-time.gsm
+#var/lib/asterisk/sounds/enter-conf-call-number.gsm
+#var/lib/asterisk/sounds/enter-conf-pin-number.gsm
+#var/lib/asterisk/sounds/enter-ext-of-person.gsm
+#var/lib/asterisk/sounds/enter-num-blacklist.gsm
+#var/lib/asterisk/sounds/enter-password.gsm
+#var/lib/asterisk/sounds/enter-phone-number10.gsm
+#var/lib/asterisk/sounds/entering-conf-number.gsm
+#var/lib/asterisk/sounds/entr-num-rmv-blklist.gsm
+#var/lib/asterisk/sounds/enum-lookup-failed.gsm
+#var/lib/asterisk/sounds/enum-lookup-successful.gsm
+#var/lib/asterisk/sounds/equals.gsm
+#var/lib/asterisk/sounds/error-number.gsm
+#var/lib/asterisk/sounds/est-hold-time-is.gsm
+#var/lib/asterisk/sounds/euro.gsm
+#var/lib/asterisk/sounds/european.gsm
+#var/lib/asterisk/sounds/euros.gsm
+#var/lib/asterisk/sounds/evening.gsm
+#var/lib/asterisk/sounds/exclaimation-point.gsm
+#var/lib/asterisk/sounds/explanation.gsm
+#var/lib/asterisk/sounds/ext-or-zero.gsm
+#var/lib/asterisk/sounds/extension.gsm
+#var/lib/asterisk/sounds/extensions.gsm
+#var/lib/asterisk/sounds/facilities.gsm
+#var/lib/asterisk/sounds/fahrenheit.gsm
+#var/lib/asterisk/sounds/falling.gsm
+#var/lib/asterisk/sounds/fast.gsm
+#var/lib/asterisk/sounds/feature-not-avail-line.gsm
+#var/lib/asterisk/sounds/feet.gsm
+#var/lib/asterisk/sounds/female.gsm
+#var/lib/asterisk/sounds/fifteenth.gsm
+#var/lib/asterisk/sounds/fifth.gsm
+#var/lib/asterisk/sounds/fiftieth.gsm
+#var/lib/asterisk/sounds/finals.gsm
+#var/lib/asterisk/sounds/finance.gsm
+#var/lib/asterisk/sounds/first-in-line.gsm
+#var/lib/asterisk/sounds/first.gsm
+#var/lib/asterisk/sounds/flagged-for-lea.gsm
+#var/lib/asterisk/sounds/flooding.gsm
+#var/lib/asterisk/sounds/florida.gsm
+#var/lib/asterisk/sounds/fog.gsm
+#var/lib/asterisk/sounds/foggy.gsm
+#var/lib/asterisk/sounds/followed-by.gsm
+#var/lib/asterisk/sounds/food-service.gsm
+#var/lib/asterisk/sounds/food-services.gsm
+#var/lib/asterisk/sounds/for-a-daily-wakeup-call.gsm
+#var/lib/asterisk/sounds/for-a-list-of.gsm
+#var/lib/asterisk/sounds/for-accounting.gsm
+#var/lib/asterisk/sounds/for-billing.gsm
+#var/lib/asterisk/sounds/for-english-press.gsm
+#var/lib/asterisk/sounds/for-investor-relations.gsm
+#var/lib/asterisk/sounds/for-louie-louie.gsm
+#var/lib/asterisk/sounds/for-no-press.gsm
+#var/lib/asterisk/sounds/for-qc-and-training-purposes.gsm
+#var/lib/asterisk/sounds/for-quality-purposes.gsm
+#var/lib/asterisk/sounds/for-sales.gsm
+#var/lib/asterisk/sounds/for-service.gsm
+#var/lib/asterisk/sounds/for-tech-support.gsm
+#var/lib/asterisk/sounds/for-the-first.gsm
+#var/lib/asterisk/sounds/for-the-weather.gsm
+#var/lib/asterisk/sounds/for-wakeup-call.gsm
+#var/lib/asterisk/sounds/for-yes-press.gsm
+#var/lib/asterisk/sounds/for.gsm
+#var/lib/asterisk/sounds/fort-worth.gsm
+#var/lib/asterisk/sounds/fortieth.gsm
+#var/lib/asterisk/sounds/fourteenth.gsm
+#var/lib/asterisk/sounds/fourth.gsm
+#var/lib/asterisk/sounds/freeze.gsm
+#var/lib/asterisk/sounds/freezing.gsm
+#var/lib/asterisk/sounds/frequency.gsm
+#var/lib/asterisk/sounds/fresno.gsm
+#var/lib/asterisk/sounds/from-unknown-caller.gsm
+#var/lib/asterisk/sounds/from.gsm
+#var/lib/asterisk/sounds/ftp.gsm
+#var/lib/asterisk/sounds/gale.gsm
+#var/lib/asterisk/sounds/gambling-drunk.gsm
+#var/lib/asterisk/sounds/georgia.gsm
+#var/lib/asterisk/sounds/gigabits.gsm
+#var/lib/asterisk/sounds/gigabytes.gsm
+#var/lib/asterisk/sounds/gigahertz.gsm
+#var/lib/asterisk/sounds/giggle1.gsm
+#var/lib/asterisk/sounds/gmt.gsm
+#var/lib/asterisk/sounds/go-away1.gsm
+#var/lib/asterisk/sounds/go-away2.gsm
+#var/lib/asterisk/sounds/good.gsm
+#var/lib/asterisk/sounds/goodbye.gsm
+#var/lib/asterisk/sounds/greater-than.gsm
+#var/lib/asterisk/sounds/groovy.gsm
+#var/lib/asterisk/sounds/ha
+#var/lib/asterisk/sounds/ha/ac.gsm
+#var/lib/asterisk/sounds/ha/air-conditioner.gsm
+#var/lib/asterisk/sounds/ha/alarm.gsm
+#var/lib/asterisk/sounds/ha/amp.gsm
+#var/lib/asterisk/sounds/ha/amps.gsm
+#var/lib/asterisk/sounds/ha/attic.gsm
+#var/lib/asterisk/sounds/ha/baby-sleeping-mode.gsm
+#var/lib/asterisk/sounds/ha/back.gsm
+#var/lib/asterisk/sounds/ha/basement.gsm
+#var/lib/asterisk/sounds/ha/bathroom.gsm
+#var/lib/asterisk/sounds/ha/bedroom.gsm
+#var/lib/asterisk/sounds/ha/bright.gsm
+#var/lib/asterisk/sounds/ha/callerid.gsm
+#var/lib/asterisk/sounds/ha/carport.gsm
+#var/lib/asterisk/sounds/ha/closet.gsm
+#var/lib/asterisk/sounds/ha/coffee-pot.gsm
+#var/lib/asterisk/sounds/ha/cool.gsm
+#var/lib/asterisk/sounds/ha/cooling.gsm
+#var/lib/asterisk/sounds/ha/dc.gsm
+#var/lib/asterisk/sounds/ha/decibel.gsm
+#var/lib/asterisk/sounds/ha/decibels.gsm
+#var/lib/asterisk/sounds/ha/deck.gsm
+#var/lib/asterisk/sounds/ha/degree.gsm
+#var/lib/asterisk/sounds/ha/degrees.gsm
+#var/lib/asterisk/sounds/ha/den.gsm
+#var/lib/asterisk/sounds/ha/dim.gsm
+#var/lib/asterisk/sounds/ha/dining-room.gsm
+#var/lib/asterisk/sounds/ha/door.gsm
+#var/lib/asterisk/sounds/ha/doors.gsm
+#var/lib/asterisk/sounds/ha/down.gsm
+#var/lib/asterisk/sounds/ha/driveway.gsm
+#var/lib/asterisk/sounds/ha/dryer.gsm
+#var/lib/asterisk/sounds/ha/fan.gsm
+#var/lib/asterisk/sounds/ha/farad.gsm
+#var/lib/asterisk/sounds/ha/farads.gsm
+#var/lib/asterisk/sounds/ha/first-floor.gsm
+#var/lib/asterisk/sounds/ha/floor.gsm
+#var/lib/asterisk/sounds/ha/floors.gsm
+#var/lib/asterisk/sounds/ha/for-extended-status-report.gsm
+#var/lib/asterisk/sounds/ha/for-quick-status-report.gsm
+#var/lib/asterisk/sounds/ha/for-wx-report.gsm
+#var/lib/asterisk/sounds/ha/fountain.gsm
+#var/lib/asterisk/sounds/ha/foyer.gsm
+#var/lib/asterisk/sounds/ha/front.gsm
+#var/lib/asterisk/sounds/ha/furnace.gsm
+#var/lib/asterisk/sounds/ha/game-room.gsm
+#var/lib/asterisk/sounds/ha/garage.gsm
+#var/lib/asterisk/sounds/ha/great-room.gsm
+#var/lib/asterisk/sounds/ha/guest-room.gsm
+#var/lib/asterisk/sounds/ha/hall.gsm
+#var/lib/asterisk/sounds/ha/has-been-left.gsm
+#var/lib/asterisk/sounds/ha/heat-pump.gsm
+#var/lib/asterisk/sounds/ha/heat.gsm
+#var/lib/asterisk/sounds/ha/heating.gsm
+#var/lib/asterisk/sounds/ha/hot-tub.gsm
+#var/lib/asterisk/sounds/ha/house.gsm
+#var/lib/asterisk/sounds/ha/intruder.gsm
+#var/lib/asterisk/sounds/ha/is.gsm
+#var/lib/asterisk/sounds/ha/kelvin.gsm
+#var/lib/asterisk/sounds/ha/kitchen.gsm
+#var/lib/asterisk/sounds/ha/lamp.gsm
+#var/lib/asterisk/sounds/ha/lamps.gsm
+#var/lib/asterisk/sounds/ha/landscape.gsm
+#var/lib/asterisk/sounds/ha/laundry.gsm
+#var/lib/asterisk/sounds/ha/library.gsm
+#var/lib/asterisk/sounds/ha/light.gsm
+#var/lib/asterisk/sounds/ha/lights.gsm
+#var/lib/asterisk/sounds/ha/living-room.gsm
+#var/lib/asterisk/sounds/ha/locked.gsm
+#var/lib/asterisk/sounds/ha/locking.gsm
+#var/lib/asterisk/sounds/ha/mailbox.gsm
+#var/lib/asterisk/sounds/ha/master.gsm
+#var/lib/asterisk/sounds/ha/off.gsm
+#var/lib/asterisk/sounds/ha/office.gsm
+#var/lib/asterisk/sounds/ha/ohm.gsm
+#var/lib/asterisk/sounds/ha/ohms.gsm
+#var/lib/asterisk/sounds/ha/on.gsm
+#var/lib/asterisk/sounds/ha/open.gsm
+#var/lib/asterisk/sounds/ha/patio.gsm
+#var/lib/asterisk/sounds/ha/phone.gsm
+#var/lib/asterisk/sounds/ha/play-room.gsm
+#var/lib/asterisk/sounds/ha/play.gsm
+#var/lib/asterisk/sounds/ha/pool.gsm
+#var/lib/asterisk/sounds/ha/porch.gsm
+#var/lib/asterisk/sounds/ha/power-failure.gsm
+#var/lib/asterisk/sounds/ha/pressure.gsm
+#var/lib/asterisk/sounds/ha/psi.gsm
+#var/lib/asterisk/sounds/ha/quiet-mode.gsm
+#var/lib/asterisk/sounds/ha/reset.gsm
+#var/lib/asterisk/sounds/ha/roof.gsm
+#var/lib/asterisk/sounds/ha/room.gsm
+#var/lib/asterisk/sounds/ha/rooms.gsm
+#var/lib/asterisk/sounds/ha/second-floor.gsm
+#var/lib/asterisk/sounds/ha/secure.gsm
+#var/lib/asterisk/sounds/ha/security-system.gsm
+#var/lib/asterisk/sounds/ha/set.gsm
+#var/lib/asterisk/sounds/ha/side.gsm
+#var/lib/asterisk/sounds/ha/solar.gsm
+#var/lib/asterisk/sounds/ha/sprinklers.gsm
+#var/lib/asterisk/sounds/ha/still.gsm
+#var/lib/asterisk/sounds/ha/stove.gsm
+#var/lib/asterisk/sounds/ha/sump-pump.gsm
+#var/lib/asterisk/sounds/ha/sun-room.gsm
+#var/lib/asterisk/sounds/ha/system.gsm
+#var/lib/asterisk/sounds/ha/systems.gsm
+#var/lib/asterisk/sounds/ha/thermostat.gsm
+#var/lib/asterisk/sounds/ha/to-control-environ-sys.gsm
+#var/lib/asterisk/sounds/ha/to-control-lights-appl.gsm
+#var/lib/asterisk/sounds/ha/tower.gsm
+#var/lib/asterisk/sounds/ha/unlocked.gsm
+#var/lib/asterisk/sounds/ha/unlocking.gsm
+#var/lib/asterisk/sounds/ha/up.gsm
+#var/lib/asterisk/sounds/ha/volt.gsm
+#var/lib/asterisk/sounds/ha/volts.gsm
+#var/lib/asterisk/sounds/ha/washing-machine.gsm
+#var/lib/asterisk/sounds/ha/water-heater.gsm
+#var/lib/asterisk/sounds/ha/watt.gsm
+#var/lib/asterisk/sounds/ha/watts.gsm
+#var/lib/asterisk/sounds/ha/well-pump.gsm
+#var/lib/asterisk/sounds/ha/window.gsm
+#var/lib/asterisk/sounds/ha/windows.gsm
+#var/lib/asterisk/sounds/ha/xmas-lights.gsm
+#var/lib/asterisk/sounds/ha/xmas-tree.gsm
+#var/lib/asterisk/sounds/ha/yard.gsm
+#var/lib/asterisk/sounds/hail.gsm
+#var/lib/asterisk/sounds/half.gsm
+#var/lib/asterisk/sounds/hang-on-a-second-angry.gsm
+#var/lib/asterisk/sounds/hang-on-a-second.gsm
+#var/lib/asterisk/sounds/hangup-try-again.gsm
+#var/lib/asterisk/sounds/has-arrived-at.gsm
+#var/lib/asterisk/sounds/has-been-changed-to.gsm
+#var/lib/asterisk/sounds/has-been-cleared.gsm
+#var/lib/asterisk/sounds/has-been-disconnected.gsm
+#var/lib/asterisk/sounds/has-been-set-to.gsm
+#var/lib/asterisk/sounds/has-been.gsm
+#var/lib/asterisk/sounds/has-expired.gsm
+#var/lib/asterisk/sounds/has-issued-a.gsm
+#var/lib/asterisk/sounds/has-not-been-seen-for.gsm
+#var/lib/asterisk/sounds/has.gsm
+#var/lib/asterisk/sounds/hash.gsm
+#var/lib/asterisk/sounds/hawaii.gsm
+#var/lib/asterisk/sounds/headed-towards.gsm
+#var/lib/asterisk/sounds/heading.gsm
+#var/lib/asterisk/sounds/health-center.gsm
+#var/lib/asterisk/sounds/hear-odd-noise.gsm
+#var/lib/asterisk/sounds/hear-toilet-flush.gsm
+#var/lib/asterisk/sounds/hectopascal.gsm
+#var/lib/asterisk/sounds/helpdesk.gsm
+#var/lib/asterisk/sounds/hertz.gsm
+#var/lib/asterisk/sounds/high.gsm
+#var/lib/asterisk/sounds/highway.gsm
+#var/lib/asterisk/sounds/hit.gsm
+#var/lib/asterisk/sounds/hold-or-dial-0.gsm
+#var/lib/asterisk/sounds/home.gsm
+#var/lib/asterisk/sounds/honolulu.gsm
+#var/lib/asterisk/sounds/hours.gsm
+#var/lib/asterisk/sounds/housekeeping.gsm
+#var/lib/asterisk/sounds/houston.gsm
+#var/lib/asterisk/sounds/http.gsm
+#var/lib/asterisk/sounds/human-resources.gsm
+#var/lib/asterisk/sounds/humidity.gsm
+#var/lib/asterisk/sounds/hundredth.gsm
+#var/lib/asterisk/sounds/hurricane.gsm
+#var/lib/asterisk/sounds/hz.gsm
+#var/lib/asterisk/sounds/i-dont-understand.gsm
+#var/lib/asterisk/sounds/i-dont-understand2.gsm
+#var/lib/asterisk/sounds/i-dont-understand3.gsm
+#var/lib/asterisk/sounds/i-dont-understand4.gsm
+#var/lib/asterisk/sounds/i-dont-understand5.gsm
+#var/lib/asterisk/sounds/i-grow-bored.gsm
+#var/lib/asterisk/sounds/ice.gsm
+#var/lib/asterisk/sounds/icmp.gsm
+#var/lib/asterisk/sounds/icy.gsm
+#var/lib/asterisk/sounds/idaho.gsm
+#var/lib/asterisk/sounds/if-correct-press.gsm
+#var/lib/asterisk/sounds/if-grtg-played-indefinately.gsm
+#var/lib/asterisk/sounds/if-grtg-should-expire-at.gsm
+#var/lib/asterisk/sounds/if-maint-contract-or-emergency.gsm
+#var/lib/asterisk/sounds/if-rotary-phone.gsm
+#var/lib/asterisk/sounds/if-this-is-correct-press.gsm
+#var/lib/asterisk/sounds/if-this-is-correct.gsm
+#var/lib/asterisk/sounds/if-this-is-not-correct.gsm
+#var/lib/asterisk/sounds/if-u-know-ext-dial.gsm
+#var/lib/asterisk/sounds/if-unsuccessful-speak-to.gsm
+#var/lib/asterisk/sounds/if-you-know-the.gsm
+#var/lib/asterisk/sounds/if-you-need-help.gsm
+#var/lib/asterisk/sounds/if-youd-like-to-make-a-call.gsm
+#var/lib/asterisk/sounds/illinois.gsm
+#var/lib/asterisk/sounds/im-sorry-unable-to-connect-to-eng.gsm
+#var/lib/asterisk/sounds/im-sorry.gsm
+#var/lib/asterisk/sounds/imap.gsm
+#var/lib/asterisk/sounds/in-service.gsm
+#var/lib/asterisk/sounds/in-the-line.gsm
+#var/lib/asterisk/sounds/in-the-queue.gsm
+#var/lib/asterisk/sounds/in-the.gsm
+#var/lib/asterisk/sounds/in-your-city.gsm
+#var/lib/asterisk/sounds/in-your-zip-code.gsm
+#var/lib/asterisk/sounds/inbound.gsm
+#var/lib/asterisk/sounds/indiana.gsm
+#var/lib/asterisk/sounds/indianapolis.gsm
+#var/lib/asterisk/sounds/indicated.gsm
+#var/lib/asterisk/sounds/info-about-last-call.gsm
+#var/lib/asterisk/sounds/information-technology.gsm
+#var/lib/asterisk/sounds/information.gsm
+#var/lib/asterisk/sounds/infuriate-tech-staff.gsm
+#var/lib/asterisk/sounds/initiated.gsm
+#var/lib/asterisk/sounds/initiating.gsm
+#var/lib/asterisk/sounds/inside-sales.gsm
+#var/lib/asterisk/sounds/internal-audit.gsm
+#var/lib/asterisk/sounds/international-call.gsm
+#var/lib/asterisk/sounds/interstate.gsm
+#var/lib/asterisk/sounds/invalid-date.gsm
+#var/lib/asterisk/sounds/investor-relations.gsm
+#var/lib/asterisk/sounds/iowa.gsm
+#var/lib/asterisk/sounds/is-at.gsm
+#var/lib/asterisk/sounds/is-curntly-busy.gsm
+#var/lib/asterisk/sounds/is-curntly-unavail.gsm
+#var/lib/asterisk/sounds/is-currently.gsm
+#var/lib/asterisk/sounds/is-in-use.gsm
+#var/lib/asterisk/sounds/is-not-in-the.gsm
+#var/lib/asterisk/sounds/is-not-set.gsm
+#var/lib/asterisk/sounds/is-now-being-recorded.gsm
+#var/lib/asterisk/sounds/is-set-to.gsm
+#var/lib/asterisk/sounds/is.gsm
+#var/lib/asterisk/sounds/it-now.gsm
+#var/lib/asterisk/sounds/it-services.gsm
+#var/lib/asterisk/sounds/jacksonville.gsm
+#var/lib/asterisk/sounds/janitorial.gsm
+#var/lib/asterisk/sounds/jason.gsm
+#var/lib/asterisk/sounds/jedi-extension-trick.gsm
+#var/lib/asterisk/sounds/john.gsm
+#var/lib/asterisk/sounds/just-kidding-not-upset.gsm
+#var/lib/asterisk/sounds/just-kidding-not-upset2.gsm
+#var/lib/asterisk/sounds/kansas-city.gsm
+#var/lib/asterisk/sounds/kansas.gsm
+#var/lib/asterisk/sounds/kentucky.gsm
+#var/lib/asterisk/sounds/kilobits.gsm
+#var/lib/asterisk/sounds/kilobytes.gsm
+#var/lib/asterisk/sounds/kilohertz.gsm
+#var/lib/asterisk/sounds/kilometer.gsm
+#var/lib/asterisk/sounds/kilometers-per-hour.gsm
+#var/lib/asterisk/sounds/knock-knock.gsm
+#var/lib/asterisk/sounds/knots.gsm
+#var/lib/asterisk/sounds/language.gsm
+#var/lib/asterisk/sounds/las-vegas.gsm
+#var/lib/asterisk/sounds/last-error-was.gsm
+#var/lib/asterisk/sounds/last-num-to-call.gsm
+#var/lib/asterisk/sounds/late.gsm
+#var/lib/asterisk/sounds/later.gsm
+#var/lib/asterisk/sounds/lea-may-request-info.gsm
+#var/lib/asterisk/sounds/left-bracket.gsm
+#var/lib/asterisk/sounds/legal.gsm
+#var/lib/asterisk/sounds/len.gsm
+#var/lib/asterisk/sounds/less-than.gsm
+#var/lib/asterisk/sounds/library.gsm
+#var/lib/asterisk/sounds/lightning.gsm
+#var/lib/asterisk/sounds/limit-simul-calls.gsm
+#var/lib/asterisk/sounds/lines-complaining-customers.gsm
+#var/lib/asterisk/sounds/linux.gsm
+#var/lib/asterisk/sounds/list.gsm
+#var/lib/asterisk/sounds/load-average.gsm
+#var/lib/asterisk/sounds/local-authorities.gsm
+#var/lib/asterisk/sounds/location.gsm
+#var/lib/asterisk/sounds/login-fail.gsm
+#var/lib/asterisk/sounds/long-beach.gsm
+#var/lib/asterisk/sounds/los-angeles.gsm
+#var/lib/asterisk/sounds/loss-prevention.gsm
+#var/lib/asterisk/sounds/loss.gsm
+#var/lib/asterisk/sounds/lots-o-monkeys.gsm
+#var/lib/asterisk/sounds/louisiana.gsm
+#var/lib/asterisk/sounds/low.gsm
+#var/lib/asterisk/sounds/lunch.gsm
+#var/lib/asterisk/sounds/lyrics-louie-louie.gsm
+#var/lib/asterisk/sounds/machine.gsm
+#var/lib/asterisk/sounds/made-it-up.gsm
+#var/lib/asterisk/sounds/mail.gsm
+#var/lib/asterisk/sounds/mailroom.gsm
+#var/lib/asterisk/sounds/main-menu.gsm
+#var/lib/asterisk/sounds/maine.gsm
+#var/lib/asterisk/sounds/maintenance.gsm
+#var/lib/asterisk/sounds/male.gsm
+#var/lib/asterisk/sounds/management.gsm
+#var/lib/asterisk/sounds/manufacturing.gsm
+#var/lib/asterisk/sounds/marketing.gsm
+#var/lib/asterisk/sounds/marryme.gsm
+#var/lib/asterisk/sounds/maryland.gsm
+#var/lib/asterisk/sounds/massachusetts.gsm
+#var/lib/asterisk/sounds/mathematics.gsm
+#var/lib/asterisk/sounds/maximum.gsm
+#var/lib/asterisk/sounds/megabits.gsm
+#var/lib/asterisk/sounds/megabytes.gsm
+#var/lib/asterisk/sounds/megahertz.gsm
+#var/lib/asterisk/sounds/memory.gsm
+#var/lib/asterisk/sounds/memphis.gsm
+#var/lib/asterisk/sounds/menu.gsm
+#var/lib/asterisk/sounds/mesa.gsm
+#var/lib/asterisk/sounds/message-from.gsm
+#var/lib/asterisk/sounds/message-number.gsm
+#var/lib/asterisk/sounds/meter.gsm
+#var/lib/asterisk/sounds/meters.gsm
+#var/lib/asterisk/sounds/miami.gsm
+#var/lib/asterisk/sounds/michigan.gsm
+#var/lib/asterisk/sounds/midnight-tomorrow-night.gsm
+#var/lib/asterisk/sounds/midnight-tonight.gsm
+#var/lib/asterisk/sounds/midnight.gsm
+#var/lib/asterisk/sounds/mike.gsm
+#var/lib/asterisk/sounds/miles-per-hour.gsm
+#var/lib/asterisk/sounds/miles.gsm
+#var/lib/asterisk/sounds/millionth.gsm
+#var/lib/asterisk/sounds/milwaukee.gsm
+#var/lib/asterisk/sounds/minimum.gsm
+#var/lib/asterisk/sounds/minneapolis.gsm
+#var/lib/asterisk/sounds/minnesota.gsm
+#var/lib/asterisk/sounds/minus.gsm
+#var/lib/asterisk/sounds/minute.gsm
+#var/lib/asterisk/sounds/minutes.gsm
+#var/lib/asterisk/sounds/missed.gsm
+#var/lib/asterisk/sounds/mississippi.gsm
+#var/lib/asterisk/sounds/missouri.gsm
+#var/lib/asterisk/sounds/misty.gsm
+#var/lib/asterisk/sounds/monitored.gsm
+#var/lib/asterisk/sounds/montana.gsm
+#var/lib/asterisk/sounds/month.gsm
+#var/lib/asterisk/sounds/months.gsm
+#var/lib/asterisk/sounds/moo1.gsm
+#var/lib/asterisk/sounds/moo2.gsm
+#var/lib/asterisk/sounds/morning.gsm
+#var/lib/asterisk/sounds/moron.gsm
+#var/lib/asterisk/sounds/mostly.gsm
+#var/lib/asterisk/sounds/motor-pool.gsm
+#var/lib/asterisk/sounds/mountain.gsm
+#var/lib/asterisk/sounds/moving.gsm
+#var/lib/asterisk/sounds/ms.gsm
+#var/lib/asterisk/sounds/nashville.gsm
+#var/lib/asterisk/sounds/national-weather-service.gsm
+#var/lib/asterisk/sounds/nautical-miles.gsm
+#var/lib/asterisk/sounds/nbdy-avail-to-take-call.gsm
+#var/lib/asterisk/sounds/near.gsm
+#var/lib/asterisk/sounds/nebraska.gsm
+#var/lib/asterisk/sounds/negative.gsm
+#var/lib/asterisk/sounds/network-operations-center.gsm
+#var/lib/asterisk/sounds/network-operations.gsm
+#var/lib/asterisk/sounds/nevada.gsm
+#var/lib/asterisk/sounds/new-accounts.gsm
+#var/lib/asterisk/sounds/new-hampshire.gsm
+#var/lib/asterisk/sounds/new-jersey.gsm
+#var/lib/asterisk/sounds/new-mexico.gsm
+#var/lib/asterisk/sounds/new-orleans.gsm
+#var/lib/asterisk/sounds/new-york.gsm
+#var/lib/asterisk/sounds/nineteenth.gsm
+#var/lib/asterisk/sounds/ninetieth.gsm
+#var/lib/asterisk/sounds/ninth.gsm
+#var/lib/asterisk/sounds/no-112-1.gsm
+#var/lib/asterisk/sounds/no-112-2.gsm
+#var/lib/asterisk/sounds/no-911-1.gsm
+#var/lib/asterisk/sounds/no-911-2.gsm
+#var/lib/asterisk/sounds/no-empty-conferences.gsm
+#var/lib/asterisk/sounds/no-info-about-number.gsm
+#var/lib/asterisk/sounds/no-longer-in-service.gsm
+#var/lib/asterisk/sounds/no-reply-no-mailbox.gsm
+#var/lib/asterisk/sounds/no-route-exists-to-dest.gsm
+#var/lib/asterisk/sounds/nobody-but-chickens.gsm
+#var/lib/asterisk/sounds/node.gsm
+#var/lib/asterisk/sounds/north-carolina.gsm
+#var/lib/asterisk/sounds/north-dakota.gsm
+#var/lib/asterisk/sounds/north.gsm
+#var/lib/asterisk/sounds/northerly.gsm
+#var/lib/asterisk/sounds/not-auth-pstn.gsm
+#var/lib/asterisk/sounds/not-enough-credit.gsm
+#var/lib/asterisk/sounds/not-necessary-1.gsm
+#var/lib/asterisk/sounds/not-necessary-ac.gsm
+#var/lib/asterisk/sounds/not-necessary-dial-1-or-ac.gsm
+#var/lib/asterisk/sounds/not-rqsted-wakeup.gsm
+#var/lib/asterisk/sounds/not-taking-your-call.gsm
+#var/lib/asterisk/sounds/not-yet-assigned.gsm
+#var/lib/asterisk/sounds/not-yet-connected.gsm
+#var/lib/asterisk/sounds/nothing-recorded.gsm
+#var/lib/asterisk/sounds/now.gsm
+#var/lib/asterisk/sounds/num-not-in-db.gsm
+#var/lib/asterisk/sounds/num-outside-area.gsm
+#var/lib/asterisk/sounds/num-was-successfully.gsm
+#var/lib/asterisk/sounds/number-not-answering.gsm
+#var/lib/asterisk/sounds/number.gsm
+#var/lib/asterisk/sounds/oakland.gsm
+#var/lib/asterisk/sounds/octothorpe.gsm
+#var/lib/asterisk/sounds/off-duty.gsm
+#var/lib/asterisk/sounds/office-code.gsm
+#var/lib/asterisk/sounds/office-iguanas.gsm
+#var/lib/asterisk/sounds/office.gsm
+#var/lib/asterisk/sounds/ohio.gsm
+#var/lib/asterisk/sounds/oklahoma-city.gsm
+#var/lib/asterisk/sounds/oklahoma.gsm
+#var/lib/asterisk/sounds/omaha.gsm
+#var/lib/asterisk/sounds/on-busy.gsm
+#var/lib/asterisk/sounds/on-monthly-tel-stment.gsm
+#var/lib/asterisk/sounds/on-no-answer.gsm
+#var/lib/asterisk/sounds/on.gsm
+#var/lib/asterisk/sounds/one-moment-please.gsm
+#var/lib/asterisk/sounds/one-small-step.gsm
+#var/lib/asterisk/sounds/one-small-step2.gsm
+#var/lib/asterisk/sounds/oops1.gsm
+#var/lib/asterisk/sounds/oops2.gsm
+#var/lib/asterisk/sounds/oops3.gsm
+#var/lib/asterisk/sounds/open-parenthesis.gsm
+#var/lib/asterisk/sounds/operations.gsm
+#var/lib/asterisk/sounds/option-not-implemented.gsm
+#var/lib/asterisk/sounds/or-press.gsm
+#var/lib/asterisk/sounds/or.gsm
+#var/lib/asterisk/sounds/order-desk.gsm
+#var/lib/asterisk/sounds/orders.gsm
+#var/lib/asterisk/sounds/oregon.gsm
+#var/lib/asterisk/sounds/other-options-exercise.gsm
+#var/lib/asterisk/sounds/otherwise-press.gsm
+#var/lib/asterisk/sounds/otherwise.gsm
+#var/lib/asterisk/sounds/our-business-hours-are.gsm
+#var/lib/asterisk/sounds/outbound.gsm
+#var/lib/asterisk/sounds/outside-sales.gsm
+#var/lib/asterisk/sounds/outside-transfer.gsm
+#var/lib/asterisk/sounds/p.gsm
+#var/lib/asterisk/sounds/pacific.gsm
+#var/lib/asterisk/sounds/packet.gsm
+#var/lib/asterisk/sounds/panic.gsm
+#var/lib/asterisk/sounds/partially.gsm
+#var/lib/asterisk/sounds/partly.gsm
+#var/lib/asterisk/sounds/pascal.gsm
+#var/lib/asterisk/sounds/pascal2.gsm
+#var/lib/asterisk/sounds/patchy.gsm
+#var/lib/asterisk/sounds/pence.gsm
+#var/lib/asterisk/sounds/pennies.gsm
+#var/lib/asterisk/sounds/pennsylvania.gsm
+#var/lib/asterisk/sounds/penny.gsm
+#var/lib/asterisk/sounds/percent.gsm
+#var/lib/asterisk/sounds/perhaps-we-are.gsm
+#var/lib/asterisk/sounds/perhaps-we-are2.gsm
+#var/lib/asterisk/sounds/period.gsm
+#var/lib/asterisk/sounds/personnel.gsm
+#var/lib/asterisk/sounds/persons-in-path-of.gsm
+#var/lib/asterisk/sounds/philadelphia.gsm
+#var/lib/asterisk/sounds/phoenix.gsm
+#var/lib/asterisk/sounds/phonetic/alpha.gsm
+#var/lib/asterisk/sounds/phonetic/bravo.gsm
+#var/lib/asterisk/sounds/phonetic/charlie.gsm
+#var/lib/asterisk/sounds/phonetic/delta.gsm
+#var/lib/asterisk/sounds/phonetic/echo.gsm
+#var/lib/asterisk/sounds/phonetic/foxtrot.gsm
+#var/lib/asterisk/sounds/phonetic/golf.gsm
+#var/lib/asterisk/sounds/phonetic/hotel.gsm
+#var/lib/asterisk/sounds/phonetic/india.gsm
+#var/lib/asterisk/sounds/phonetic/juliet.gsm
+#var/lib/asterisk/sounds/phonetic/kilo.gsm
+#var/lib/asterisk/sounds/phonetic/lima.gsm
+#var/lib/asterisk/sounds/phonetic/mike.gsm
+#var/lib/asterisk/sounds/phonetic/niner.gsm
+#var/lib/asterisk/sounds/phonetic/november.gsm
+#var/lib/asterisk/sounds/phonetic/oscar.gsm
+#var/lib/asterisk/sounds/phonetic/papa.gsm
+#var/lib/asterisk/sounds/phonetic/quebec.gsm
+#var/lib/asterisk/sounds/phonetic/romeo.gsm
+#var/lib/asterisk/sounds/phonetic/sierra.gsm
+#var/lib/asterisk/sounds/phonetic/tango.gsm
+#var/lib/asterisk/sounds/phonetic/uniform.gsm
+#var/lib/asterisk/sounds/phonetic/victor.gsm
+#var/lib/asterisk/sounds/phonetic/whiskey.gsm
+#var/lib/asterisk/sounds/phonetic/xray.gsm
+#var/lib/asterisk/sounds/phonetic/yankee.gsm
+#var/lib/asterisk/sounds/phonetic/zulu.gsm
+#var/lib/asterisk/sounds/physics.gsm
+#var/lib/asterisk/sounds/pin-invalid.gsm
+#var/lib/asterisk/sounds/pin-number-accepted.gsm
+#var/lib/asterisk/sounds/ping.gsm
+#var/lib/asterisk/sounds/pipe.gsm
+#var/lib/asterisk/sounds/planning.gsm
+#var/lib/asterisk/sounds/please-answer-the-following.gsm
+#var/lib/asterisk/sounds/please-contact-tech-supt.gsm
+#var/lib/asterisk/sounds/please-enter-first-three-letters.gsm
+#var/lib/asterisk/sounds/please-enter-the.gsm
+#var/lib/asterisk/sounds/please-enter-your.gsm
+#var/lib/asterisk/sounds/please-hang-up-and-dial-operator.gsm
+#var/lib/asterisk/sounds/please-hang-up-and-try-again.gsm
+#var/lib/asterisk/sounds/please-try-again-later.gsm
+#var/lib/asterisk/sounds/please-try-again.gsm
+#var/lib/asterisk/sounds/please-try.gsm
+#var/lib/asterisk/sounds/please-wait-connect-oncall-eng.gsm
+#var/lib/asterisk/sounds/pls-ent-num-transfer.gsm
+#var/lib/asterisk/sounds/pls-enter-conf-password.gsm
+#var/lib/asterisk/sounds/pls-enter-num-message-after-tone.gsm
+#var/lib/asterisk/sounds/pls-enter-vm-password.gsm
+#var/lib/asterisk/sounds/pls-entr-num-uwish2-call.gsm
+#var/lib/asterisk/sounds/pls-hold-silent30.gsm
+#var/lib/asterisk/sounds/pls-hold-while-try.gsm
+#var/lib/asterisk/sounds/pls-lv-msg-will-contact.gsm
+#var/lib/asterisk/sounds/pls-rcrd-name-at-tone.gsm
+#var/lib/asterisk/sounds/pls-stay-on-line.gsm
+#var/lib/asterisk/sounds/pls-try-again.gsm
+#var/lib/asterisk/sounds/pls-try-area-code.gsm
+#var/lib/asterisk/sounds/pls-try-call-later.gsm
+#var/lib/asterisk/sounds/pls-try-manually.gsm
+#var/lib/asterisk/sounds/pls-wait-connect-call.gsm
+#var/lib/asterisk/sounds/plugh.gsm
+#var/lib/asterisk/sounds/plus.gsm
+#var/lib/asterisk/sounds/pm-announcement-number.gsm
+#var/lib/asterisk/sounds/pm-invalid-option.gsm
+#var/lib/asterisk/sounds/pm-phrase-management.gsm
+#var/lib/asterisk/sounds/pm-prompt-number.gsm
+#var/lib/asterisk/sounds/pm-to-record-phrase.gsm
+#var/lib/asterisk/sounds/pm-to-review-phrase.gsm
+#var/lib/asterisk/sounds/point.gsm
+#var/lib/asterisk/sounds/pop.gsm
+#var/lib/asterisk/sounds/port.gsm
+#var/lib/asterisk/sounds/portland.gsm
+#var/lib/asterisk/sounds/portnumber.gsm
+#var/lib/asterisk/sounds/position.gsm
+#var/lib/asterisk/sounds/post-entry-pound.gsm
+#var/lib/asterisk/sounds/pound.gsm
+#var/lib/asterisk/sounds/pounds.gsm
+#var/lib/asterisk/sounds/presales-support.gsm
+#var/lib/asterisk/sounds/presidents-office.gsm
+#var/lib/asterisk/sounds/press-0.gsm
+#var/lib/asterisk/sounds/press-1.gsm
+#var/lib/asterisk/sounds/press-2.gsm
+#var/lib/asterisk/sounds/press-3.gsm
+#var/lib/asterisk/sounds/press-4.gsm
+#var/lib/asterisk/sounds/press-5.gsm
+#var/lib/asterisk/sounds/press-6-to-eject.gsm
+#var/lib/asterisk/sounds/press-6.gsm
+#var/lib/asterisk/sounds/press-7.gsm
+#var/lib/asterisk/sounds/press-8.gsm
+#var/lib/asterisk/sounds/press-9.gsm
+#var/lib/asterisk/sounds/press-button-again.gsm
+#var/lib/asterisk/sounds/press-enter.gsm
+#var/lib/asterisk/sounds/press-escape.gsm
+#var/lib/asterisk/sounds/press-hash.gsm
+#var/lib/asterisk/sounds/press-pound-save-changes.gsm
+#var/lib/asterisk/sounds/press-pound-to-login-star-to-hangup.gsm
+#var/lib/asterisk/sounds/press-pound.gsm
+#var/lib/asterisk/sounds/press-return.gsm
+#var/lib/asterisk/sounds/press-star-cancel.gsm
+#var/lib/asterisk/sounds/press-star.gsm
+#var/lib/asterisk/sounds/press-the-space-bar.gsm
+#var/lib/asterisk/sounds/press-tilde.gsm
+#var/lib/asterisk/sounds/press.gsm
+#var/lib/asterisk/sounds/pressure.gsm
+#var/lib/asterisk/sounds/printing.gsm
+#var/lib/asterisk/sounds/privacy-blacklisted.gsm
+#var/lib/asterisk/sounds/privacy-blocked.gsm
+#var/lib/asterisk/sounds/privacy-if-error-leave-message-or-hangup.gsm
+#var/lib/asterisk/sounds/privacy-if-error.gsm
+#var/lib/asterisk/sounds/privacy-if-sales-call-contact-in-writing.gsm
+#var/lib/asterisk/sounds/privacy-last-caller-was.gsm
+#var/lib/asterisk/sounds/privacy-not.gsm
+#var/lib/asterisk/sounds/privacy-please-dial.gsm
+#var/lib/asterisk/sounds/privacy-please-stay-on-line-to-be-connected.gsm
+#var/lib/asterisk/sounds/privacy-screening-unidentified-calls.gsm
+#var/lib/asterisk/sounds/privacy-stop-calling-not-welcome.gsm
+#var/lib/asterisk/sounds/privacy-stop-calling-not-welcome2.gsm
+#var/lib/asterisk/sounds/privacy-this-number-is.gsm
+#var/lib/asterisk/sounds/privacy-to-blacklist-last-caller.gsm
+#var/lib/asterisk/sounds/privacy-to-blacklist-this-number.gsm
+#var/lib/asterisk/sounds/privacy-to-hear-our-contact-details.gsm
+#var/lib/asterisk/sounds/privacy-to-whitelist-last-caller.gsm
+#var/lib/asterisk/sounds/privacy-to-whitelist-this-number.gsm
+#var/lib/asterisk/sounds/privacy-whitelisted.gsm
+#var/lib/asterisk/sounds/privacy-you-are-blacklisted.gsm
+#var/lib/asterisk/sounds/privacy-you-are-calling-from.gsm
+#var/lib/asterisk/sounds/privacy-your-callerid-is.gsm
+#var/lib/asterisk/sounds/product.gsm
+#var/lib/asterisk/sounds/production.gsm
+#var/lib/asterisk/sounds/projects.gsm
+#var/lib/asterisk/sounds/protocol.gsm
+#var/lib/asterisk/sounds/public-relations.gsm
+#var/lib/asterisk/sounds/purchasing.gsm
+#var/lib/asterisk/sounds/purposes.gsm
+#var/lib/asterisk/sounds/q-dot-931.gsm
+#var/lib/asterisk/sounds/q-dot-9thirty1.gsm
+#var/lib/asterisk/sounds/quality-assurance.gsm
+#var/lib/asterisk/sounds/quality-control.gsm
+#var/lib/asterisk/sounds/quarter.gsm
+#var/lib/asterisk/sounds/quickly.gsm
+#var/lib/asterisk/sounds/quote.gsm
+#var/lib/asterisk/sounds/race.gsm
+#var/lib/asterisk/sounds/rain.gsm
+#var/lib/asterisk/sounds/rainfall.gsm
+#var/lib/asterisk/sounds/rainy.gsm
+#var/lib/asterisk/sounds/range.gsm
+#var/lib/asterisk/sounds/reassigned-new-areacode.gsm
+#var/lib/asterisk/sounds/rebates.gsm
+#var/lib/asterisk/sounds/received.gsm
+#var/lib/asterisk/sounds/receiving.gsm
+#var/lib/asterisk/sounds/reception.gsm
+#var/lib/asterisk/sounds/recorded.gsm
+#var/lib/asterisk/sounds/registrar.gsm
+#var/lib/asterisk/sounds/remote-already-in-this-mode-2.gsm
+#var/lib/asterisk/sounds/remote-already-in-this-mode.gsm
+#var/lib/asterisk/sounds/remote-base.gsm
+#var/lib/asterisk/sounds/removed.gsm
+#var/lib/asterisk/sounds/repair.gsm
+#var/lib/asterisk/sounds/repeat-only.gsm
+#var/lib/asterisk/sounds/repeater.gsm
+#var/lib/asterisk/sounds/research-and-development.gsm
+#var/lib/asterisk/sounds/research.gsm
+#var/lib/asterisk/sounds/reservations.gsm
+#var/lib/asterisk/sounds/restarting.gsm
+#var/lib/asterisk/sounds/rhode-island.gsm
+#var/lib/asterisk/sounds/right-bracket.gsm
+#var/lib/asterisk/sounds/rising.gsm
+#var/lib/asterisk/sounds/risk-management.gsm
+#var/lib/asterisk/sounds/roaming.gsm
+#var/lib/asterisk/sounds/room-service.gsm
+#var/lib/asterisk/sounds/route-sip.gsm
+#var/lib/asterisk/sounds/rqsted-wakeup-for.gsm
+#var/lib/asterisk/sounds/sacramento.gsm
+#var/lib/asterisk/sounds/saint-louis.gsm
+#var/lib/asterisk/sounds/sales-floor.gsm
+#var/lib/asterisk/sounds/sales.gsm
+#var/lib/asterisk/sounds/san-antonio.gsm
+#var/lib/asterisk/sounds/san-diego.gsm
+#var/lib/asterisk/sounds/san-francisco.gsm
+#var/lib/asterisk/sounds/san-jose.gsm
+#var/lib/asterisk/sounds/save-announce-press.gsm
+#var/lib/asterisk/sounds/say-temp-msg-prs-pound.gsm
+#var/lib/asterisk/sounds/says-thats-stupid.gsm
+#var/lib/asterisk/sounds/scattered.gsm
+#var/lib/asterisk/sounds/sciences.gsm
+#var/lib/asterisk/sounds/seattle.gsm
+#var/lib/asterisk/sounds/second.gsm
+#var/lib/asterisk/sounds/seconds.gsm
+#var/lib/asterisk/sounds/secretary.gsm
+#var/lib/asterisk/sounds/security.gsm
+#var/lib/asterisk/sounds/self-destruct-in.gsm
+#var/lib/asterisk/sounds/self-destruct.gsm
+#var/lib/asterisk/sounds/server.gsm
+#var/lib/asterisk/sounds/service-not-implemented.gsm
+#var/lib/asterisk/sounds/service.gsm
+#var/lib/asterisk/sounds/seventeenth.gsm
+#var/lib/asterisk/sounds/seventh.gsm
+#var/lib/asterisk/sounds/seventieth.gsm
+#var/lib/asterisk/sounds/severe.gsm
+#var/lib/asterisk/sounds/shall-i-try-again.gsm
+#var/lib/asterisk/sounds/shiny-brass-lamp.gsm
+#var/lib/asterisk/sounds/shipping.gsm
+#var/lib/asterisk/sounds/shop.gsm
+#var/lib/asterisk/sounds/show-office.gsm
+#var/lib/asterisk/sounds/sighted.gsm
+#var/lib/asterisk/sounds/silence
+#var/lib/asterisk/sounds/silence/1.gsm
+#var/lib/asterisk/sounds/silence/10.gsm
+#var/lib/asterisk/sounds/silence/2.gsm
+#var/lib/asterisk/sounds/silence/3.gsm
+#var/lib/asterisk/sounds/silence/4.gsm
+#var/lib/asterisk/sounds/silence/5.gsm
+#var/lib/asterisk/sounds/silence/6.gsm
+#var/lib/asterisk/sounds/silence/7.gsm
+#var/lib/asterisk/sounds/silence/8.gsm
+#var/lib/asterisk/sounds/silence/9.gsm
+#var/lib/asterisk/sounds/simplex.gsm
+#var/lib/asterisk/sounds/simul-call-limit-reached.gsm
+#var/lib/asterisk/sounds/sixteenth.gsm
+#var/lib/asterisk/sounds/sixth.gsm
+#var/lib/asterisk/sounds/sixtieth.gsm
+#var/lib/asterisk/sounds/slash.gsm
+#var/lib/asterisk/sounds/sleet.gsm
+#var/lib/asterisk/sounds/sleeting.gsm
+#var/lib/asterisk/sounds/slow.gsm
+#var/lib/asterisk/sounds/slowly.gsm
+#var/lib/asterisk/sounds/snow.gsm
+#var/lib/asterisk/sounds/snowing.gsm
+#var/lib/asterisk/sounds/snowy.gsm
+#var/lib/asterisk/sounds/software.gsm
+#var/lib/asterisk/sounds/someone-you-trust1.gsm
+#var/lib/asterisk/sounds/someone-you-trust2.gsm
+#var/lib/asterisk/sounds/someone-you-trust3.gsm
+#var/lib/asterisk/sounds/something-terribly-wrong.gsm
+#var/lib/asterisk/sounds/sorry-cant-let-you-do-that.gsm
+#var/lib/asterisk/sounds/sorry-cant-let-you-do-that2.gsm
+#var/lib/asterisk/sounds/sorry-cant-let-you-do-that3.gsm
+#var/lib/asterisk/sounds/sorry-mailbox-full.gsm
+#var/lib/asterisk/sounds/sorry-youre-having-problems.gsm
+#var/lib/asterisk/sounds/sorry.gsm
+#var/lib/asterisk/sounds/sorry2.gsm
+#var/lib/asterisk/sounds/south-carolina.gsm
+#var/lib/asterisk/sounds/south-dakota.gsm
+#var/lib/asterisk/sounds/south.gsm
+#var/lib/asterisk/sounds/southerly.gsm
+#var/lib/asterisk/sounds/space.gsm
+#var/lib/asterisk/sounds/spam.gsm
+#var/lib/asterisk/sounds/spam2.gsm
+#var/lib/asterisk/sounds/speak-louder-into-phone.gsm
+#var/lib/asterisk/sounds/speak-louder.gsm
+#var/lib/asterisk/sounds/speak-to-the-operator.gsm
+#var/lib/asterisk/sounds/speed-dial-empty.gsm
+#var/lib/asterisk/sounds/speed-dial.gsm
+#var/lib/asterisk/sounds/speed.gsm
+#var/lib/asterisk/sounds/splat.gsm
+#var/lib/asterisk/sounds/ssh.gsm
+#var/lib/asterisk/sounds/staff.gsm
+#var/lib/asterisk/sounds/staffing.gsm
+#var/lib/asterisk/sounds/standard.gsm
+#var/lib/asterisk/sounds/star-for-menu-again.gsm
+#var/lib/asterisk/sounds/star.gsm
+#var/lib/asterisk/sounds/starting-with-either.gsm
+#var/lib/asterisk/sounds/station.gsm
+#var/lib/asterisk/sounds/status.gsm
+#var/lib/asterisk/sounds/step-in-stream.gsm
+#var/lib/asterisk/sounds/sterling.gsm
+#var/lib/asterisk/sounds/store-accounting.gsm
+#var/lib/asterisk/sounds/storm.gsm
+#var/lib/asterisk/sounds/sun.gsm
+#var/lib/asterisk/sounds/sunny.gsm
+#var/lib/asterisk/sounds/support.gsm
+#var/lib/asterisk/sounds/swap.gsm
+#var/lib/asterisk/sounds/system-crashed.gsm
+#var/lib/asterisk/sounds/system-status-msg.gsm
+#var/lib/asterisk/sounds/system.gsm
+#var/lib/asterisk/sounds/systems.gsm
+#var/lib/asterisk/sounds/talking-to-myself.gsm
+#var/lib/asterisk/sounds/target-attendant.gsm
+#var/lib/asterisk/sounds/tcp.gsm
+#var/lib/asterisk/sounds/technical-support.gsm
+#var/lib/asterisk/sounds/telephone-in-your-pocket.gsm
+#var/lib/asterisk/sounds/telephone-in-your-pocket2.gsm
+#var/lib/asterisk/sounds/telephone-number.gsm
+#var/lib/asterisk/sounds/telesales.gsm
+#var/lib/asterisk/sounds/teletubbie-murder.gsm
+#var/lib/asterisk/sounds/telnet.gsm
+#var/lib/asterisk/sounds/temp-disconnected.gsm
+#var/lib/asterisk/sounds/temperature.gsm
+#var/lib/asterisk/sounds/tennessee.gsm
+#var/lib/asterisk/sounds/tenth.gsm
+#var/lib/asterisk/sounds/terabits.gsm
+#var/lib/asterisk/sounds/terabytes.gsm
+#var/lib/asterisk/sounds/terminated.gsm
+#var/lib/asterisk/sounds/terminating.gsm
+#var/lib/asterisk/sounds/test-tones-follow.gsm
+#var/lib/asterisk/sounds/texas.gsm
+#var/lib/asterisk/sounds/thank-you-cooperation.gsm
+#var/lib/asterisk/sounds/thank-you-for-calling.gsm
+#var/lib/asterisk/sounds/thanks-for-calling-today.gsm
+#var/lib/asterisk/sounds/thanks-for-using.gsm
+#var/lib/asterisk/sounds/that-is-not-rec-phn-num.gsm
+#var/lib/asterisk/sounds/that-number.gsm
+#var/lib/asterisk/sounds/that-tickles.gsm
+#var/lib/asterisk/sounds/that-you-require.gsm
+#var/lib/asterisk/sounds/the-mailbox.gsm
+#var/lib/asterisk/sounds/the-monkeys-twice.gsm
+#var/lib/asterisk/sounds/the-new-number-is.gsm
+#var/lib/asterisk/sounds/the-next.gsm
+#var/lib/asterisk/sounds/the-num-i-have-is.gsm
+#var/lib/asterisk/sounds/the-number-u-dialed.gsm
+#var/lib/asterisk/sounds/the-party-you-are-calling.gsm
+#var/lib/asterisk/sounds/the-weather-at.gsm
+#var/lib/asterisk/sounds/then-press-pound.gsm
+#var/lib/asterisk/sounds/there-is-no-customer-support.gsm
+#var/lib/asterisk/sounds/these-are-currently.gsm
+#var/lib/asterisk/sounds/third.gsm
+#var/lib/asterisk/sounds/thirteenth.gsm
+#var/lib/asterisk/sounds/thirtieth.gsm
+#var/lib/asterisk/sounds/this-call-may-be-monitored-or-recorded.gsm
+#var/lib/asterisk/sounds/this-call-may-be.gsm
+#var/lib/asterisk/sounds/this-call-will-cost.gsm
+#var/lib/asterisk/sounds/this-call-will-end-in.gsm
+#var/lib/asterisk/sounds/this-is-the-voice-mail-system.gsm
+#var/lib/asterisk/sounds/this-is-yr-wakeup-call.gsm
+#var/lib/asterisk/sounds/this.gsm
+#var/lib/asterisk/sounds/thnk-u-for-patience.gsm
+#var/lib/asterisk/sounds/thousandth.gsm
+#var/lib/asterisk/sounds/through.gsm
+#var/lib/asterisk/sounds/thunderstorm.gsm
+#var/lib/asterisk/sounds/tide.gsm
+#var/lib/asterisk/sounds/time.gsm
+#var/lib/asterisk/sounds/times.gsm
+#var/lib/asterisk/sounds/to-accept-recording.gsm
+#var/lib/asterisk/sounds/to-be-called-back.gsm
+#var/lib/asterisk/sounds/to-blklist-last-caller.gsm
+#var/lib/asterisk/sounds/to-blklist-last-num.gsm
+#var/lib/asterisk/sounds/to-call-num-press.gsm
+#var/lib/asterisk/sounds/to-call-prson-w-sent-msg.gsm
+#var/lib/asterisk/sounds/to-call-this-number.gsm
+#var/lib/asterisk/sounds/to-cancel-this-msg.gsm
+#var/lib/asterisk/sounds/to-cancel-wakeup.gsm
+#var/lib/asterisk/sounds/to-change-exp-date.gsm
+#var/lib/asterisk/sounds/to-change-your-pin-number.gsm
+#var/lib/asterisk/sounds/to-collect-voicemail.gsm
+#var/lib/asterisk/sounds/to-compose-a-message.gsm
+#var/lib/asterisk/sounds/to-confirm-wakeup.gsm
+#var/lib/asterisk/sounds/to-dial-by-name-press.gsm
+#var/lib/asterisk/sounds/to-dial-by-name.gsm
+#var/lib/asterisk/sounds/to-enter-a-diff-number.gsm
+#var/lib/asterisk/sounds/to-enter-a-number.gsm
+#var/lib/asterisk/sounds/to-erase-yr-temp-grtg.gsm
+#var/lib/asterisk/sounds/to-extension.gsm
+#var/lib/asterisk/sounds/to-hang-up-2.gsm
+#var/lib/asterisk/sounds/to-hang-up.gsm
+#var/lib/asterisk/sounds/to-hear-callerid.gsm
+#var/lib/asterisk/sounds/to-hear-menu-again.gsm
+#var/lib/asterisk/sounds/to-hear-msg-again.gsm
+#var/lib/asterisk/sounds/to-hear-msg-envelope.gsm
+#var/lib/asterisk/sounds/to-hear-net-status.gsm
+#var/lib/asterisk/sounds/to-hear-weather-status.gsm
+#var/lib/asterisk/sounds/to-hear-your-account-balance.gsm
+#var/lib/asterisk/sounds/to-join-a-meeting.gsm
+#var/lib/asterisk/sounds/to-leave-message-for.gsm
+#var/lib/asterisk/sounds/to-listen-to-it.gsm
+#var/lib/asterisk/sounds/to-log-in-to-voice-mail.gsm
+#var/lib/asterisk/sounds/to-place-outgoing-call.gsm
+#var/lib/asterisk/sounds/to-reach-first-rep.gsm
+#var/lib/asterisk/sounds/to-reach-operator.gsm
+#var/lib/asterisk/sounds/to-rec-yr-temp-grtg.gsm
+#var/lib/asterisk/sounds/to-record-call.gsm
+#var/lib/asterisk/sounds/to-redial-the-last-number-you-called.gsm
+#var/lib/asterisk/sounds/to-report-emergency.gsm
+#var/lib/asterisk/sounds/to-report-system-network-down.gsm
+#var/lib/asterisk/sounds/to-rerecord-announce.gsm
+#var/lib/asterisk/sounds/to-rerecord-it.gsm
+#var/lib/asterisk/sounds/to-rerecord-yr-message.gsm
+#var/lib/asterisk/sounds/to-rmv-num-blklist.gsm
+#var/lib/asterisk/sounds/to-rqst-wakeup-call.gsm
+#var/lib/asterisk/sounds/to-send-a-reply.gsm
+#var/lib/asterisk/sounds/to-snooze-for.gsm
+#var/lib/asterisk/sounds/to-use-def-attendant.gsm
+#var/lib/asterisk/sounds/today.gsm
+#var/lib/asterisk/sounds/tomorrow-night.gsm
+#var/lib/asterisk/sounds/tomorrow.gsm
+#var/lib/asterisk/sounds/tones-that-follow-are-for-the-deaf.gsm
+#var/lib/asterisk/sounds/tonight.gsm
+#var/lib/asterisk/sounds/too-low.gsm
+#var/lib/asterisk/sounds/tornado.gsm
+#var/lib/asterisk/sounds/touchtone1.gsm
+#var/lib/asterisk/sounds/touchtone2.gsm
+#var/lib/asterisk/sounds/touchtone3.gsm
+#var/lib/asterisk/sounds/towards.gsm
+#var/lib/asterisk/sounds/trading-desk.gsm
+#var/lib/asterisk/sounds/traffic.gsm
+#var/lib/asterisk/sounds/training.gsm
+#var/lib/asterisk/sounds/transportation.gsm
+#var/lib/asterisk/sounds/travel.gsm
+#var/lib/asterisk/sounds/treasury.gsm
+#var/lib/asterisk/sounds/tucson.gsm
+#var/lib/asterisk/sounds/tulsa.gsm
+#var/lib/asterisk/sounds/turn-off-recording.gsm
+#var/lib/asterisk/sounds/turning-to.gsm
+#var/lib/asterisk/sounds/twelveth.gsm
+#var/lib/asterisk/sounds/twentieth.gsm
+#var/lib/asterisk/sounds/twisty-maze.gsm
+#var/lib/asterisk/sounds/typhoon.gsm
+#var/lib/asterisk/sounds/udp.gsm
+#var/lib/asterisk/sounds/uh-oh1.gsm
+#var/lib/asterisk/sounds/uh-oh2.gsm
+#var/lib/asterisk/sounds/uk.gsm
+#var/lib/asterisk/sounds/unavailable.gsm
+#var/lib/asterisk/sounds/unconditional.gsm
+#var/lib/asterisk/sounds/unidentified-no-callback.gsm
+#var/lib/asterisk/sounds/units.gsm
+#var/lib/asterisk/sounds/unix.gsm
+#var/lib/asterisk/sounds/up.gsm
+#var/lib/asterisk/sounds/uptime.gsm
+#var/lib/asterisk/sounds/user.gsm
+#var/lib/asterisk/sounds/users.gsm
+#var/lib/asterisk/sounds/utah.gsm
+#var/lib/asterisk/sounds/variable.gsm
+#var/lib/asterisk/sounds/vermont.gsm
+#var/lib/asterisk/sounds/virginia-beach.gsm
+#var/lib/asterisk/sounds/virginia.gsm
+#var/lib/asterisk/sounds/visibility.gsm
+#var/lib/asterisk/sounds/visit-asterisk-website.gsm
+#var/lib/asterisk/sounds/voice-mail-system.gsm
+#var/lib/asterisk/sounds/wait-moment.gsm
+#var/lib/asterisk/sounds/wait-offensive-sounds.gsm
+#var/lib/asterisk/sounds/wakeup-call-cancelled.gsm
+#var/lib/asterisk/sounds/wakeup-call.gsm
+#var/lib/asterisk/sounds/wakeup-daily.gsm
+#var/lib/asterisk/sounds/wakeup-for-daily.gsm
+#var/lib/asterisk/sounds/wakeup-for-one-time.gsm
+#var/lib/asterisk/sounds/wakeup-onetime.gsm
+#var/lib/asterisk/sounds/walks-into-bar-mail.gsm
+#var/lib/asterisk/sounds/warning.gsm
+#var/lib/asterisk/sounds/was-last-seen.gsm
+#var/lib/asterisk/sounds/was.gsm
+#var/lib/asterisk/sounds/washington-dc.gsm
+#var/lib/asterisk/sounds/washington.gsm
+#var/lib/asterisk/sounds/watch.gsm
+#var/lib/asterisk/sounds/we-apologize.gsm
+#var/lib/asterisk/sounds/we-dont-have-tech-support.gsm
+#var/lib/asterisk/sounds/weasels-eaten-phonesys.gsm
+#var/lib/asterisk/sounds/weather-station.gsm
+#var/lib/asterisk/sounds/weather.gsm
+#var/lib/asterisk/sounds/web.gsm
+#var/lib/asterisk/sounds/weeks.gsm
+#var/lib/asterisk/sounds/welcome.gsm
+#var/lib/asterisk/sounds/were-sorry.gsm
+#var/lib/asterisk/sounds/west-virginia.gsm
+#var/lib/asterisk/sounds/west.gsm
+#var/lib/asterisk/sounds/westerly.gsm
+#var/lib/asterisk/sounds/what-are-you-wearing.gsm
+#var/lib/asterisk/sounds/what-time-it-is.gsm
+#var/lib/asterisk/sounds/what-time-it-is2.gsm
+#var/lib/asterisk/sounds/when-dialing-this-number.gsm
+#var/lib/asterisk/sounds/who-would-you-like-to-call.gsm
+#var/lib/asterisk/sounds/why-no-answer-mystery.gsm
+#var/lib/asterisk/sounds/wichita.gsm
+#var/lib/asterisk/sounds/will-apply.gsm
+#var/lib/asterisk/sounds/will-expire.gsm
+#var/lib/asterisk/sounds/will-not-expire.gsm
+#var/lib/asterisk/sounds/will-reflect-charge-of.gsm
+#var/lib/asterisk/sounds/wind.gsm
+#var/lib/asterisk/sounds/windows.gsm
+#var/lib/asterisk/sounds/windy.gsm
+#var/lib/asterisk/sounds/wisconsin.gsm
+#var/lib/asterisk/sounds/wish-to-continue.gsm
+#var/lib/asterisk/sounds/with.gsm
+#var/lib/asterisk/sounds/within.gsm
+#var/lib/asterisk/sounds/work.gsm
+#var/lib/asterisk/sounds/wrong-try-again-smarty.gsm
+#var/lib/asterisk/sounds/wtng-to-spk-w-rep.gsm
+#var/lib/asterisk/sounds/www-switchboard-com.gsm
+#var/lib/asterisk/sounds/wx
+#var/lib/asterisk/sounds/wx/around.gsm
+#var/lib/asterisk/sounds/wx/barometer.gsm
+#var/lib/asterisk/sounds/wx/ceiling.gsm
+#var/lib/asterisk/sounds/wx/dew-point.gsm
+#var/lib/asterisk/sounds/wx/falling.gsm
+#var/lib/asterisk/sounds/wx/feet.gsm
+#var/lib/asterisk/sounds/wx/foot.gsm
+#var/lib/asterisk/sounds/wx/gust.gsm
+#var/lib/asterisk/sounds/wx/gusting-to.gsm
+#var/lib/asterisk/sounds/wx/gusts.gsm
+#var/lib/asterisk/sounds/wx/gusty.gsm
+#var/lib/asterisk/sounds/wx/heat-index.gsm
+#var/lib/asterisk/sounds/wx/humidity.gsm
+#var/lib/asterisk/sounds/wx/inch.gsm
+#var/lib/asterisk/sounds/wx/inches.gsm
+#var/lib/asterisk/sounds/wx/kilometer.gsm
+#var/lib/asterisk/sounds/wx/large.gsm
+#var/lib/asterisk/sounds/wx/meter.gsm
+#var/lib/asterisk/sounds/wx/mist.gsm
+#var/lib/asterisk/sounds/wx/northeast.gsm
+#var/lib/asterisk/sounds/wx/northwest.gsm
+#var/lib/asterisk/sounds/wx/percent.gsm
+#var/lib/asterisk/sounds/wx/point.gsm
+#var/lib/asterisk/sounds/wx/rising.gsm
+#var/lib/asterisk/sounds/wx/southeast.gsm
+#var/lib/asterisk/sounds/wx/southwest.gsm
+#var/lib/asterisk/sounds/wx/steady.gsm
+#var/lib/asterisk/sounds/wx/temperature.gsm
+#var/lib/asterisk/sounds/wx/wind-chill.gsm
+#var/lib/asterisk/sounds/wx/winds.gsm
+#var/lib/asterisk/sounds/wyoming.gsm
+#var/lib/asterisk/sounds/yeah.gsm
+#var/lib/asterisk/sounds/year.gsm
+#var/lib/asterisk/sounds/years.gsm
+#var/lib/asterisk/sounds/yes-dear.gsm
+#var/lib/asterisk/sounds/yes-dear2.gsm
+#var/lib/asterisk/sounds/yesterday.gsm
+#var/lib/asterisk/sounds/you-are-caller-num.gsm
+#var/lib/asterisk/sounds/you-are-curr-call-num.gsm
+#var/lib/asterisk/sounds/you-can-press.gsm
+#var/lib/asterisk/sounds/you-dialed-wrong-number.gsm
+#var/lib/asterisk/sounds/you-entered.gsm
+#var/lib/asterisk/sounds/you-have-dialed.gsm
+#var/lib/asterisk/sounds/you-have-reached-a-test-number.gsm
+#var/lib/asterisk/sounds/you-have-these-options.gsm
+#var/lib/asterisk/sounds/you-must-first-dial.gsm
+#var/lib/asterisk/sounds/you-seem-impatient.gsm
+#var/lib/asterisk/sounds/you-sound-cute.gsm
+#var/lib/asterisk/sounds/you-wish-to-join.gsm
+#var/lib/asterisk/sounds/your-account.gsm
+#var/lib/asterisk/sounds/your-msg-has-been-saved.gsm
+#var/lib/asterisk/sounds/your-msg-is-too-short.gsm
+#var/lib/asterisk/sounds/your-temp-greeting.gsm
+#var/lib/asterisk/sounds/your.gsm
+#var/lib/asterisk/sounds/zip-code.gsm
var/log/asterisk
#var/log/asterisk/cdr-csv
#var/log/asterisk/cdr-custom
#var/spool/asterisk/voicemail/default/1234/INBOX
#var/spool/asterisk/voicemail/default/1234/busy.gsm
#var/spool/asterisk/voicemail/default/1234/unavail.gsm
+usr/lib/perl5/site_perl/5.8.5/Asterisk
+usr/lib/perl5/site_perl/5.8.5/Asterisk.pm
+#usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm
+#usr/lib/perl5/site_perl/5.8.5/Asterisk/Manager.pm
+#usr/lib/perl5/site_perl/5.8.5/Asterisk/Outgoing.pm
+#usr/lib/perl5/site_perl/5.8.5/Asterisk/QCall.pm
+#usr/lib/perl5/site_perl/5.8.5/Asterisk/Voicemail.pm
+#usr/lib/perl5/site_perl/5.8.5/i386-linux/auto/asterisk-perl
+#usr/lib/perl5/site_perl/5.8.5/i386-linux/auto/asterisk-perl/.packlist
+#usr/share/man/man3/Asterisk::AGI.3
+#usr/share/man/man3/Asterisk::Manager.3
+#usr/share/man/man3/Asterisk::Outgoing.3
+#usr/share/man/man3/Asterisk::Voicemail.3
-diff -urN asterisk-1.2.9.1.orig/.version asterisk-1.2.9.1/.version
---- asterisk-1.2.9.1.orig/.version 2006-06-06 18:19:31.000000000 +0200
-+++ asterisk-1.2.9.1/.version 2006-06-09 10:25:16.000000000 +0200
+diff -urN asterisk-1.2.10.orig/.version asterisk-1.2.10/.version
+--- asterisk-1.2.10.orig/.version 2006-07-14 23:29:33.000000000 +0200
++++ asterisk-1.2.10/.version 2006-07-31 14:13:27.000000000 +0200
@@ -1 +1 @@
--1.2.9.1
-+1.2.9.1-BRIstuffed-0.3.0-PRE-1q
-diff -urN asterisk-1.2.9.1.orig/HARDWARE asterisk-1.2.9.1/HARDWARE
---- asterisk-1.2.9.1.orig/HARDWARE 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/HARDWARE 2006-06-09 10:25:04.000000000 +0200
+-1.2.10
++1.2.10-BRIstuffed-0.3.0-PRE-1s
+diff -urN asterisk-1.2.10.orig/HARDWARE asterisk-1.2.10/HARDWARE
+--- asterisk-1.2.10.orig/HARDWARE 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/HARDWARE 2006-07-31 14:13:08.000000000 +0200
@@ -37,6 +37,19 @@
* Wildcard TE410P - Quad T1/E1 switchable interface. Supports PRI and
RBS signalling, as well as PPP, FR, and HDLC data modes.
Non-zaptel compatible hardware
==============================
-diff -urN asterisk-1.2.9.1.orig/LICENSE asterisk-1.2.9.1/LICENSE
---- asterisk-1.2.9.1.orig/LICENSE 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/LICENSE 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/LICENSE asterisk-1.2.10/LICENSE
+--- asterisk-1.2.10.orig/LICENSE 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/LICENSE 2006-07-31 14:13:08.000000000 +0200
@@ -1,7 +1,7 @@
-Asterisk is distributed under the GNU General Public License version 2
-and is also available under alternative licenses negotiated directly
except as defined below. The GPL (version 2) is included in this
source tree in the file COPYING.
-diff -urN asterisk-1.2.9.1.orig/Makefile asterisk-1.2.9.1/Makefile
---- asterisk-1.2.9.1.orig/Makefile 2006-04-30 16:27:56.000000000 +0200
-+++ asterisk-1.2.9.1/Makefile 2006-06-09 10:25:04.000000000 +0200
-@@ -761,6 +761,9 @@
+diff -urN asterisk-1.2.10.orig/Makefile asterisk-1.2.10/Makefile
+--- asterisk-1.2.10.orig/Makefile 2006-06-29 21:23:18.000000000 +0200
++++ asterisk-1.2.10/Makefile 2006-08-10 11:07:53.000000000 +0200
+@@ -772,6 +772,9 @@
echo ";astctlowner = root" ; \
echo ";astctlgroup = apache" ; \
echo ";astctl = asterisk.ctl" ; \
+ echo "[options]" ; \
-+ echo "uniquename = asterisk" ;\
++ echo "uniquename = `hostname`" ;\
+ echo "silence_suppression = yes" ;\
) > $(DESTDIR)$(ASTCONFPATH) ; \
else \
echo "Skipping asterisk.conf creation"; \
-diff -urN asterisk-1.2.9.1.orig/README asterisk-1.2.9.1/README
---- asterisk-1.2.9.1.orig/README 2006-03-03 09:12:33.000000000 +0100
-+++ asterisk-1.2.9.1/README 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/README asterisk-1.2.10/README
+--- asterisk-1.2.10.orig/README 2006-03-03 09:12:33.000000000 +0100
++++ asterisk-1.2.10/README 2006-07-31 14:13:08.000000000 +0200
@@ -4,6 +4,8 @@
Copyright (C) 2001-2005 Digium, Inc.
================================================================
* SECURITY
-diff -urN asterisk-1.2.9.1.orig/README.chan_capi asterisk-1.2.9.1/README.chan_capi
---- asterisk-1.2.9.1.orig/README.chan_capi 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/README.chan_capi 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/README.chan_capi asterisk-1.2.10/README.chan_capi
+--- asterisk-1.2.10.orig/README.chan_capi 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/README.chan_capi 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,146 @@
+(CAPI*) chan_capi a Common ISDN API 2.0 implementation for Asterisk
+(C) 2002, 2003, 2004, 2005 Junghanns.NET GmbH
+
+
+
-diff -urN asterisk-1.2.9.1.orig/agi/Makefile asterisk-1.2.9.1/agi/Makefile
---- asterisk-1.2.9.1.orig/agi/Makefile 2006-03-28 22:22:05.000000000 +0200
-+++ asterisk-1.2.9.1/agi/Makefile 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/agi/Makefile asterisk-1.2.10/agi/Makefile
+--- asterisk-1.2.10.orig/agi/Makefile 2006-03-28 22:22:05.000000000 +0200
++++ asterisk-1.2.10/agi/Makefile 2006-07-31 14:13:08.000000000 +0200
@@ -11,7 +11,7 @@
# the GNU General Public License
#
%.so : %.o
$(CC) -shared -Xlinker -x -o $@ $<
-diff -urN asterisk-1.2.9.1.orig/agi/xagi-test.c asterisk-1.2.9.1/agi/xagi-test.c
---- asterisk-1.2.9.1.orig/agi/xagi-test.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/agi/xagi-test.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/agi/xagi-test.c asterisk-1.2.10/agi/xagi-test.c
+--- asterisk-1.2.10.orig/agi/xagi-test.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/agi/xagi-test.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,175 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ return -1;
+ exit(0);
+}
-diff -urN asterisk-1.2.9.1.orig/apps/Makefile asterisk-1.2.9.1/apps/Makefile
---- asterisk-1.2.9.1.orig/apps/Makefile 2006-04-30 15:38:22.000000000 +0200
-+++ asterisk-1.2.9.1/apps/Makefile 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/Makefile asterisk-1.2.10/apps/Makefile
+--- asterisk-1.2.10.orig/apps/Makefile 2006-04-30 15:38:22.000000000 +0200
++++ asterisk-1.2.10/apps/Makefile 2006-07-31 14:13:08.000000000 +0200
@@ -28,8 +28,15 @@
app_test.so app_forkcdr.so app_math.so app_realtime.so \
app_dumpchan.so app_waitforsilence.so app_while.so app_setrdnis.so \
#
# Obsolete things...
-diff -urN asterisk-1.2.9.1.orig/apps/app_callingpres.c asterisk-1.2.9.1/apps/app_callingpres.c
---- asterisk-1.2.9.1.orig/apps/app_callingpres.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_callingpres.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_callingpres.c asterisk-1.2.10/apps/app_callingpres.c
+--- asterisk-1.2.10.orig/apps/app_callingpres.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/apps/app_callingpres.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,70 @@
+/*
+ * An application to change the CallingPresentation for an Asterisk channel.
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/apps/app_capiCD.c asterisk-1.2.9.1/apps/app_capiCD.c
---- asterisk-1.2.9.1.orig/apps/app_capiCD.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_capiCD.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_capiCD.c asterisk-1.2.10/apps/app_capiCD.c
+--- asterisk-1.2.10.orig/apps/app_capiCD.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/apps/app_capiCD.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,172 @@
+/*
+ * (CAPI*)
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/apps/app_capiECT.c asterisk-1.2.9.1/apps/app_capiECT.c
---- asterisk-1.2.9.1.orig/apps/app_capiECT.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_capiECT.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_capiECT.c asterisk-1.2.10/apps/app_capiECT.c
+--- asterisk-1.2.10.orig/apps/app_capiECT.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/apps/app_capiECT.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,210 @@
+/*
+ * (CAPI*)
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/apps/app_capiNoES.c asterisk-1.2.9.1/apps/app_capiNoES.c
---- asterisk-1.2.9.1.orig/apps/app_capiNoES.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_capiNoES.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_capiNoES.c asterisk-1.2.10/apps/app_capiNoES.c
+--- asterisk-1.2.10.orig/apps/app_capiNoES.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/apps/app_capiNoES.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,96 @@
+/*
+ * (CAPI*)
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/apps/app_chanisavail.c asterisk-1.2.9.1/apps/app_chanisavail.c
---- asterisk-1.2.9.1.orig/apps/app_chanisavail.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_chanisavail.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_chanisavail.c asterisk-1.2.10/apps/app_chanisavail.c
+--- asterisk-1.2.10.orig/apps/app_chanisavail.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/apps/app_chanisavail.c 2006-07-31 14:13:08.000000000 +0200
@@ -118,7 +118,7 @@
snprintf(trychan, sizeof(trychan), "%s/%s",cur,number);
status = inuse = ast_device_state(trychan);
pbx_builtin_setvar_helper(chan, "AVAILCHAN", tempchan->name);
/* Store the originally used channel too */
snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
-diff -urN asterisk-1.2.9.1.orig/apps/app_chanspy.c asterisk-1.2.9.1/apps/app_chanspy.c
---- asterisk-1.2.9.1.orig/apps/app_chanspy.c 2006-01-03 18:24:56.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_chanspy.c 2006-06-09 10:25:04.000000000 +0200
-@@ -54,6 +54,7 @@
+diff -urN asterisk-1.2.10.orig/apps/app_chanspy.c asterisk-1.2.10/apps/app_chanspy.c
+--- asterisk-1.2.10.orig/apps/app_chanspy.c 2006-06-14 16:07:53.000000000 +0200
++++ asterisk-1.2.10/apps/app_chanspy.c 2006-07-31 14:13:08.000000000 +0200
+@@ -55,6 +55,7 @@
static const char *synopsis = "Listen to the audio of an active channel\n";
static const char *app = "ChanSpy";
static const char *desc =
" ChanSpy([chanprefix][|options]): This application is used to listen to the\n"
"audio from an active Asterisk channel. This includes the audio coming in and\n"
-@@ -141,6 +142,19 @@
+@@ -142,6 +143,19 @@
return ret;
}
static void *spy_alloc(struct ast_channel *chan, void *data)
{
/* just store the data pointer in the channel structure */
-@@ -553,11 +567,87 @@
+@@ -554,11 +568,87 @@
ALL_DONE(u, res);
}
STANDARD_HANGUP_LOCALUSERS;
-@@ -566,7 +656,8 @@
+@@ -567,7 +657,8 @@
int load_module(void)
{
}
char *description(void)
-diff -urN asterisk-1.2.9.1.orig/apps/app_devstate.c asterisk-1.2.9.1/apps/app_devstate.c
---- asterisk-1.2.9.1.orig/apps/app_devstate.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_devstate.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_devstate.c asterisk-1.2.10/apps/app_devstate.c
+--- asterisk-1.2.10.orig/apps/app_devstate.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/apps/app_devstate.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,225 @@
+/*
+ * Devstate application
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/apps/app_dial.c asterisk-1.2.9.1/apps/app_dial.c
---- asterisk-1.2.9.1.orig/apps/app_dial.c 2006-05-24 21:44:26.000000000 +0200
-+++ asterisk-1.2.9.1/apps/app_dial.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_dial.c asterisk-1.2.10/apps/app_dial.c
+--- asterisk-1.2.10.orig/apps/app_dial.c 2006-06-09 20:08:00.000000000 +0200
++++ asterisk-1.2.10/apps/app_dial.c 2006-08-04 11:23:28.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
-@@ -115,7 +119,8 @@
+@@ -55,6 +59,7 @@
+ #include "asterisk/causes.h"
+ #include "asterisk/manager.h"
+ #include "asterisk/privacy.h"
++#include "asterisk/transcap.h"
+
+ static char *tdesc = "Dialing Application";
+
+@@ -115,7 +120,8 @@
" action post answer options in conjunction with this option.\n"
" h - Allow the called party to hang up by sending the '*' DTMF digit.\n"
" H - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
" L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are\n"
" left. Repeat the warning every 'z' ms. The following special\n"
" variables can be used with this option:\n"
-@@ -162,8 +167,11 @@
+@@ -162,8 +168,11 @@
" family/key is not specified.\n"
" r - Indicate ringing to the calling party. Pass no audio to the calling\n"
" party until the called channel has answered.\n"
" t - Allow the called party to transfer the calling party by sending the\n"
" DTMF sequence defined in features.conf.\n"
" T - Allow the calling party to transfer the called party by sending the\n"
-@@ -214,6 +222,8 @@
+@@ -214,6 +223,8 @@
OPT_CALLEE_MONITOR = (1 << 21),
OPT_CALLER_MONITOR = (1 << 22),
OPT_GOTO = (1 << 23),
} dial_exec_option_flags;
#define DIAL_STILLGOING (1 << 30)
-@@ -252,6 +262,8 @@
+@@ -252,6 +263,8 @@
AST_APP_OPTION('p', OPT_SCREENING),
AST_APP_OPTION_ARG('P', OPT_PRIVACY, OPT_ARG_PRIVACY),
AST_APP_OPTION('r', OPT_RINGBACK),
AST_APP_OPTION_ARG('S', OPT_DURATION_STOP, OPT_ARG_DURATION_STOP),
AST_APP_OPTION('t', OPT_CALLEE_TRANSFER),
AST_APP_OPTION('T', OPT_CALLER_TRANSFER),
-@@ -389,7 +401,7 @@
+@@ -389,7 +402,7 @@
char *context = NULL;
char cidname[AST_MAX_EXTENSION];
if (single) {
/* Turn off hold music, etc */
-@@ -468,7 +480,7 @@
+@@ -468,7 +481,7 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
/* Setup parameters */
if (!o->chan)
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
else
-@@ -586,12 +598,18 @@
+@@ -586,12 +599,18 @@
HANDLE_CAUSE(AST_CAUSE_CONGESTION, in);
break;
case AST_CONTROL_RINGING:
break;
case AST_CONTROL_PROGRESS:
if (option_verbose > 2)
-@@ -766,6 +784,7 @@
+@@ -766,6 +785,7 @@
int digit = 0, result = 0;
time_t start_time, answer_time, end_time;
struct ast_app *app = NULL;
char *parse;
AST_DECLARE_APP_ARGS(args,
-@@ -939,13 +958,13 @@
+@@ -939,13 +959,13 @@
}
if( privdb_val == AST_PRIVACY_DENY ) {
if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
}
-@@ -953,7 +972,7 @@
+@@ -953,7 +973,7 @@
goto out; /* Is this right? */
}
else if( privdb_val == AST_PRIVACY_TORTURE ) {
if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
}
-@@ -992,7 +1011,7 @@
+@@ -1001,7 +1021,7 @@
/* If a channel group has been specified, get it for use when we create peer channels */
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
cur = args.peers;
do {
/* Remember where to start next time */
-@@ -1034,7 +1053,7 @@
+@@ -1043,7 +1063,7 @@
ast_log(LOG_DEBUG, "Dialing by extension %s\n", numsubst);
}
/* Request the peer */
if (!tmp->chan) {
/* If we can't, just go on to the next call */
ast_log(LOG_NOTICE, "Unable to create channel of type '%s' (cause %d - %s)\n", tech, cause, ast_cause2str(cause));
-@@ -1065,7 +1084,7 @@
+@@ -1074,7 +1094,7 @@
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", chan->name, tech, stuff, tmp->chan->name);
ast_hangup(tmp->chan);
/* Setup parameters */
if (!tmp->chan)
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
else
-@@ -1178,7 +1197,7 @@
+@@ -1187,7 +1207,7 @@
if (outgoing) {
/* Our status will at least be NOANSWER */
if (ast_test_flag(outgoing, OPT_MUSICBACK)) {
moh=1;
ast_moh_start(chan, opt_args[OPT_ARG_MUSICBACK]);
-@@ -1186,8 +1205,11 @@
+@@ -1195,8 +1215,11 @@
ast_indicate(chan, AST_CONTROL_RINGING);
sentringing++;
}
time(&start_time);
peer = wait_for_answer(chan, outgoing, &to, peerflags, &sentringing, status, sizeof(status), numbusy, numnochan, numcongestion, ast_test_flag(&opts, OPT_PRIORITY_JUMP), &result);
-@@ -1599,7 +1621,15 @@
+@@ -1561,18 +1584,22 @@
+ ast_set_flag(&(config.features_caller), AST_FEATURE_PLAY_WARNING);
+ if (play_to_callee)
+ ast_set_flag(&(config.features_callee), AST_FEATURE_PLAY_WARNING);
+- if (ast_test_flag(peerflags, OPT_CALLEE_TRANSFER))
++
++ if ((chan->transfercapability != AST_TRANS_CAP_DIGITAL) && (chan->transfercapability != AST_TRANS_CAP_RESTRICTED_DIGITAL)) {
++ /* only non-digital calls are allowed to go through userspace */
++ if (ast_test_flag(peerflags, OPT_CALLEE_TRANSFER))
+ ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
+- if (ast_test_flag(peerflags, OPT_CALLER_TRANSFER))
++ if (ast_test_flag(peerflags, OPT_CALLER_TRANSFER))
+ ast_set_flag(&(config.features_caller), AST_FEATURE_REDIRECT);
+- if (ast_test_flag(peerflags, OPT_CALLEE_HANGUP))
++ if (ast_test_flag(peerflags, OPT_CALLEE_HANGUP))
+ ast_set_flag(&(config.features_callee), AST_FEATURE_DISCONNECT);
+- if (ast_test_flag(peerflags, OPT_CALLER_HANGUP))
++ if (ast_test_flag(peerflags, OPT_CALLER_HANGUP))
+ ast_set_flag(&(config.features_caller), AST_FEATURE_DISCONNECT);
+- if (ast_test_flag(peerflags, OPT_CALLEE_MONITOR))
++ if (ast_test_flag(peerflags, OPT_CALLEE_MONITOR))
+ ast_set_flag(&(config.features_callee), AST_FEATURE_AUTOMON);
+- if (ast_test_flag(peerflags, OPT_CALLER_MONITOR))
++ if (ast_test_flag(peerflags, OPT_CALLER_MONITOR))
+ ast_set_flag(&(config.features_caller), AST_FEATURE_AUTOMON);
++ }
+
+ config.timelimit = timelimit;
+ config.play_warning = play_warning;
+@@ -1608,7 +1635,15 @@
}
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
if (res != AST_PBX_NO_HANGUP_PEER) {
if (!chan->_softhangup)
chan->hangupcause = peer->hangupcause;
-diff -urN asterisk-1.2.9.1.orig/apps/app_directed_pickup.c asterisk-1.2.9.1/apps/app_directed_pickup.c
---- asterisk-1.2.9.1.orig/apps/app_directed_pickup.c 2006-04-06 19:00:10.000000000 +0200
-+++ asterisk-1.2.9.1/apps/app_directed_pickup.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_directed_pickup.c asterisk-1.2.10/apps/app_directed_pickup.c
+--- asterisk-1.2.10.orig/apps/app_directed_pickup.c 2006-04-06 19:00:10.000000000 +0200
++++ asterisk-1.2.10/apps/app_directed_pickup.c 2006-07-31 14:13:08.000000000 +0200
@@ -41,7 +41,7 @@
#include "asterisk/app.h"
static const char *synopsis = "Directed Call Pickup";
static const char *descrip =
" Pickup(extension[@context]): This application can pickup any ringing channel\n"
-diff -urN asterisk-1.2.9.1.orig/apps/app_meetme.c asterisk-1.2.9.1/apps/app_meetme.c
---- asterisk-1.2.9.1.orig/apps/app_meetme.c 2006-05-25 22:03:11.000000000 +0200
-+++ asterisk-1.2.9.1/apps/app_meetme.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_meetme.c asterisk-1.2.10/apps/app_meetme.c
+--- asterisk-1.2.10.orig/apps/app_meetme.c 2006-06-11 23:08:04.000000000 +0200
++++ asterisk-1.2.10/apps/app_meetme.c 2006-07-31 14:13:08.000000000 +0200
@@ -453,7 +453,7 @@
ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
if ((f->frametype == AST_FRAME_VOICE) && (f->subclass == AST_FORMAT_SLINEAR)) {
if (user->talk.actual)
ast_frame_adjust_volume(f, user->talk.actual);
-@@ -1506,7 +1515,7 @@
+@@ -1509,7 +1518,7 @@
}
ast_frfree(f);
} else if (outfd > -1) {
if (res > 0) {
memset(&fr, 0, sizeof(fr));
fr.frametype = AST_FRAME_VOICE;
-diff -urN asterisk-1.2.9.1.orig/apps/app_milliwatt.c asterisk-1.2.9.1/apps/app_milliwatt.c
---- asterisk-1.2.9.1.orig/apps/app_milliwatt.c 2006-01-19 05:17:45.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_milliwatt.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_milliwatt.c asterisk-1.2.10/apps/app_milliwatt.c
+--- asterisk-1.2.10.orig/apps/app_milliwatt.c 2006-01-19 05:17:45.000000000 +0100
++++ asterisk-1.2.10/apps/app_milliwatt.c 2006-07-31 14:13:08.000000000 +0200
@@ -74,20 +74,28 @@
{
struct ast_frame wf;
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
-diff -urN asterisk-1.2.9.1.orig/apps/app_page.c asterisk-1.2.9.1/apps/app_page.c
---- asterisk-1.2.9.1.orig/apps/app_page.c 2006-04-13 19:40:21.000000000 +0200
-+++ asterisk-1.2.9.1/apps/app_page.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_page.c asterisk-1.2.10/apps/app_page.c
+--- asterisk-1.2.10.orig/apps/app_page.c 2006-04-13 19:40:21.000000000 +0200
++++ asterisk-1.2.10/apps/app_page.c 2006-07-31 14:13:08.000000000 +0200
@@ -85,7 +85,7 @@
{
struct calloutdata *cd = data;
free(cd);
return NULL;
}
-diff -urN asterisk-1.2.9.1.orig/apps/app_parkandannounce.c asterisk-1.2.9.1/apps/app_parkandannounce.c
---- asterisk-1.2.9.1.orig/apps/app_parkandannounce.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_parkandannounce.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_parkandannounce.c asterisk-1.2.10/apps/app_parkandannounce.c
+--- asterisk-1.2.10.orig/apps/app_parkandannounce.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/apps/app_parkandannounce.c 2006-07-31 14:13:08.000000000 +0200
@@ -183,7 +183,7 @@
memset(&oh, 0, sizeof(oh));
if(dchan) {
if(dchan->_state == AST_STATE_UP) {
-diff -urN asterisk-1.2.9.1.orig/apps/app_pickup.c asterisk-1.2.9.1/apps/app_pickup.c
---- asterisk-1.2.9.1.orig/apps/app_pickup.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_pickup.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_pickup.c asterisk-1.2.10/apps/app_pickup.c
+--- asterisk-1.2.10.orig/apps/app_pickup.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/apps/app_pickup.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,319 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/apps/app_queue.c asterisk-1.2.9.1/apps/app_queue.c
---- asterisk-1.2.9.1.orig/apps/app_queue.c 2006-06-04 05:43:35.000000000 +0200
-+++ asterisk-1.2.9.1/apps/app_queue.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_queue.c asterisk-1.2.10/apps/app_queue.c
+--- asterisk-1.2.10.orig/apps/app_queue.c 2006-06-23 13:30:17.000000000 +0200
++++ asterisk-1.2.10/apps/app_queue.c 2006-07-31 14:13:08.000000000 +0200
@@ -526,7 +526,7 @@
return NULL;
}
{
/* Avoid potential for deadlocks by spawning a new thread to handle
the event */
-@@ -1512,7 +1512,7 @@
+@@ -1509,7 +1509,7 @@
location = "";
/* Request the peer */
if (!tmp->chan) { /* If we can't, just go on to the next call */
#if 0
ast_log(LOG_NOTICE, "Unable to create channel of type '%s' for Queue\n", cur->tech);
-@@ -1819,7 +1819,7 @@
+@@ -1816,7 +1816,7 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
/* Setup parameters */
if (status != o->oldstatus)
update_dial_status(qe->parent, o->member, status);
if (!o->chan) {
-@@ -2363,14 +2363,14 @@
+@@ -2360,14 +2360,14 @@
else
which = peer;
if (monitorfilename)
}
if (qe->parent->monjoin)
ast_monitor_setjoinfiles(which, 1);
-diff -urN asterisk-1.2.9.1.orig/apps/app_readfile.c asterisk-1.2.9.1/apps/app_readfile.c
---- asterisk-1.2.9.1.orig/apps/app_readfile.c 2006-03-23 21:13:48.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_readfile.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_readfile.c asterisk-1.2.10/apps/app_readfile.c
+--- asterisk-1.2.10.orig/apps/app_readfile.c 2006-03-23 21:13:48.000000000 +0100
++++ asterisk-1.2.10/apps/app_readfile.c 2006-07-31 14:13:08.000000000 +0200
@@ -40,7 +40,7 @@
#include "asterisk/app.h"
#include "asterisk/module.h"
static char *app_readfile = "ReadFile";
-diff -urN asterisk-1.2.9.1.orig/apps/app_segfault.c asterisk-1.2.9.1/apps/app_segfault.c
---- asterisk-1.2.9.1.orig/apps/app_segfault.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/apps/app_segfault.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_segfault.c asterisk-1.2.10/apps/app_segfault.c
+--- asterisk-1.2.10.orig/apps/app_segfault.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/apps/app_segfault.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,75 @@
+/*
+ * Segfault application
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/apps/app_zapras.c asterisk-1.2.9.1/apps/app_zapras.c
---- asterisk-1.2.9.1.orig/apps/app_zapras.c 2006-05-01 22:44:24.000000000 +0200
-+++ asterisk-1.2.9.1/apps/app_zapras.c 2006-06-09 10:25:04.000000000 +0200
-@@ -186,7 +186,7 @@
+diff -urN asterisk-1.2.10.orig/apps/app_zapras.c asterisk-1.2.10/apps/app_zapras.c
+--- asterisk-1.2.10.orig/apps/app_zapras.c 2006-07-12 15:54:10.000000000 +0200
++++ asterisk-1.2.10/apps/app_zapras.c 2006-07-31 14:13:08.000000000 +0200
+@@ -180,7 +180,7 @@
}
}
/* Throw back into audio mode */
ioctl(chan->fds[0], ZT_AUDIOMODE, &x);
/* Restore saved values */
-diff -urN asterisk-1.2.9.1.orig/asterisk.c asterisk-1.2.9.1/asterisk.c
---- asterisk-1.2.9.1.orig/asterisk.c 2006-05-19 21:01:17.000000000 +0200
-+++ asterisk-1.2.9.1/asterisk.c 2006-06-13 10:10:50.000000000 +0200
+diff -urN asterisk-1.2.10.orig/apps/app_zapras.c.orig asterisk-1.2.10/apps/app_zapras.c.orig
+--- asterisk-1.2.10.orig/apps/app_zapras.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/apps/app_zapras.c.orig 2006-07-12 15:54:10.000000000 +0200
+@@ -0,0 +1,274 @@
++/*
++ * Asterisk -- An open source telephony toolkit.
++ *
++ * Copyright (C) 1999 - 2005, Digium, Inc.
++ *
++ * Mark Spencer <markster@digium.com>
++ *
++ * See http://www.asterisk.org for more information about
++ * the Asterisk project. Please do not directly contact
++ * any of the maintainers of this project for assistance;
++ * the project provides a web site, mailing lists and IRC
++ * channels for your use.
++ *
++ * This program is free software, distributed under the terms of
++ * the GNU General Public License Version 2. See the LICENSE file
++ * at the top of the source tree.
++ */
++
++/*! \file
++ *
++ * \brief Execute an ISDN RAS
++ *
++ * \ingroup applications
++ */
++
++#include <sys/ioctl.h>
++#include <sys/wait.h>
++#ifdef __linux__
++#include <sys/signal.h>
++#else
++#include <signal.h>
++#endif /* __linux__ */
++
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#include <stdlib.h>
++#include <errno.h>
++#include <stdio.h>
++#include <fcntl.h>
++
++/* Need some zaptel help here */
++#ifdef __linux__
++#include <linux/zaptel.h>
++#else
++#include <zaptel.h>
++#endif /* __linux__ */
++
++#include "asterisk.h"
++
++ASTERISK_FILE_VERSION(__FILE__, "$Revision: 37419 $")
++
++#include "asterisk/lock.h"
++#include "asterisk/file.h"
++#include "asterisk/logger.h"
++#include "asterisk/channel.h"
++#include "asterisk/pbx.h"
++#include "asterisk/module.h"
++#include "asterisk/options.h"
++
++static char *tdesc = "Zap RAS Application";
++
++static char *app = "ZapRAS";
++
++static char *synopsis = "Executes Zaptel ISDN RAS application";
++
++static char *descrip =
++" ZapRAS(args): Executes a RAS server using pppd on the given channel.\n"
++"The channel must be a clear channel (i.e. PRI source) and a Zaptel\n"
++"channel to be able to use this function (No modem emulation is included).\n"
++"Your pppd must be patched to be zaptel aware. Arguments should be\n"
++"separated by | characters.\n";
++
++STANDARD_LOCAL_USER;
++
++LOCAL_USER_DECL;
++
++#define PPP_MAX_ARGS 32
++#define PPP_EXEC "/usr/sbin/pppd"
++
++static pid_t spawn_ras(struct ast_channel *chan, char *args)
++{
++ pid_t pid;
++ int x;
++ char *c;
++
++ char *argv[PPP_MAX_ARGS];
++ int argc = 0;
++ char *stringp=NULL;
++
++ /* Start by forking */
++ pid = fork();
++ if (pid)
++ return pid;
++
++ /* Execute RAS on File handles */
++ dup2(chan->fds[0], STDIN_FILENO);
++
++ /* Drop high priority */
++ if (option_highpriority)
++ ast_set_priority(0);
++
++ /* Close other file descriptors */
++ for (x=STDERR_FILENO + 1;x<1024;x++)
++ close(x);
++
++ /* Restore original signal handlers */
++ for (x=0;x<NSIG;x++)
++ signal(x, SIG_DFL);
++
++ /* Reset all arguments */
++ memset(argv, 0, sizeof(argv));
++
++ /* First argument is executable, followed by standard
++ arguments for zaptel PPP */
++ argv[argc++] = PPP_EXEC;
++ argv[argc++] = "nodetach";
++
++ /* And all the other arguments */
++ stringp=args;
++ c = strsep(&stringp, "|");
++ while(c && strlen(c) && (argc < (PPP_MAX_ARGS - 4))) {
++ argv[argc++] = c;
++ c = strsep(&stringp, "|");
++ }
++
++ argv[argc++] = "plugin";
++ argv[argc++] = "zaptel.so";
++ argv[argc++] = "stdin";
++
++ /* Finally launch PPP */
++ execv(PPP_EXEC, argv);
++ fprintf(stderr, "Failed to exec PPPD!\n");
++ exit(1);
++}
++
++static void run_ras(struct ast_channel *chan, char *args)
++{
++ pid_t pid;
++ int status;
++ int res;
++ int signalled = 0;
++ struct zt_bufferinfo savebi;
++ int x;
++
++ res = ioctl(chan->fds[0], ZT_GET_BUFINFO, &savebi);
++ if(res) {
++ ast_log(LOG_WARNING, "Unable to check buffer policy on channel %s\n", chan->name);
++ return;
++ }
++
++ pid = spawn_ras(chan, args);
++ if (pid < 0) {
++ ast_log(LOG_WARNING, "Failed to spawn RAS\n");
++ } else {
++ for (;;) {
++ res = wait4(pid, &status, WNOHANG, NULL);
++ if (!res) {
++ /* Check for hangup */
++ if (chan->_softhangup && !signalled) {
++ ast_log(LOG_DEBUG, "Channel '%s' hungup. Signalling RAS at %d to die...\n", chan->name, pid);
++ kill(pid, SIGTERM);
++ signalled=1;
++ }
++ /* Try again */
++ sleep(1);
++ continue;
++ }
++ if (res < 0) {
++ ast_log(LOG_WARNING, "wait4 returned %d: %s\n", res, strerror(errno));
++ }
++ if (option_verbose > 2) {
++ if (WIFEXITED(status)) {
++ ast_verbose(VERBOSE_PREFIX_3 "RAS on %s terminated with status %d\n", chan->name, WEXITSTATUS(status));
++ } else if (WIFSIGNALED(status)) {
++ ast_verbose(VERBOSE_PREFIX_3 "RAS on %s terminated with signal %d\n",
++ chan->name, WTERMSIG(status));
++ } else {
++ ast_verbose(VERBOSE_PREFIX_3 "RAS on %s terminated weirdly.\n", chan->name);
++ }
++ }
++ /* Throw back into audio mode */
++ x = 1;
++ ioctl(chan->fds[0], ZT_AUDIOMODE, &x);
++
++ /* Restore saved values */
++ res = ioctl(chan->fds[0], ZT_SET_BUFINFO, &savebi);
++ if (res < 0) {
++ ast_log(LOG_WARNING, "Unable to set buffer policy on channel %s\n", chan->name);
++ }
++ break;
++ }
++ }
++}
++
++static int zapras_exec(struct ast_channel *chan, void *data)
++{
++ int res=-1;
++ char *args;
++ struct localuser *u;
++ ZT_PARAMS ztp;
++
++ if (!data)
++ data = "";
++
++ LOCAL_USER_ADD(u);
++
++ args = ast_strdupa(data);
++ if (!args) {
++ ast_log(LOG_ERROR, "Out of memory\n");
++ LOCAL_USER_REMOVE(u);
++ return -1;
++ }
++
++ /* Answer the channel if it's not up */
++ if (chan->_state != AST_STATE_UP)
++ ast_answer(chan);
++ if (strcasecmp(chan->type, "Zap")) {
++ /* If it's not a zap channel, we're done. Wait a couple of
++ seconds and then hangup... */
++ if (option_verbose > 1)
++ ast_verbose(VERBOSE_PREFIX_2 "Channel %s is not a Zap channel\n", chan->name);
++ sleep(2);
++ } else {
++ memset(&ztp, 0, sizeof(ztp));
++ if (ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp)) {
++ ast_log(LOG_WARNING, "Unable to get zaptel parameters\n");
++ } else if (ztp.sigtype != ZT_SIG_CLEAR) {
++ if (option_verbose > 1)
++ ast_verbose(VERBOSE_PREFIX_2 "Channel %s is not a clear channel\n", chan->name);
++ } else {
++ /* Everything should be okay. Run PPP. */
++ if (option_verbose > 2)
++ ast_verbose(VERBOSE_PREFIX_3 "Starting RAS on %s\n", chan->name);
++ /* Execute RAS */
++ run_ras(chan, args);
++ }
++ }
++ LOCAL_USER_REMOVE(u);
++ return res;
++}
++
++int unload_module(void)
++{
++ int res;
++
++ res = ast_unregister_application(app);
++
++ STANDARD_HANGUP_LOCALUSERS;
++
++ return res;
++}
++
++int load_module(void)
++{
++ return ast_register_application(app, zapras_exec, synopsis, descrip);
++}
++
++char *description(void)
++{
++ return tdesc;
++}
++
++int usecount(void)
++{
++ int res;
++ STANDARD_USECOUNT(res);
++ return res;
++}
++
++char *key()
++{
++ return ASTERISK_GPL_KEY;
++}
+diff -urN asterisk-1.2.10.orig/asterisk.c asterisk-1.2.10/asterisk.c
+--- asterisk-1.2.10.orig/asterisk.c 2006-07-12 15:54:10.000000000 +0200
++++ asterisk-1.2.10/asterisk.c 2006-07-31 14:13:08.000000000 +0200
@@ -228,6 +228,7 @@
char ast_config_AST_CTL_OWNER[AST_CONFIG_MAX_PATH] = "\0";
char ast_config_AST_CTL_GROUP[AST_CONFIG_MAX_PATH] = "\0";
static char *_argv[256];
static int shuttingdown = 0;
-@@ -1893,6 +1894,7 @@
+@@ -1877,6 +1878,7 @@
ast_copy_string(ast_config_AST_PID, AST_PID, sizeof(ast_config_AST_PID));
ast_copy_string(ast_config_AST_SOCKET, AST_SOCKET, sizeof(ast_config_AST_SOCKET));
ast_copy_string(ast_config_AST_RUN_DIR, AST_RUN_DIR, sizeof(ast_config_AST_RUN_DIR));
/* no asterisk.conf? no problem, use buildtime config! */
if (!cfg) {
-@@ -2007,6 +2009,8 @@
+@@ -1991,6 +1993,8 @@
/* What group to run as */
} else if (!strcasecmp(v->name, "rungroup")) {
ast_copy_string(ast_config_AST_RUN_GROUP, v->value, sizeof(ast_config_AST_RUN_GROUP));
}
v = v->next;
}
-diff -urN asterisk-1.2.9.1.orig/build_tools/make_defaults_h asterisk-1.2.9.1/build_tools/make_defaults_h
---- asterisk-1.2.9.1.orig/build_tools/make_defaults_h 2005-06-20 19:26:08.000000000 +0200
-+++ asterisk-1.2.9.1/build_tools/make_defaults_h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/build_tools/make_defaults_h asterisk-1.2.10/build_tools/make_defaults_h
+--- asterisk-1.2.10.orig/build_tools/make_defaults_h 2005-06-20 19:26:08.000000000 +0200
++++ asterisk-1.2.10/build_tools/make_defaults_h 2006-07-31 14:13:08.000000000 +0200
@@ -16,6 +16,7 @@
#define AST_KEY_DIR "${INSTALL_PATH}${ASTVARLIBDIR}/keys"
#define AST_DB "${INSTALL_PATH}${ASTVARLIBDIR}/astdb"
#define AST_CONFIG_FILE "${INSTALL_PATH}${ASTCONFPATH}"
-diff -urN asterisk-1.2.9.1.orig/channel.c asterisk-1.2.9.1/channel.c
---- asterisk-1.2.9.1.orig/channel.c 2006-06-01 22:27:50.000000000 +0200
-+++ asterisk-1.2.9.1/channel.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/channel.c asterisk-1.2.10/channel.c
+--- asterisk-1.2.10.orig/channel.c 2006-07-10 23:01:35.000000000 +0200
++++ asterisk-1.2.10/channel.c 2006-07-31 14:13:08.000000000 +0200
@@ -94,8 +94,8 @@
*/
static int shutting_down = 0;
}
int ast_channel_spy_add(struct ast_channel *chan, struct ast_channel_spy *spy)
-@@ -2364,7 +2393,7 @@
+@@ -2377,7 +2406,7 @@
&chan->writetrans, 1);
}
{
int state = 0;
int cause = 0;
-@@ -2372,7 +2401,7 @@
+@@ -2385,7 +2414,7 @@
struct ast_frame *f;
int res = 0;
if (chan) {
if (oh) {
if (oh->vars)
-@@ -2386,6 +2415,7 @@
+@@ -2399,6 +2428,7 @@
}
ast_set_callerid(chan, cid_num, cid_name, cid_num);
if (!ast_call(chan, data, 0)) {
res = 1; /* in case chan->_state is already AST_STATE_UP */
while (timeout && (chan->_state != AST_STATE_UP)) {
-@@ -2409,6 +2439,7 @@
+@@ -2422,6 +2452,7 @@
if (f->subclass == AST_CONTROL_RINGING)
state = AST_CONTROL_RINGING;
else if ((f->subclass == AST_CONTROL_BUSY) || (f->subclass == AST_CONTROL_CONGESTION)) {
state = f->subclass;
ast_frfree(f);
break;
-@@ -2478,12 +2509,12 @@
+@@ -2491,12 +2522,12 @@
return chan;
}
{
struct chanlist *chan;
struct ast_channel *c;
-@@ -2520,6 +2551,7 @@
+@@ -2533,6 +2564,7 @@
if (!(c = chan->tech->requester(type, capabilities, data, cause)))
return NULL;
if (c->_state == AST_STATE_DOWN) {
manager_event(EVENT_FLAG_CALL, "Newchannel",
"Channel: %s\r\n"
-@@ -2775,6 +2807,29 @@
+@@ -2808,6 +2840,29 @@
return res;
}
void ast_change_name(struct ast_channel *chan, char *newname)
{
char tmp[256];
-@@ -2914,7 +2969,7 @@
+@@ -2947,7 +3002,7 @@
ast_copy_string(clone->name, masqn, sizeof(clone->name));
/* Notify any managers of the change, first the masq then the other */
manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", orig, newn, original->uniqueid);
/* Swap the technlogies */
-@@ -3141,15 +3196,14 @@
+@@ -3174,15 +3229,14 @@
);
}
manager_event(EVENT_FLAG_CALL,
(oldstate == AST_STATE_DOWN) ? "Newchannel" : "Newstate",
"Channel: %s\r\n"
-@@ -3165,6 +3219,10 @@
+@@ -3198,6 +3252,10 @@
return 0;
}
/*--- Find bridged channel */
struct ast_channel *ast_bridged_channel(struct ast_channel *chan)
{
-@@ -3342,6 +3400,7 @@
+@@ -3375,6 +3433,7 @@
char callee_warning = 0;
int to;
if (c0->_bridge) {
ast_log(LOG_WARNING, "%s is already in a bridge with %s\n",
c0->name, c0->_bridge->name);
-@@ -3352,6 +3411,10 @@
+@@ -3385,6 +3444,10 @@
c1->name, c1->_bridge->name);
return -1;
}
/* Stop if we're a zombie or need a soft hangup */
if (ast_test_flag(c0, AST_FLAG_ZOMBIE) || ast_check_hangup_locked(c0) ||
-diff -urN asterisk-1.2.9.1.orig/channels/Makefile asterisk-1.2.9.1/channels/Makefile
---- asterisk-1.2.9.1.orig/channels/Makefile 2006-04-30 16:27:56.000000000 +0200
-+++ asterisk-1.2.9.1/channels/Makefile 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/channels/Makefile asterisk-1.2.10/channels/Makefile
+--- asterisk-1.2.10.orig/channels/Makefile 2006-04-30 16:27:56.000000000 +0200
++++ asterisk-1.2.10/channels/Makefile 2006-07-31 14:13:08.000000000 +0200
@@ -102,6 +102,11 @@
ZAPR2=-lmfcr2
endif
chan_vpb.o: chan_vpb.c
$(CXX) -c $(CFLAGS) -o $@ chan_vpb.c
-diff -urN asterisk-1.2.9.1.orig/channels/chan_agent.c asterisk-1.2.9.1/channels/chan_agent.c
---- asterisk-1.2.9.1.orig/channels/chan_agent.c 2006-05-08 16:12:20.000000000 +0200
-+++ asterisk-1.2.9.1/channels/chan_agent.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/channels/chan_agent.c asterisk-1.2.10/channels/chan_agent.c
+--- asterisk-1.2.10.orig/channels/chan_agent.c 2006-07-06 22:38:45.000000000 +0200
++++ asterisk-1.2.10/channels/chan_agent.c 2006-07-31 14:13:08.000000000 +0200
@@ -440,7 +440,7 @@
if ((pointer = strchr(filename, '.')))
*pointer = '-';
ast_monitor_setjoinfiles(ast, 1);
snprintf(tmp2, sizeof(tmp2), "%s%s.%s", urlprefix ? urlprefix : "", filename, recordformatext);
#if 0
-@@ -1331,7 +1331,7 @@
+@@ -1323,7 +1323,7 @@
chan = agent_new(p, AST_STATE_DOWN);
} else if (!p->owner && !ast_strlen_zero(p->loginchan)) {
/* Adjustable agent */
if (p->chan)
chan = agent_new(p, AST_STATE_DOWN);
}
-diff -urN asterisk-1.2.9.1.orig/channels/chan_capi.c asterisk-1.2.9.1/channels/chan_capi.c
---- asterisk-1.2.9.1.orig/channels/chan_capi.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/channels/chan_capi.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/channels/chan_capi.c asterisk-1.2.10/channels/chan_capi.c
+--- asterisk-1.2.10.orig/channels/chan_capi.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/channels/chan_capi.c 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,2888 @@
+/*
+ * (CAPI*)
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/channels/chan_features.c asterisk-1.2.9.1/channels/chan_features.c
---- asterisk-1.2.9.1.orig/channels/chan_features.c 2006-01-25 19:39:44.000000000 +0100
-+++ asterisk-1.2.9.1/channels/chan_features.c 2006-06-09 10:25:04.000000000 +0200
-@@ -438,7 +438,7 @@
+diff -urN asterisk-1.2.10.orig/channels/chan_features.c asterisk-1.2.10/channels/chan_features.c
+--- asterisk-1.2.10.orig/channels/chan_features.c 2006-07-03 06:19:09.000000000 +0200
++++ asterisk-1.2.10/channels/chan_features.c 2006-07-31 14:13:08.000000000 +0200
+@@ -427,7 +427,7 @@
}
ast_mutex_unlock(&featurelock);
if (!tmp) {
if (!chan) {
ast_log(LOG_NOTICE, "Unable to allocate subchannel '%s/%s'\n", tech, dest);
return NULL;
-diff -urN asterisk-1.2.9.1.orig/channels/chan_iax2.c asterisk-1.2.9.1/channels/chan_iax2.c
---- asterisk-1.2.9.1.orig/channels/chan_iax2.c 2006-06-06 17:48:00.000000000 +0200
-+++ asterisk-1.2.9.1/channels/chan_iax2.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/channels/chan_iax2.c asterisk-1.2.10/channels/chan_iax2.c
+--- asterisk-1.2.10.orig/channels/chan_iax2.c 2006-07-12 17:23:59.000000000 +0200
++++ asterisk-1.2.10/channels/chan_iax2.c 2006-07-31 14:13:08.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
-@@ -3068,7 +3071,7 @@
+@@ -3089,7 +3092,7 @@
memset(&ied, 0, sizeof(ied));
ast_mutex_lock(&iaxsl[callno]);
if (callno && iaxs[callno]) {
alreadygone = ast_test_flag(iaxs[callno], IAX_ALREADYGONE);
/* Send the hangup unless we have had a transmission error or are already gone */
iax_ie_append_byte(&ied, IAX_IE_CAUSECODE, (unsigned char)c->hangupcause);
-@@ -3120,7 +3123,8 @@
+@@ -3141,7 +3144,8 @@
static struct ast_frame *iax2_read(struct ast_channel *c)
{
static struct ast_frame f = { AST_FRAME_NULL, };
return &f;
}
-diff -urN asterisk-1.2.9.1.orig/channels/chan_sip.c asterisk-1.2.9.1/channels/chan_sip.c
---- asterisk-1.2.9.1.orig/channels/chan_sip.c 2006-05-25 19:18:01.000000000 +0200
-+++ asterisk-1.2.9.1/channels/chan_sip.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/channels/chan_sip.c asterisk-1.2.10/channels/chan_sip.c
+--- asterisk-1.2.10.orig/channels/chan_sip.c 2006-07-13 18:44:23.000000000 +0200
++++ asterisk-1.2.10/channels/chan_sip.c 2006-07-31 14:53:09.000000000 +0200
@@ -603,6 +603,7 @@
unsigned int flags; /*!< SIP_ flags */
int timer_t1; /*!< SIP timer T1, ms rtt */
p->subscribed = NONE;
append_history(p, "Subscribestatus", "timeout");
return 10000; /* Reschedule this destruction so that we know that it's gone */
-@@ -3150,16 +3156,30 @@
+@@ -3144,16 +3150,30 @@
/*! \brief find_call: Connect incoming SIP message to current dialog or create new dialog structure */
/* Called by handle_request, sipsock_read */
if (pedanticsipchecking) {
/* In principle Call-ID's uniquely identify a call, but with a forking SIP proxy
we need more to identify a branch - so we have to check branch, from
-@@ -4141,6 +4161,7 @@
+@@ -4135,6 +4155,7 @@
if (sipmethod == SIP_CANCEL) {
c = p->initreq.rlPart2; /* Use original URI */
} else if (sipmethod == SIP_ACK) {
/* Use URI from Contact: in 200 OK (if INVITE)
(we only have the contacturi on INVITEs) */
if (!ast_strlen_zero(p->okcontacturi))
-@@ -4907,13 +4928,15 @@
+@@ -4901,13 +4922,15 @@
ast_build_string(&invite, &invite_max, ";%s", p->options->uri_options);
ast_copy_string(p->uri, invite_buf, sizeof(p->uri));
} else {
snprintf(to, sizeof(to), "<%s>", p->uri);
}
-@@ -4970,6 +4993,11 @@
+@@ -4964,6 +4987,11 @@
if (!ast_strlen_zero(p->referred_by))
add_header(&req, "Referred-By", p->referred_by);
}
#ifdef OSP_SUPPORT
if ((req.method != SIP_OPTIONS) && p->options && !ast_strlen_zero(p->options->osptoken)) {
ast_log(LOG_DEBUG,"Adding OSP Token: %s\n", p->options->osptoken);
-@@ -5044,8 +5072,7 @@
+@@ -5038,8 +5066,7 @@
}
/*! \brief transmit_state_notify: Used in the SUBSCRIBE notification subsystem ----*/
char tmp[4000], from[256], to[256];
char *t = tmp, *c, *a, *mfrom, *mto;
size_t maxbytes = sizeof(tmp);
-@@ -5189,10 +5216,19 @@
+@@ -5183,10 +5210,19 @@
case DIALOG_INFO_XML: /* SNOM subscribes in this format */
ast_build_string(&t, &maxbytes, "<?xml version=\"1.0\"?>\n");
ast_build_string(&t, &maxbytes, "<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"%d\" state=\"%s\" entity=\"%s\">\n", p->dialogver++, full ? "full":"partial", mto);
ast_build_string(&t, &maxbytes, "<state>%s</state>\n", statestring);
ast_build_string(&t, &maxbytes, "</dialog>\n</dialog-info>\n");
break;
-@@ -6019,8 +6055,10 @@
+@@ -6013,8 +6049,10 @@
p->expire = -1;
pvt->expiry = expiry;
snprintf(data, sizeof(data), "%s:%d:%d:%s:%s", ast_inet_ntoa(iabuf, sizeof(iabuf), p->addr.sin_addr), ntohs(p->addr.sin_port), expiry, p->username, p->fullcontact);
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Registered\r\n", p->name);
if (inaddrcmp(&p->addr, &oldsin)) {
sip_poke_peer(p);
-@@ -6411,7 +6449,7 @@
+@@ -6405,7 +6443,7 @@
/*! \brief cb_extensionstate: Callback for the devicestate notification (SUBSCRIBE) support subsystem ---*/
/* If you add an "hint" priority to the extension in the dial plan,
you will get notifications on device state changes */
{
struct sip_pvt *p = data;
-@@ -6430,7 +6468,7 @@
+@@ -6424,7 +6462,7 @@
p->laststate = state;
break;
}
if (option_debug > 1)
ast_verbose(VERBOSE_PREFIX_1 "Extension Changed %s new state %s for Notify User %s\n", exten, ast_extension_state2str(state), p->username);
-@@ -6456,7 +6494,13 @@
+@@ -6450,7 +6488,13 @@
char *name, *c;
char *t;
char *domain;
/* Terminate URI */
t = uri;
while(*t && (*t > 32) && (*t != ';'))
-@@ -6505,9 +6549,68 @@
+@@ -6499,9 +6543,68 @@
if (!ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC)) {
ast_log(LOG_ERROR, "Peer '%s' is trying to register, but not configured as host=dynamic\n", peer->name);
} else {
sip_cancel_destroy(p);
switch (parse_register_contact(p, peer, req)) {
case PARSE_REGISTER_FAILED:
-@@ -6527,6 +6630,7 @@
+@@ -6521,6 +6624,7 @@
transmit_response_with_date(p, "200 OK", req);
peer->lastmsgssent = -1;
res = 0;
break;
}
}
-@@ -6872,6 +6976,11 @@
+@@ -6866,6 +6970,11 @@
/* XXX The refer_to could contain a call on an entirely different machine, requiring an
INVITE with a replaces header -anthm XXX */
/* The only way to find out is to use the dialplan - oej */
}
} else if (ast_exists_extension(NULL, transfercontext, refer_to, 1, NULL) || !strcmp(refer_to, ast_parking_ext())) {
/* This is an unsupervised transfer (blind transfer) */
-@@ -7592,6 +7701,8 @@
+@@ -7586,6 +7695,8 @@
int peers_offline = 0;
char *id;
char idtext[256] = "";
if (s) { /* Manager - get ActionID */
id = astman_get_header(m,"ActionID");
-@@ -7634,6 +7745,7 @@
+@@ -7628,6 +7739,7 @@
else
ast_copy_string(name, iterator->name, sizeof(name));
pstatus = peer_status(iterator, status, sizeof(status));
if (pstatus)
peers_online++;
-@@ -7650,14 +7762,24 @@
+@@ -7644,14 +7756,24 @@
}
}
ast_cli(fd, FORMAT, name,
iterator->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), iterator->addr.sin_addr) : "(Unspecified)",
ast_test_flag(&iterator->flags_page2, SIP_PAGE2_DYNAMIC) ? " D " : " ", /* Dynamic or not? */
-@@ -7665,6 +7787,7 @@
+@@ -7659,6 +7781,7 @@
iterator->ha ? " A " : " ", /* permit/deny */
ntohs(iterator->addr.sin_port), status);
} else { /* Manager format */
/* The names here need to be the same as other channels */
ast_cli(fd,
-@@ -7690,7 +7813,9 @@
+@@ -7684,7 +7807,9 @@
ASTOBJ_UNLOCK(iterator);
} while(0) );
if (!s) {
-@@ -8725,6 +8850,7 @@
+@@ -8719,6 +8844,7 @@
char buf[1024];
unsigned int event;
char *c;
/* Need to check the media/type */
if (!strcasecmp(get_header(req, "Content-Type"), "application/dtmf-relay") ||
-@@ -8788,6 +8914,19 @@
+@@ -8782,6 +8908,19 @@
ast_queue_control(p->owner, AST_CONTROL_VIDUPDATE);
transmit_response(p, "200 OK", req);
return;
} else if ((c = get_header(req, "X-ClientCode"))) {
/* Client code (from SNOM phone) */
if (ast_test_flag(p, SIP_USECLIENTCODE)) {
-@@ -8887,12 +9026,63 @@
+@@ -8881,12 +9020,63 @@
return RESULT_SUCCESS;
}
if (argc < 4)
return RESULT_SHOWUSAGE;
-@@ -8909,41 +9099,13 @@
+@@ -8903,41 +9093,13 @@
}
for (i = 3; i < argc; i++) {
- }
-
- initreqprep(&req, p, SIP_NOTIFY);
--
-- for (var = varlist; var; var = var->next)
-- add_header(&req, var->name, var->value);
+ if (sip_send_notify(fd, argv[2], argv[i]) == RESULT_FAILURE)
+ res = RESULT_FAILURE;
+ }
+ return res;
+}
+- for (var = varlist; var; var = var->next)
+- add_header(&req, var->name, var->value);
+
- add_blank_header(&req);
- /* Recalculate our side, and recalculate Call ID */
- if (ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip))
- transmit_sip_request(p, &req);
- sip_scheddestroy(p, 15000);
- }
-
+-
- return RESULT_SUCCESS;
-}
/*! \brief sip_do_history: Enable SIP History logging (CLI) ---*/
static int sip_do_history(int fd, int argc, char *argv[])
{
-@@ -9597,12 +9759,13 @@
- check_pendings(p);
- ast_set_flag(p, SIP_CAN_BYE);
- break;
-+ case 183:
- case 180: /* 180 Ringing */
- sip_cancel_destroy(p);
+@@ -9598,7 +9760,7 @@
if (!ignore && p->owner) {
ast_queue_control(p->owner, AST_CONTROL_RINGING);
if (p->owner->_state != AST_STATE_UP)
}
if (find_sdp(req)) {
process_sdp(p, req);
-@@ -9616,21 +9779,6 @@
- check_pendings(p);
- ast_set_flag(p, SIP_CAN_BYE);
- break;
-- case 183: /* Session progress */
-- sip_cancel_destroy(p);
-- /* Ignore 183 Session progress without SDP */
-- if (find_sdp(req)) {
-- process_sdp(p, req);
-- if (!ignore && p->owner) {
-- /* Queue a progress frame */
-- ast_queue_control(p->owner, AST_CONTROL_PROGRESS);
-- }
-- }
-- /* must call check_pendings before setting CAN_BYE, so that
-- if PENDINGBYE is set it will know to send CANCEL instead */
-- check_pendings(p);
-- ast_set_flag(p, SIP_CAN_BYE);
-- break;
- case 200: /* 200 OK on invite - someone's answering our call */
- sip_cancel_destroy(p);
- p->authtries = 0;
-@@ -10424,9 +10572,18 @@
+@@ -10423,9 +10585,18 @@
/* This is a call to ourself. Send ourselves an error code and stop
processing immediately, as SIP really has no good mechanism for
being able to call yourself */
}
if (!ignore) {
/* Use this as the basis */
-@@ -10658,6 +10815,7 @@
+@@ -10657,6 +10828,7 @@
struct ast_channel *c=NULL;
int res;
struct ast_channel *transfer_to;
if (option_debug > 2)
ast_log(LOG_DEBUG, "SIP call transfer received for call %s (REFER)!\n", p->callid);
-@@ -10666,9 +10824,74 @@
+@@ -10665,9 +10837,73 @@
res = get_refer_info(p, req);
if (res < 0)
- transmit_response_with_allow(p, "404 Not Found", req, 1);
+ transmit_response(p, "603 Declined", req);
- else if (res > 0)
+ else if (res == 1)
- transmit_response_with_allow(p, "484 Address Incomplete", req, 1);
+ transmit_response(p, "484 Address Incomplete", req);
- else {
+ else if (res == 2) {
-+ transmit_response(p, "202 Accepted", req);
-+ rp = sip_alloc(NULL, NULL, 0, SIP_INVITE);
-+ if (!rp) {
-+ return -1;
-+ }
-+ rp->capability = global_capability;
++ transmit_response(p, "202 Accepted", req);
++ rp = sip_alloc(NULL, NULL, 0, SIP_INVITE);
++ if (!rp) {
++ return -1;
++ }
++ rp->capability = global_capability;
+
-+ build_route(rp, req, 0);
++ build_route(rp, req, 0);
+ if (option_verbose > 3)
+ ast_log(LOG_NOTICE, "got REFER for callid %s TO %s CONTACT %s replacing callid %s (tohost %s, p->route %s, rp->route %s)\n", p->callid, p->refer_to, p->refer_contact, p->refer_replaces, p->tohost, p->route->hop, rp->route->hop);
-+ if (create_addr(rp, p->tohost)) {
-+ sip_destroy(rp);
-+ return -1;
-+ }
++ if (create_addr(rp, p->tohost)) {
++ sip_destroy(rp);
++ return -1;
++ }
+
-+ if (ast_sip_ouraddrfor(&rp->sa.sin_addr,&rp->ourip)) {
-+ memcpy(&rp->ourip, &__ourip, sizeof(rp->ourip));
-+ }
-+ build_via(rp, rp->via, sizeof(rp->via));
-+ build_callid(rp->callid, sizeof(rp->callid) - 1, rp->ourip, rp->fromdomain);
-+
++ if (ast_sip_ouraddrfor(&rp->sa.sin_addr,&rp->ourip)) {
++ memcpy(&rp->ourip, &__ourip, sizeof(rp->ourip));
++ }
++ build_via(rp, rp->via, sizeof(rp->via));
++ build_callid(rp->callid, sizeof(rp->callid) - 1, rp->ourip, rp->fromdomain);
++
+ ast_log(LOG_NOTICE, "1\n");
-+ rp->prefcodec = p->prefcodec;
-+ rp->jointcapability = rp->capability;
-+ rp->rtp = p->rtp;
-+ p->rtp = NULL;
-+ if (!ast_strlen_zero(p->refer_to)) {
-+ ast_copy_string(rp->username, p->refer_to, sizeof(rp->username));
-+ rp->fullcontact[0] = '\0';
-+ }
-+ if (!ast_strlen_zero(p->refer_replaces)) {
-+ ast_copy_string(rp->refer_replaces, p->refer_replaces, sizeof(rp->refer_replaces));
-+ }
++ rp->prefcodec = p->prefcodec;
++ rp->jointcapability = rp->capability;
++ rp->rtp = p->rtp;
++ p->rtp = NULL;
++ if (!ast_strlen_zero(p->refer_to)) {
++ ast_copy_string(rp->username, p->refer_to, sizeof(rp->username));
++ rp->fullcontact[0] = '\0';
++ }
++ if (!ast_strlen_zero(p->refer_replaces)) {
++ ast_copy_string(rp->refer_replaces, p->refer_replaces, sizeof(rp->refer_replaces));
++ }
+ ast_log(LOG_NOTICE, "2\n");
+ ast_set_flag(rp, SIP_OUTGOING);
+
+ rp->initid = ast_sched_add(sched, rp->maxtime * 4, auto_congest, rp);
+ }
+
-+ transmit_notify_with_sipfrag(p, seqno);
++ transmit_notify_with_sipfrag(p, seqno);
+
+ /* Always increment on a BYE */
+ transmit_request_with_auth(p, SIP_BYE, 0, 1, 1);
+ ast_set_flag(p, SIP_ALREADYGONE);
+ return 0;
-+
-+ } else { /* res == 0 */
++ } else { /* res == 0 */
int nobye = 0;
if (!ignore) {
if (p->refer_call) {
-@@ -10993,7 +11216,7 @@
+@@ -10995,7 +11231,7 @@
struct sip_pvt *p_old;
transmit_response(p, "200 OK", req);
append_history(p, "Subscribestatus", ast_extension_state2str(firststate));
/* remove any old subscription from this peer for the same exten/context,
-@@ -11187,6 +11410,8 @@
+@@ -11189,6 +11425,8 @@
res = handle_request_options(p, req, debug);
break;
case SIP_INVITE:
res = handle_request_invite(p, req, debug, ignore, seqno, sin, recount, e);
break;
case SIP_REFER:
-@@ -11307,7 +11532,7 @@
+@@ -11309,7 +11547,7 @@
/* Process request, with netlock held */
retrylock:
ast_mutex_lock(&netlock);
if (p) {
/* Go ahead and lock the owner if it has one -- we may need it */
if (p->owner && ast_mutex_trylock(&p->owner->lock)) {
-@@ -11634,6 +11859,52 @@
+@@ -11636,6 +11874,52 @@
return 0;
}
/*! \brief sip_devicestate: Part of PBX channel interface ---*/
/* Return values:---
-@@ -12171,6 +12442,7 @@
+@@ -12173,6 +12457,7 @@
peer->expire = -1;
peer->pokeexpire = -1;
ast_copy_string(peer->name, name, sizeof(peer->name));
ast_copy_flags(peer, &global_flags, SIP_FLAGS_TO_COPY);
strcpy(peer->context, default_context);
-@@ -12216,7 +12488,9 @@
+@@ -12218,7 +12503,9 @@
if (peer) {
/* Already in the list, remove it and it will be added back (or FREE'd) */
} else {
peer = malloc(sizeof(*peer));
if (peer) {
-@@ -12228,6 +12502,7 @@
+@@ -12230,6 +12517,7 @@
ASTOBJ_INIT(peer);
peer->expire = -1;
peer->pokeexpire = -1;
} else {
ast_log(LOG_WARNING, "Can't allocate SIP peer memory\n");
}
-@@ -12373,6 +12648,10 @@
+@@ -12375,6 +12663,10 @@
peer->call_limit = atoi(v->value);
if (peer->call_limit < 0)
peer->call_limit = 0;
} else if (!strcasecmp(v->name, "amaflags")) {
format = ast_cdr_amaflags2int(v->value);
if (format < 0) {
-@@ -12768,8 +13047,24 @@
+@@ -12770,8 +13062,24 @@
if (!strcasecmp(utype, "peer") || !strcasecmp(utype, "friend")) {
peer = build_peer(cat, ast_variable_browse(cfg, cat), 0);
if (peer) {
}
} else if (strcasecmp(utype, "user")) {
ast_log(LOG_WARNING, "Unknown type '%s' for '%s' in %s\n", utype, cat, "sip.conf");
-@@ -13359,6 +13654,8 @@
+@@ -13361,6 +13669,8 @@
"List SIP peers (text format)", mandescr_show_peers);
ast_manager_register2("SIPshowpeer", EVENT_FLAG_SYSTEM, manager_sip_show_peer,
"Show SIP peer (text format)", mandescr_show_peer);
sip_poke_all_peers();
sip_send_all_registers();
-@@ -13389,6 +13686,7 @@
+@@ -13391,6 +13701,7 @@
ast_rtp_proto_unregister(&sip_rtp);
ast_manager_unregister("SIPpeers");
ast_manager_unregister("SIPshowpeer");
-diff -urN asterisk-1.2.9.1.orig/channels/chan_zap.c asterisk-1.2.9.1/channels/chan_zap.c
---- asterisk-1.2.9.1.orig/channels/chan_zap.c 2006-05-31 22:26:17.000000000 +0200
-+++ asterisk-1.2.9.1/channels/chan_zap.c 2006-06-15 16:09:02.000000000 +0200
+diff -urN asterisk-1.2.10.orig/channels/chan_zap.c asterisk-1.2.10/channels/chan_zap.c
+--- asterisk-1.2.10.orig/channels/chan_zap.c 2006-07-12 15:54:10.000000000 +0200
++++ asterisk-1.2.10/channels/chan_zap.c 2006-08-09 16:15:04.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
ast_mutex_lock(&p->lock);
ast_log(LOG_DEBUG, "New owner for channel %d is %s\n", p->channel, newchan->name);
if (p->owner == oldchan) {
-@@ -3636,7 +3943,7 @@
+@@ -3633,7 +3940,7 @@
if (p->call) {
if (p->pri && p->pri->pri) {
if (!pri_grab(p, p->pri)) {
pri_destroycall(p->pri->pri, p->call);
p->call = NULL;
pri_rel(p->pri);
-@@ -4599,7 +4906,7 @@
+@@ -4596,7 +4903,7 @@
p->subs[index].f.data = NULL;
p->subs[index].f.datalen= 0;
}
/* Perform busy detection. etc on the zap line */
f = ast_dsp_process(ast, p->dsp, &p->subs[index].f);
if (f) {
-@@ -4611,8 +4918,9 @@
+@@ -4608,8 +4915,9 @@
}
} else if (f->frametype == AST_FRAME_DTMF) {
#ifdef ZAPATA_PRI
f->frametype = AST_FRAME_NULL;
f->subclass = 0;
}
-@@ -4660,8 +4968,10 @@
+@@ -4657,8 +4965,10 @@
pbx_builtin_setvar_helper(ast, "FAXEXTEN", ast->exten);
if (ast_async_goto(ast, target_context, "fax", 1))
ast_log(LOG_WARNING, "Failed to async goto '%s' into fax of '%s'\n", ast->name, target_context);
} else
ast_log(LOG_DEBUG, "Already in a fax extension, not redirecting\n");
} else
-@@ -4747,7 +5057,9 @@
+@@ -4744,7 +5054,9 @@
#endif
/* Write a frame of (presumably voice) data */
if (frame->frametype != AST_FRAME_VOICE) {
ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
return 0;
}
-@@ -4818,7 +5130,7 @@
+@@ -4815,7 +5127,7 @@
switch(condition) {
case AST_CONTROL_BUSY:
#ifdef ZAPATA_PRI
chan->hangupcause = AST_CAUSE_USER_BUSY;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
-@@ -4900,7 +5212,7 @@
+@@ -4897,7 +5209,7 @@
case AST_CONTROL_CONGESTION:
chan->hangupcause = AST_CAUSE_CONGESTION;
#ifdef ZAPATA_PRI
chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
-@@ -5085,8 +5397,12 @@
+@@ -5082,8 +5394,12 @@
if (state == AST_STATE_RING)
tmp->rings = 1;
tmp->tech_pvt = i;
tmp->callgroup = i->callgroup;
tmp->pickupgroup = i->pickupgroup;
}
-@@ -5216,6 +5532,7 @@
+@@ -5213,6 +5529,7 @@
int len = 0;
int res;
int index;
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Starting simple switch on '%s'\n", chan->name);
index = zt_get_index(chan, p, 1);
-@@ -5234,10 +5551,17 @@
+@@ -5231,10 +5548,17 @@
len = strlen(exten);
res = 0;
while((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
timeout = matchdigittimeout;
else
-@@ -6724,6 +7048,8 @@
+@@ -6327,18 +6651,44 @@
+ break;
+ case ZT_EVENT_NOALARM:
+ i->inalarm = 0;
++#ifdef ZAPATA_PRI
++ if (i->pri) {
++ if ((i->pri->nodetype == BRI_CPE_PTMP) || (i->pri->nodetype == BRI_CPE_PTMP)) {
++ /* dont annoy BRI TE mode users with layer2layer alarms */
++ } else {
++ ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", i->channel);
++ manager_event(EVENT_FLAG_SYSTEM, "AlarmClear",
++ "Channel: %d\r\n", i->channel);
++ }
++ }
++#else
+ ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", i->channel);
+ manager_event(EVENT_FLAG_SYSTEM, "AlarmClear",
+ "Channel: %d\r\n", i->channel);
++#endif
+ break;
+ case ZT_EVENT_ALARM:
+ i->inalarm = 1;
+ res = get_alarms(i);
++#ifdef ZAPATA_PRI
++ if (i->pri) {
++ if ((i->pri->nodetype == BRI_CPE_PTMP) || (i->pri->nodetype == BRI_CPE_PTMP)) {
++ /* dont annoy BRI TE mode users with layer2layer alarms */
++ } else {
++ ast_log(LOG_WARNING, "Detected alarm on channel %d: %s\n", i->channel, alarm2str(res));
++ manager_event(EVENT_FLAG_SYSTEM, "Alarm",
++ "Alarm: %s\r\n"
++ "Channel: %d\r\n",
++ alarm2str(res), i->channel);
++ }
++ }
++#else
+ ast_log(LOG_WARNING, "Detected alarm on channel %d: %s\n", i->channel, alarm2str(res));
+ manager_event(EVENT_FLAG_SYSTEM, "Alarm",
+ "Alarm: %s\r\n"
+ "Channel: %d\r\n",
+ alarm2str(res), i->channel);
++#endif
+ /* fall thru intentionally */
+ case ZT_EVENT_ONHOOK:
+ if (i->radio) break;
+@@ -6378,8 +6728,10 @@
+ zt_set_hook(i->subs[SUB_REAL].zfd, ZT_ONHOOK);
+ break;
+ case SIG_PRI:
+- zt_disable_ec(i);
+- res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, -1);
++ if (event != ZT_EVENT_ALARM) {
++ zt_disable_ec(i);
++ res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, -1);
++ }
+ break;
+ default:
+ ast_log(LOG_WARNING, "Don't know how to handle on hook with signalling %s on channel %d\n", sig2str(i->sig), i->channel);
+@@ -6702,6 +7054,8 @@
} else {
if (si->totalchans == 31) { /* if it's an E1 */
pris[*span].dchannels[0] = 16 + offset;
} else {
pris[*span].dchannels[0] = 24 + offset;
}
-@@ -6811,6 +7137,10 @@
+@@ -6789,6 +7143,10 @@
#endif
static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_pri *pri, int reloading)
{
/* Make a zt_pvt structure for this interface (or CRV if "pri" is specified) */
-@@ -6969,6 +7299,11 @@
+@@ -6947,6 +7305,11 @@
destroy_zt_pvt(&tmp);
return NULL;
}
if (!ast_strlen_zero(pris[span].idledial) && strcmp(pris[span].idledial, idledial)) {
ast_log(LOG_ERROR, "Span %d already has idledial '%s'.\n", span + 1, idledial);
destroy_zt_pvt(&tmp);
-@@ -6996,6 +7331,17 @@
+@@ -6974,6 +7337,17 @@
return NULL;
}
pris[span].nodetype = pritype;
+ }
+// XXX tuev
+
-+ if ((pritype == BRI_CPE) || (pritype == BRI_CPE_PTMP)) {
-+ pris[span].dchanavail[0] = DCHAN_AVAILABLE;
-+ pri_find_dchan(&pris[span]);
-+ }
++// if ((pritype == BRI_CPE) || (pritype == BRI_CPE_PTMP)) {
++// pris[span].dchanavail[0] = DCHAN_AVAILABLE;
++// pri_find_dchan(&pris[span]);
++// }
pris[span].switchtype = myswitchtype;
pris[span].nsf = nsf;
pris[span].dialplan = dialplan;
-@@ -7004,9 +7350,14 @@
+@@ -6982,9 +7356,14 @@
pris[span].minunused = minunused;
pris[span].minidle = minidle;
pris[span].overlapdial = overlapdial;
ast_copy_string(pris[span].internationalprefix, internationalprefix, sizeof(pris[span].internationalprefix));
ast_copy_string(pris[span].nationalprefix, nationalprefix, sizeof(pris[span].nationalprefix));
ast_copy_string(pris[span].localprefix, localprefix, sizeof(pris[span].localprefix));
-@@ -7027,6 +7378,36 @@
+@@ -7005,6 +7384,36 @@
tmp->prioffset = 0;
}
#endif
+ }
+ tmp->gsm.pvt = tmp;
+ tmp->gsm.span = tmp->span;
-+ tmp->gsm.modul = gsm_new(tmp->gsm.fd, 0, tmp->gsm.pin, tmp->span);
++ tmp->gsm.modul = gsm_new(tmp->gsm.fd, 0, tmp->gsm.pin, tmp->span, tmp->channel);
+ if (ioctl(tmp->subs[SUB_REAL].zfd, ZT_AUDIOMODE, tmp->channel)) {
+ ast_log(LOG_ERROR, "Unable to set clear mode on clear channel %d: %s\n", tmp->channel, strerror(errno));
+ destroy_zt_pvt(&tmp);
#ifdef ZAPATA_R2
if (signalling == SIG_R2) {
if (r2prot < 0) {
-@@ -7160,6 +7541,7 @@
+@@ -7138,6 +7547,7 @@
tmp->restrictcid = restrictcid;
tmp->use_callingpres = use_callingpres;
tmp->priindication_oob = priindication_oob;
tmp->priexclusive = cur_priexclusive;
if (tmp->usedistinctiveringdetection) {
if (!tmp->use_callerid) {
-@@ -7433,7 +7815,7 @@
+@@ -7411,7 +7821,7 @@
break;
if (!backwards && (x >= pri->numchans))
break;
ast_log(LOG_DEBUG, "Found empty available channel %d/%d\n",
pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
return x;
-@@ -7480,7 +7862,7 @@
+@@ -7458,7 +7868,7 @@
end = ifend;
/* We do signed linear */
oldformat = format;
if (!format) {
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", oldformat);
return NULL;
-@@ -7640,6 +8022,11 @@
+@@ -7618,6 +8028,11 @@
p->digital = 1;
if (tmp)
tmp->transfercapability = AST_TRANS_CAP_DIGITAL;
} else {
ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", opt, (char *)data);
}
-@@ -7679,6 +8066,164 @@
+@@ -7651,12 +8066,174 @@
+ *cause = AST_CAUSE_BUSY;
+ } else if (groupmatched) {
+ *cause = AST_CAUSE_CONGESTION;
++ } else {
++ *cause = AST_CAUSE_CONGESTION;
+ }
+ }
+
return tmp;
}
+ ast_mutex_lock(&gsm->pvt->lock);
+ if (!ast_strlen_zero(e->ring.callingnum)) {
+ strncpy(gsm->pvt->cid_num, e->ring.callingnum, sizeof(gsm->pvt->cid_num) - 1);
++ } else {
++ strncpy(gsm->pvt->cid_name, withheldcid, sizeof(gsm->pvt->cid_name));
+ }
+ if (!ast_strlen_zero(gsm->exten)) {
+ strncpy(gsm->pvt->exten, gsm->exten, sizeof(gsm->pvt->exten) - 1);
+ fprintf(stderr, "No gsm_mod\n");
+ return NULL;
+ }
-+ gsm_set_debug(gsm->modul, 1);
++ gsm_set_debug(gsm->modul, GSM_DEBUG_NONE);
+ for (;;) {
+
+ /* Run the D-Channel */
#ifdef ZAPATA_PRI
static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
-@@ -7693,6 +8238,57 @@
+@@ -7671,6 +8248,57 @@
return NULL;
}
static int pri_find_principle(struct zt_pri *pri, int channel)
{
-@@ -7725,7 +8321,9 @@
+@@ -7703,7 +8331,9 @@
static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
{
int x;
if (!c) {
if (principle < 0)
return -1;
-@@ -7739,6 +8337,7 @@
+@@ -7717,6 +8347,7 @@
/* First, check for other bearers */
for (x=0;x<pri->numchans;x++) {
if (!pri->pvts[x]) continue;
if (pri->pvts[x]->call == c) {
/* Found our call */
if (principle != x) {
-@@ -7752,19 +8351,56 @@
+@@ -7730,19 +8361,56 @@
}
/* Fix it all up now */
pri->pvts[principle]->owner = pri->pvts[x]->owner;
}
return principle;
}
-@@ -7793,7 +8429,9 @@
+@@ -7771,7 +8439,9 @@
}
crv = crv->next;
}
return -1;
}
-@@ -7855,86 +8493,33 @@
+@@ -7830,86 +8500,33 @@
#ifndef PRI_RESTART
#error "Upgrade your libpri"
#endif
- int x, y;
- int dchan = -1, span = -1;
- int dchancount = 0;
--
++ ast_log(LOG_WARNING, "%d %s", span, s);
++}
+
- if (pri) {
- for (x = 0; x < NUM_SPANS; x++) {
- for (y = 0; y < NUM_DCHANS; y++) {
- ast_log(LOG_WARNING, "%s", s);
-
- ast_mutex_lock(&pridebugfdlock);
-+ ast_log(LOG_WARNING, "%d %s", span, s);
-+}
-
+-
- if (pridebugfd >= 0)
- write(pridebugfd, s, strlen(s));
+#ifdef ZAPATA_GSM
-+static void zt_gsm_message(char *s, int span)
++static void zt_gsm_message(char *s, int channel)
+{
-+// ast_verbose("%d %s", span, s);
++ ast_verbose("GSM %d: %s", channel, s);
+}
- ast_mutex_unlock(&pridebugfdlock);
-+static void zt_gsm_error(char *s, int span)
++static void zt_gsm_error(char *s, int channel)
+{
-+ ast_log(LOG_WARNING, "GSM: %d %s", span, s);
++ ast_log(LOG_WARNING, "GSM %d: %s", channel, s);
}
+#endif
do {
pri->resetpos++;
} while((pri->resetpos < pri->numchans) &&
-@@ -8017,6 +8602,32 @@
+@@ -7992,6 +8609,32 @@
}
}
static void *pri_dchannel(void *vpri)
{
struct zt_pri *pri = vpri;
-@@ -8108,6 +8719,8 @@
- } else if (pri->pvts[x] && pri->pvts[x]->owner && pri->pvts[x]->isidlecall)
- activeidles++;
- }
-+ // ast_log(LOG_NOTICE, "name = %s condition = %d index = %d (%d) zfd = %d res = %d\n",chan->name, condition, index, SUB_REAL, p->subs[index].zfd, res);
-+
- #if 0
- printf("nextidle: %d, haveidles: %d, minunsed: %d\n",
- nextidle, haveidles, minunused);
-@@ -8209,9 +8822,36 @@
+@@ -8172,15 +8815,44 @@
+ /* Check for an event */
+ x = 0;
+ res = ioctl(pri->fds[which], ZT_GETEVENT, &x);
+- if (x)
++ if ((pri->nodetype != BRI_CPE) && (pri->nodetype != BRI_CPE_PTMP)) {
++ /* dont annoy BRI TE mode users with layer2layer alarms */
++ if (x)
+ ast_log(LOG_NOTICE, "PRI got event: %s (%d) on %s D-channel of span %d\n", event2str(x), x, pri_order(which), pri->span);
++ }
+ /* Keep track of alarm state */
if (x == ZT_EVENT_ALARM) {
pri->dchanavail[which] &= ~(DCHAN_NOTINALARM | DCHAN_UP);
pri_find_dchan(pri);
+ if ((pri->nodetype == BRI_CPE) || (pri->nodetype == BRI_CPE_PTMP)) {
+ if (pri->pri) {
-+ ast_log(LOG_NOTICE, "pri_shutdown\n");
+ for (i=0; i<pri->numchans; i++) {
+ struct zt_pvt *p = pri->pvts[i];
+ if (p) {
- pri_restart(pri->dchans[which]);
+ if ((pri->nodetype == BRI_CPE) || (pri->nodetype == BRI_CPE_PTMP)) {
+ pri->dchanavail[which] |= DCHAN_NOTINALARM;
-+ pri->dchanavail[which] |= DCHAN_UP;
++ // pri->dchanavail[which] |= DCHAN_UP;
+ } else {
+ pri->dchanavail[which] |= DCHAN_NOTINALARM;
+ pri_restart(pri->dchans[which]);
}
if (option_debug)
-@@ -8223,8 +8863,7 @@
+@@ -8192,8 +8864,7 @@
break;
}
} else if (errno != EINTR)
if (e) {
if (pri->debug)
pri_dump_event(pri->dchans[which], e);
-@@ -8232,32 +8871,102 @@
+@@ -8201,32 +8872,102 @@
pri->dchanavail[which] |= DCHAN_UP;
switch(e->e) {
case PRI_EVENT_DCHAN_UP:
pri->resetting = 0;
/* Hangup active channels and put them in alarm mode */
for (i=0; i<pri->numchans; i++) {
-@@ -8265,19 +8974,29 @@
+@@ -8234,19 +8975,29 @@
if (p) {
if (p->call) {
if (p->pri && p->pri->pri) {
}
break;
case PRI_EVENT_RESTART:
-@@ -8312,8 +9031,8 @@
+@@ -8281,8 +9032,8 @@
pri_destroycall(pri->pri, pri->pvts[x]->call);
pri->pvts[x]->call = NULL;
}
else if (pri->pvts[x]->owner)
pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
ast_mutex_unlock(&pri->pvts[x]->lock);
-@@ -8347,7 +9066,6 @@
+@@ -8316,7 +9067,6 @@
}
}
break;
case PRI_EVENT_INFO_RECEIVED:
chanpos = pri_find_principle(pri, e->ring.channel);
if (chanpos < 0) {
-@@ -8356,9 +9074,11 @@
+@@ -8325,9 +9075,11 @@
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
if (chanpos > -1) {
/* how to do that */
int digitlen = strlen(e->ring.callednum);
char digit;
-@@ -8370,6 +9090,14 @@
+@@ -8339,6 +9091,14 @@
zap_queue_frame(pri->pvts[chanpos], &f, pri);
}
}
}
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
-@@ -8377,39 +9105,58 @@
+@@ -8346,39 +9106,58 @@
break;
case PRI_EVENT_RING:
crv = NULL;
if (pri->switchtype == PRI_SWITCH_GR303_TMC) {
/* Should be safe to lock CRV AFAIK while bearer is still locked */
crv = pri_find_crv(pri, pri_get_crv(pri->pri, e->ring.call, NULL));
-@@ -8423,13 +9170,14 @@
+@@ -8392,13 +9171,14 @@
ast_log(LOG_WARNING, "Call received for busy CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
} else
ast_log(LOG_NOTICE, "Call received for unconfigured CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
pri->pvts[chanpos]->call = e->ring.call;
apply_plan_to_number(plancallingnum, sizeof(plancallingnum), pri, e->ring.callingnum, e->ring.callingplan);
if (pri->pvts[chanpos]->use_callerid) {
-@@ -8454,29 +9202,78 @@
+@@ -8423,29 +9203,78 @@
}
apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
e->ring.redirectingnum, e->ring.callingplanrdnis);
/* Make sure extension exists (or in overlap dial mode, can exist) */
if ((pri->overlapdial && ast_canmatch_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) ||
ast_exists_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
-@@ -8495,22 +9292,38 @@
+@@ -8464,22 +9293,38 @@
res = zt_setlaw(pri->pvts[chanpos]->subs[SUB_REAL].zfd, law);
if (res < 0)
ast_log(LOG_WARNING, "Unable to set law on channel %d\n", pri->pvts[chanpos]->channel);
if (pri->overlapdial && ast_matchmore_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
/* Release the PRI lock while we create the channel */
ast_mutex_unlock(&pri->lock);
-@@ -8518,14 +9331,31 @@
+@@ -8487,14 +9332,31 @@
/* Set bearer and such */
pri_assign_bearer(crv, pri, pri->pvts[chanpos]);
c = zt_new(crv, AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
if(e->ring.ani2 >= 0) {
snprintf(ani2str, 5, "%.2d", e->ring.ani2);
pbx_builtin_setvar_helper(c, "ANI2", ani2str);
-@@ -8545,8 +9375,8 @@
+@@ -8514,8 +9376,8 @@
ast_mutex_lock(&pri->lock);
if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
if (option_verbose > 2)
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
} else {
ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
-@@ -8554,14 +9384,18 @@
+@@ -8523,14 +9385,18 @@
if (c)
ast_hangup(c);
else {
ast_mutex_lock(&pri->lock);
if (c) {
char calledtonstr[10];
-@@ -8582,23 +9416,40 @@
+@@ -8551,23 +9417,40 @@
snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
if (option_verbose > 2)
pri->pvts[chanpos]->call = NULL;
pri->pvts[chanpos]->exten[0] = '\0';
}
-@@ -8606,7 +9457,7 @@
+@@ -8575,7 +9458,7 @@
ast_mutex_unlock(&crv->lock);
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else
break;
case PRI_EVENT_RINGING:
chanpos = pri_find_principle(pri, e->ringing.channel);
-@@ -8624,7 +9475,7 @@
+@@ -8593,7 +9476,7 @@
} else {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
pri->pvts[chanpos]->alerting = 1;
} else
-@@ -8653,9 +9504,15 @@
+@@ -8622,9 +9505,16 @@
}
break;
case PRI_EVENT_PROGRESS:
+ if ((pri->pvts[chanpos]->priindication_oob == 2) && (e->proceeding.cause == PRI_CAUSE_USER_BUSY)) {
+ /* received PROGRESS with cause BUSY, no inband callprogress wanted => hang up! */
+ if (pri->pvts[chanpos]->owner) {
++ pri->pvts[chanpos]->owner->hangupcause = AST_CAUSE_USER_BUSY;
+ pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ }
+ } else {
#ifdef PRI_PROGRESS_MASK
if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
#else
-@@ -8702,6 +9559,12 @@
+@@ -8671,6 +9561,12 @@
case PRI_EVENT_PROCEEDING:
chanpos = pri_find_principle(pri, e->proceeding.channel);
if (chanpos > -1) {
if (!pri->pvts[chanpos]->proceeding) {
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
-@@ -8752,6 +9615,295 @@
+@@ -8721,6 +9617,295 @@
}
}
break;
case PRI_EVENT_ANSWER:
chanpos = pri_find_principle(pri, e->answer.channel);
if (chanpos < 0) {
-@@ -8767,6 +9919,7 @@
+@@ -8736,6 +9921,7 @@
chanpos = -1;
} else {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
/* Now we can do call progress detection */
/* We changed this so it turns on the DSP no matter what... progress or no progress.
-@@ -8796,11 +9949,16 @@
+@@ -8765,11 +9951,16 @@
ast_log(LOG_DEBUG, "Sent deferred digit string: %s\n", pri->pvts[chanpos]->dop.dialstr);
pri->pvts[chanpos]->dop.dialstr[0] = '\0';
} else if (pri->pvts[chanpos]->confirmanswer) {
}
#ifdef SUPPORT_USERUSER
-@@ -8849,23 +10007,32 @@
+@@ -8818,23 +10009,32 @@
}
}
if (option_verbose > 2)
#ifdef SUPPORT_USERUSER
if (!ast_strlen_zero(e->hangup.useruserinfo)) {
-@@ -8875,8 +10042,20 @@
+@@ -8844,8 +10044,20 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
}
}
break;
-@@ -8886,17 +10065,25 @@
+@@ -8855,17 +10067,25 @@
case PRI_EVENT_HANGUP_REQ:
chanpos = pri_find_principle(pri, e->hangup.channel);
if (chanpos < 0) {
pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
switch(e->hangup.cause) {
case PRI_CAUSE_USER_BUSY:
-@@ -8915,20 +10102,87 @@
+@@ -8884,20 +10104,87 @@
}
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup request\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
}
#ifdef SUPPORT_USERUSER
-@@ -8939,9 +10193,36 @@
+@@ -8908,9 +10195,37 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
+ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
+ }
++ pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
+ ast_channel_setwhentohangup(pri->pvts[chanpos]->owner, 5);
+ }
break;
case PRI_EVENT_HANGUP_ACK:
chanpos = pri_find_principle(pri, e->hangup.channel);
-@@ -8955,6 +10236,7 @@
+@@ -8924,6 +10239,7 @@
if (chanpos > -1) {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
pri->pvts[chanpos]->call = NULL;
pri->pvts[chanpos]->resetting = 0;
if (pri->pvts[chanpos]->owner) {
if (option_verbose > 2)
-@@ -8968,7 +10250,9 @@
+@@ -8937,7 +10253,9 @@
#endif
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
break;
case PRI_EVENT_CONFIG_ERR:
-@@ -9060,10 +10344,22 @@
+@@ -9029,10 +10347,22 @@
ast_mutex_lock(&pri->pvts[chanpos]->lock);
switch(e->notify.info) {
case PRI_NOTIFY_REMOTE_HOLD:
f.subclass = AST_CONTROL_UNHOLD;
zap_queue_frame(pri->pvts[chanpos], &f, pri);
break;
-@@ -9071,6 +10367,77 @@
+@@ -9040,6 +10370,77 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
break;
default:
ast_log(LOG_DEBUG, "Event: %d\n", e->e);
}
-@@ -9132,7 +10499,7 @@
+@@ -9101,7 +10502,7 @@
pri->fds[i] = -1;
return -1;
}
/* Force overlap dial if we're doing GR-303! */
if (pri->switchtype == PRI_SWITCH_GR303_TMC)
pri->overlapdial = 1;
-@@ -9201,39 +10568,77 @@
+@@ -9170,39 +10571,77 @@
static int handle_pri_set_debug_file(int fd, int argc, char **argv)
{
}
return RESULT_SUCCESS;
-@@ -9265,6 +10670,7 @@
+@@ -9234,6 +10673,7 @@
static int handle_pri_no_debug(int fd, int argc, char *argv[])
{
int span;
-@@ -9371,36 +10777,6 @@
+@@ -9340,36 +10780,6 @@
return RESULT_SUCCESS;
}
static char pri_debug_help[] =
"Usage: pri debug span <span>\n"
" Enables debugging on a given PRI span\n";
-@@ -9417,6 +10793,18 @@
+@@ -9386,6 +10796,18 @@
"Usage: pri show span <span>\n"
" Displays PRI Information\n";
static struct ast_cli_entry zap_pri_cli[] = {
{ { "pri", "debug", "span", NULL }, handle_pri_debug,
"Enables PRI debugging on a span", pri_debug_help, complete_span_4 },
-@@ -9424,19 +10812,218 @@
+@@ -9393,19 +10815,282 @@
"Disables PRI debugging on a span", pri_no_debug_help, complete_span_5 },
{ { "pri", "intense", "debug", "span", NULL }, handle_pri_really_debug,
"Enables REALLY INTENSE PRI debugging", pri_really_debug_help, complete_span_5 },
+#ifdef ZAPATA_GSM
++static int handle_gsm_debug_helper(int fd, int channel, int debug)
++{
++/* gsm debug channel <channel> */
++ struct zt_pvt *pvt = NULL;
++ if (channel < 1) {
++ ast_cli(fd, "Invalid channel %d. Should be a number.\n", channel);
++ return RESULT_SUCCESS;
++ }
++ pvt = iflist;
++ while (pvt) {
++ if (pvt->channel == channel) {
++ ast_mutex_lock(&pvt->lock);
++ gsm_set_debug(pvt->gsm.modul, debug);
++ ast_mutex_unlock(&pvt->lock);
++ ast_cli(fd, "%s debugging on channel %d\n", debug ? "Enabled":"Disabled", channel);
++ return RESULT_SUCCESS;
++ }
++ pvt = pvt->next;
++ }
++
++ ast_cli(fd, "No GSM running on channel %d\n", channel);
++ return RESULT_SUCCESS;
++}
++
++
++
++static int handle_gsm_debug(int fd, int argc, char *argv[])
++{
++/* gsm debug channel <channel> */
++ int channel;
++ if (argc < 4) {
++ return RESULT_SHOWUSAGE;
++ }
++ channel = atoi(argv[3]);
++ return handle_gsm_debug_helper(fd, channel, GSM_DEBUG_AT);
++}
++
++static int handle_gsm_no_debug(int fd, int argc, char *argv[])
++{
++/* gsm no debug channel <channel> */
++ int channel;
++ if (argc < 5) {
++ return RESULT_SHOWUSAGE;
++ }
++ channel = atoi(argv[4]);
++ return handle_gsm_debug_helper(fd, channel, GSM_DEBUG_NONE);
++}
++
++static char gsm_debug_help[] =
++ "Usage: gsm debug channel <channel>\n"
++ " Enables debugging on a given GSM channel\n";
++
++static char gsm_no_debug_help[] =
++ "Usage: gsm no debug channel <channel>\n"
++ " Disables debugging on a given GSM channel\n";
++
++static struct ast_cli_entry zap_gsm_cli[] = {
++ { { "gsm", "debug", "channel", NULL }, handle_gsm_debug,
++ "Enables GSM debugging on a channel", gsm_debug_help },
++ { { "gsm", "no", "debug", "channel", NULL }, handle_gsm_no_debug,
++ "Disables GSM debugging on a channel", gsm_no_debug_help},
++};
++
++
+
+static char gsm_send_pdu_help[] =
+ "Usage: gsm send pdu <channel> <length> <pdu>\n"
#ifdef ZAPATA_R2
static int handle_r2_no_debug(int fd, int argc, char *argv[])
{
-@@ -10048,6 +11635,13 @@
+@@ -10017,6 +11702,14 @@
pthread_cancel(pris[i].master);
}
ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(zap_pri_cli[0]));
+ ast_unregister_application(zapInband_app);
+#endif
+#ifdef ZAPATA_GSM
++ ast_cli_unregister_multiple(zap_gsm_cli, sizeof(zap_gsm_cli) / sizeof(zap_gsm_cli[0]));
+ ast_cli_unregister(&gsm_send_sms);
+ ast_cli_unregister(&gsm_send_pdu);
+ ast_cli_unregister(&gsm_show_status);
#endif
#ifdef ZAPATA_R2
ast_cli_unregister_multiple(zap_r2_cli, sizeof(zap_r2_cli) / sizeof(zap_r2_cli[0]));
-@@ -10059,6 +11653,7 @@
+@@ -10028,6 +11721,7 @@
ast_manager_unregister( "ZapDNDoff" );
ast_manager_unregister( "ZapDNDon" );
ast_manager_unregister("ZapShowChannels");
ast_channel_unregister(&zap_tech);
if (!ast_mutex_lock(&iflock)) {
/* Hangup all interfaces if they have an owner */
-@@ -10417,8 +12012,8 @@
+@@ -10386,8 +12080,8 @@
}
} else if (!strcasecmp(v->name, "echotraining")) {
if (sscanf(v->value, "%d", &y) == 1) {
} else {
echotraining = y;
}
-@@ -10604,12 +12199,33 @@
+@@ -10573,12 +12267,33 @@
cur_signalling = SIG_GR303FXSKS;
cur_radio = 0;
pritype = PRI_CPE;
} else {
ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
}
-@@ -10692,8 +12308,20 @@
+@@ -10661,8 +12376,20 @@
priindication_oob = 1;
else if (!strcasecmp(v->value, "inband"))
priindication_oob = 0;
+ else if (!strcasecmp(v->value, "passthrough"))
+ priindication_oob = 2;
- else
-- ast_log(LOG_WARNING, "'%s' is not a valid pri indication value, should be 'inband' or 'outofband' at line %d\n",
++ else
+ ast_log(LOG_WARNING, "'%s' is not a valid pri indication value, should be 'inband' , 'outofband' or 'passthrough' at line %d\n",
+ v->value, v->lineno);
+ } else if (!strcasecmp(v->name, "pritransfer")) {
+ pritransfer = 1;
+ else if (!strcasecmp(v->value, "hangup"))
+ pritransfer = 2;
-+ else
+ else
+- ast_log(LOG_WARNING, "'%s' is not a valid pri indication value, should be 'inband' or 'outofband' at line %d\n",
+ ast_log(LOG_WARNING, "'%s' is not a valid pri transfer value, should be 'no' , 'ect' or 'hangup' at line %d\n",
v->value, v->lineno);
} else if (!strcasecmp(v->name, "priexclusive")) {
cur_priexclusive = ast_true(v->value);
-@@ -10707,6 +12335,14 @@
+@@ -10676,6 +12403,14 @@
ast_copy_string(privateprefix, v->value, sizeof(privateprefix));
} else if (!strcasecmp(v->name, "unknownprefix")) {
ast_copy_string(unknownprefix, v->value, sizeof(unknownprefix));
} else if (!strcasecmp(v->name, "resetinterval")) {
if (!strcasecmp(v->value, "never"))
resetinterval = -1;
-@@ -10723,6 +12359,8 @@
+@@ -10692,6 +12427,8 @@
ast_copy_string(idleext, v->value, sizeof(idleext));
} else if (!strcasecmp(v->name, "idledial")) {
ast_copy_string(idledial, v->value, sizeof(idledial));
} else if (!strcasecmp(v->name, "overlapdial")) {
overlapdial = ast_true(v->value);
} else if (!strcasecmp(v->name, "pritimer")) {
-@@ -10908,6 +12546,7 @@
+@@ -10877,6 +12614,7 @@
#ifdef ZAPATA_PRI
if (!reload) {
for (x=0;x<NUM_SPANS;x++) {
if (pris[x].pvts[0]) {
if (start_pri(pris + x)) {
ast_log(LOG_ERROR, "Unable to start D-channel on span %d\n", x + 1);
-@@ -10940,6 +12579,10 @@
+@@ -10909,6 +12647,10 @@
pri_set_error(zt_pri_error);
pri_set_message(zt_pri_message);
#endif
res = setup_zap(0);
/* Make sure we can register our Zap channel type */
if(res) {
-@@ -10957,6 +12600,11 @@
+@@ -10926,6 +12668,12 @@
ast_cli_register_multiple(zap_r2_cli, sizeof(zap_r2_cli) / sizeof(zap_r2_cli[0]));
#endif
ast_cli_register_multiple(zap_cli, sizeof(zap_cli) / sizeof(zap_cli[0]));
+ ast_cli_register(&gsm_send_sms);
+ ast_cli_register(&gsm_send_pdu);
+ ast_cli_register(&gsm_show_status);
++ ast_cli_register_multiple(zap_gsm_cli, sizeof(zap_gsm_cli) / sizeof(zap_gsm_cli[0]));
+#endif
memset(round_robin, 0, sizeof(round_robin));
ast_manager_register( "ZapTransfer", 0, action_transfer, "Transfer Zap Channel" );
-@@ -10965,11 +12613,47 @@
+@@ -10934,11 +12682,47 @@
ast_manager_register( "ZapDNDon", 0, action_zapdndon, "Toggle Zap channel Do Not Disturb status ON" );
ast_manager_register( "ZapDNDoff", 0, action_zapdndoff, "Toggle Zap channel Do Not Disturb status OFF" );
ast_manager_register("ZapShowChannels", 0, action_zapshowchannels, "Show status zapata channels");
{
#define END_SILENCE_LEN 400
#define HEADER_MS 50
-@@ -10988,6 +12672,7 @@
+@@ -10957,6 +12741,7 @@
float scont = 0.0;
int index;
index = zt_get_index(c, p, 0);
if (index < 0) {
ast_log(LOG_WARNING, "Huh? I don't exist?\n");
-diff -urN asterisk-1.2.9.1.orig/codecs/codec_ilbc.c asterisk-1.2.9.1/codecs/codec_ilbc.c
---- asterisk-1.2.9.1.orig/codecs/codec_ilbc.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/codecs/codec_ilbc.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/codecs/codec_ilbc.c asterisk-1.2.10/codecs/codec_ilbc.c
+--- asterisk-1.2.10.orig/codecs/codec_ilbc.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/codecs/codec_ilbc.c 2006-07-31 14:13:08.000000000 +0200
@@ -49,7 +49,7 @@
#include "slin_ilbc_ex.h"
#include "ilbc_slin_ex.h"
#define ILBC_MS 30
/* #define ILBC_MS 20 */
-diff -urN asterisk-1.2.9.1.orig/configs/capi.conf.sample asterisk-1.2.9.1/configs/capi.conf.sample
---- asterisk-1.2.9.1.orig/configs/capi.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/configs/capi.conf.sample 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/configs/capi.conf.sample asterisk-1.2.10/configs/capi.conf.sample
+--- asterisk-1.2.10.orig/configs/capi.conf.sample 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/configs/capi.conf.sample 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,44 @@
+;
+; CAPI config
+;msn=55512
+;controller=2
+;devices => 30
-diff -urN asterisk-1.2.9.1.orig/configs/modules.conf.sample asterisk-1.2.9.1/configs/modules.conf.sample
---- asterisk-1.2.9.1.orig/configs/modules.conf.sample 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/configs/modules.conf.sample 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/configs/modules.conf.sample asterisk-1.2.10/configs/modules.conf.sample
+--- asterisk-1.2.10.orig/configs/modules.conf.sample 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/configs/modules.conf.sample 2006-07-31 14:13:08.000000000 +0200
@@ -51,3 +51,4 @@
; exported to modules loaded after them.
;
[global]
+chan_capi.so=yes
-diff -urN asterisk-1.2.9.1.orig/configs/watchdog.conf.sample asterisk-1.2.9.1/configs/watchdog.conf.sample
---- asterisk-1.2.9.1.orig/configs/watchdog.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/configs/watchdog.conf.sample 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/configs/watchdog.conf.sample asterisk-1.2.10/configs/watchdog.conf.sample
+--- asterisk-1.2.10.orig/configs/watchdog.conf.sample 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/configs/watchdog.conf.sample 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,22 @@
+;
+; Configuration file for res_watchdog
+;device = /dev/watchdog
+;interval = 100
+
-diff -urN asterisk-1.2.9.1.orig/configs/zapata.conf.sample asterisk-1.2.9.1/configs/zapata.conf.sample
---- asterisk-1.2.9.1.orig/configs/zapata.conf.sample 2006-04-28 18:40:32.000000000 +0200
-+++ asterisk-1.2.9.1/configs/zapata.conf.sample 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/configs/zapata.conf.sample asterisk-1.2.10/configs/zapata.conf.sample
+--- asterisk-1.2.10.orig/configs/zapata.conf.sample 2006-04-28 18:40:32.000000000 +0200
++++ asterisk-1.2.10/configs/zapata.conf.sample 2006-07-31 14:13:08.000000000 +0200
@@ -121,9 +121,20 @@
;
; outofband: Signal Busy/Congestion out of band with RELEASE/DISCONNECT
; If you need to override the existing channels selection routine and force all
; PRI channels to be marked as exclusively selected, set this to yes.
; priexclusive = yes
-diff -urN asterisk-1.2.9.1.orig/db.c asterisk-1.2.9.1/db.c
---- asterisk-1.2.9.1.orig/db.c 2006-01-09 19:09:53.000000000 +0100
-+++ asterisk-1.2.9.1/db.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/db.c asterisk-1.2.10/db.c
+--- asterisk-1.2.10.orig/db.c 2006-01-09 19:09:53.000000000 +0100
++++ asterisk-1.2.10/db.c 2006-07-31 14:13:08.000000000 +0200
@@ -516,11 +516,18 @@
struct ast_cli_entry cli_database_deltree =
{ { "database", "deltree", NULL }, database_deltree, "Removes database keytree/values", database_deltree_usage };
+ ast_manager_register("DBdel", EVENT_FLAG_SYSTEM, manager_dbdel, mandescr_dbdel);
return 0;
}
-diff -urN asterisk-1.2.9.1.orig/devicestate.c asterisk-1.2.9.1/devicestate.c
---- asterisk-1.2.9.1.orig/devicestate.c 2006-02-10 21:38:59.000000000 +0100
-+++ asterisk-1.2.9.1/devicestate.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/devicestate.c asterisk-1.2.10/devicestate.c
+--- asterisk-1.2.10.orig/devicestate.c 2006-02-10 21:38:59.000000000 +0100
++++ asterisk-1.2.10/devicestate.c 2006-07-31 14:13:08.000000000 +0200
@@ -62,6 +62,8 @@
struct state_change {
AST_LIST_LOCK(&state_changes);
AST_LIST_INSERT_TAIL(&state_changes, change, list);
if (AST_LIST_FIRST(&state_changes) == change)
-@@ -224,23 +232,49 @@
+@@ -224,11 +232,17 @@
return 1;
}
}
/*--- ast_device_state_changed: Accept change notification, add it to change queue */
- int ast_device_state_changed(const char *fmt, ...)
- {
- char buf[AST_MAX_EXTENSION];
-+ char cid_num[AST_MAX_EXTENSION];
-+ char cid_name[AST_MAX_EXTENSION];
-+ char *s = NULL;
- va_list ap;
-
+@@ -240,7 +254,7 @@
va_start(ap, fmt);
-- vsnprintf(buf, sizeof(buf), fmt, ap);
-+ if (*fmt == 's') {
-+ s = va_arg(ap, char *);
-+ snprintf(buf, sizeof(buf), s);
-+ *fmt++;
-+ if (*fmt == 's') {
-+ s = va_arg(ap, char *);
-+ if (s) {
-+ snprintf(cid_num, sizeof(cid_num), s);
-+ }
-+ *fmt++;
-+ if (*fmt == 's') {
-+ s = va_arg(ap, char *);
-+ if (s) {
-+ snprintf(cid_name, sizeof(cid_name), s);
-+ }
-+ }
-+ }
-+ }
+ vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- return __ast_device_state_changed_literal(buf);
-+ return __ast_device_state_changed_literal(buf, cid_num, cid_name);
++ return __ast_device_state_changed_literal(buf, NULL, NULL);
}
/*--- do_devstate_changes: Go through the dev state change queue and update changes in the dev state thread */
-@@ -255,7 +289,7 @@
+@@ -255,7 +269,7 @@
if (cur) {
/* we got an entry, so unlock the list while we process it */
AST_LIST_UNLOCK(&state_changes);
free(cur);
AST_LIST_LOCK(&state_changes);
} else {
-diff -urN asterisk-1.2.9.1.orig/doc/README.asterisk.conf asterisk-1.2.9.1/doc/README.asterisk.conf
---- asterisk-1.2.9.1.orig/doc/README.asterisk.conf 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/doc/README.asterisk.conf 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/doc/README.asterisk.conf asterisk-1.2.10/doc/README.asterisk.conf
+--- asterisk-1.2.10.orig/doc/README.asterisk.conf 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/doc/README.asterisk.conf 2006-07-31 14:13:08.000000000 +0200
@@ -62,6 +62,7 @@
maxcalls = 255 ; The maximum number of concurrent calls you want to allow
execincludes = yes | no ; Allow #exec entries in configuration files
[files]
; Changing the following lines may compromise your security
-diff -urN asterisk-1.2.9.1.orig/editline/cygdef.h asterisk-1.2.9.1/editline/cygdef.h
---- asterisk-1.2.9.1.orig/editline/cygdef.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/editline/cygdef.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/editline/cygdef.h asterisk-1.2.10/editline/cygdef.h
+--- asterisk-1.2.10.orig/editline/cygdef.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/editline/cygdef.h 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,11 @@
+/* cygdef.h. Generated automatically by configure. */
+#ifndef _CYGDEF_H_
+
+
+#endif /* _CYGDEF_H_ */
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/agi.h asterisk-1.2.9.1/include/asterisk/agi.h
---- asterisk-1.2.9.1.orig/include/asterisk/agi.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/include/asterisk/agi.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/agi.h asterisk-1.2.10/include/asterisk/agi.h
+--- asterisk-1.2.10.orig/include/asterisk/agi.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/include/asterisk/agi.h 2006-07-31 14:13:08.000000000 +0200
@@ -29,7 +29,8 @@
typedef struct agi_state {
int ctrl; /* FD for input control */
} AGI;
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/chan_capi.h asterisk-1.2.9.1/include/asterisk/chan_capi.h
---- asterisk-1.2.9.1.orig/include/asterisk/chan_capi.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/include/asterisk/chan_capi.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/chan_capi.h asterisk-1.2.10/include/asterisk/chan_capi.h
+--- asterisk-1.2.10.orig/include/asterisk/chan_capi.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/include/asterisk/chan_capi.h 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,276 @@
+/*
+ * (CAPI*)
+#define CAPI_ETSI_NPLAN_INTERNAT 0x10
+
+#endif
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/chan_capi_app.h asterisk-1.2.9.1/include/asterisk/chan_capi_app.h
---- asterisk-1.2.9.1.orig/include/asterisk/chan_capi_app.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/include/asterisk/chan_capi_app.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/chan_capi_app.h asterisk-1.2.10/include/asterisk/chan_capi_app.h
+--- asterisk-1.2.10.orig/include/asterisk/chan_capi_app.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/include/asterisk/chan_capi_app.h 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,30 @@
+/*
+ * (CAPI*)
+extern MESSAGE_EXCHANGE_ERROR _capi_put_cmsg(_cmsg *CMSG);
+
+#endif
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/channel.h asterisk-1.2.9.1/include/asterisk/channel.h
---- asterisk-1.2.9.1.orig/include/asterisk/channel.h 2006-06-01 22:27:50.000000000 +0200
-+++ asterisk-1.2.9.1/include/asterisk/channel.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/channel.h asterisk-1.2.10/include/asterisk/channel.h
+--- asterisk-1.2.10.orig/include/asterisk/channel.h 2006-06-01 22:27:50.000000000 +0200
++++ asterisk-1.2.10/include/asterisk/channel.h 2006-07-31 14:13:08.000000000 +0200
@@ -86,6 +86,9 @@
#ifndef _ASTERISK_CHANNEL_H
#define _ASTERISK_CHANNEL_H
/*! Gives the string form of a given cause code */
/*!
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/devicestate.h asterisk-1.2.9.1/include/asterisk/devicestate.h
---- asterisk-1.2.9.1.orig/include/asterisk/devicestate.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/include/asterisk/devicestate.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/devicestate.h asterisk-1.2.10/include/asterisk/devicestate.h
+--- asterisk-1.2.10.orig/include/asterisk/devicestate.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/include/asterisk/devicestate.h 2006-07-31 14:13:08.000000000 +0200
@@ -42,7 +42,7 @@
/*! Device is ringing */
#define AST_DEVICE_RINGING 6
/*! \brief Registers a device state change callback
* \param callback Callback
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/features.h asterisk-1.2.9.1/include/asterisk/features.h
---- asterisk-1.2.9.1.orig/include/asterisk/features.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/include/asterisk/features.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/features.h asterisk-1.2.10/include/asterisk/features.h
+--- asterisk-1.2.10.orig/include/asterisk/features.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/include/asterisk/features.h 2006-07-31 14:13:08.000000000 +0200
@@ -45,6 +45,8 @@
};
+extern struct ast_call_feature *ast_find_builtin_feature(char *name);
+
#endif /* _AST_FEATURES_H */
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/monitor.h asterisk-1.2.9.1/include/asterisk/monitor.h
---- asterisk-1.2.9.1.orig/include/asterisk/monitor.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/include/asterisk/monitor.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/manager.h asterisk-1.2.10/include/asterisk/manager.h
+--- asterisk-1.2.10.orig/include/asterisk/manager.h 2006-02-11 19:15:00.000000000 +0100
++++ asterisk-1.2.10/include/asterisk/manager.h 2006-07-31 14:13:08.000000000 +0200
+@@ -54,6 +54,7 @@
+ #define EVENT_FLAG_COMMAND (1 << 4) /* Ability to read/set commands */
+ #define EVENT_FLAG_AGENT (1 << 5) /* Ability to read/set agent info */
+ #define EVENT_FLAG_USER (1 << 6) /* Ability to read/set user info */
++#define EVENT_FLAG_EXTENSIONSTATUS (1 << 7) /* ExtensionStatus events */
+
+ /* Export manager structures */
+ #define AST_MAX_MANHEADERS 80
+diff -urN asterisk-1.2.10.orig/include/asterisk/monitor.h asterisk-1.2.10/include/asterisk/monitor.h
+--- asterisk-1.2.10.orig/include/asterisk/monitor.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/include/asterisk/monitor.h 2006-07-31 14:13:08.000000000 +0200
@@ -35,6 +35,8 @@
char write_filename[FILENAME_MAX];
char filename_base[FILENAME_MAX];
/* Stop monitoring a channel */
int ast_monitor_stop(struct ast_channel *chan, int need_lock);
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/pbx.h asterisk-1.2.9.1/include/asterisk/pbx.h
---- asterisk-1.2.9.1.orig/include/asterisk/pbx.h 2006-03-29 21:11:18.000000000 +0200
-+++ asterisk-1.2.9.1/include/asterisk/pbx.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/pbx.h asterisk-1.2.10/include/asterisk/pbx.h
+--- asterisk-1.2.10.orig/include/asterisk/pbx.h 2006-03-29 21:11:18.000000000 +0200
++++ asterisk-1.2.10/include/asterisk/pbx.h 2006-07-31 14:13:08.000000000 +0200
@@ -57,7 +57,7 @@
AST_EXTENSION_BUSY = 1 << 1,
/*! All devices UNAVAILABLE/UNREGISTERED */
#if defined(__cplusplus) || defined(c_plusplus)
}
-diff -urN asterisk-1.2.9.1.orig/include/asterisk/xlaw.h asterisk-1.2.9.1/include/asterisk/xlaw.h
---- asterisk-1.2.9.1.orig/include/asterisk/xlaw.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/include/asterisk/xlaw.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk/xlaw.h asterisk-1.2.10/include/asterisk/xlaw.h
+--- asterisk-1.2.10.orig/include/asterisk/xlaw.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/include/asterisk/xlaw.h 2006-07-31 14:13:08.000000000 +0200
@@ -0,0 +1,1665 @@
+#ifndef _ASTERISK_XLAW_H
+#define _ASTERISK_XLAW_H
+#endif // CAPI_ULAW
+#endif
+
-diff -urN asterisk-1.2.9.1.orig/include/asterisk.h asterisk-1.2.9.1/include/asterisk.h
---- asterisk-1.2.9.1.orig/include/asterisk.h 2005-11-30 04:37:37.000000000 +0100
-+++ asterisk-1.2.9.1/include/asterisk.h 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/include/asterisk.h asterisk-1.2.10/include/asterisk.h
+--- asterisk-1.2.10.orig/include/asterisk.h 2005-11-30 04:37:37.000000000 +0100
++++ asterisk-1.2.10/include/asterisk.h 2006-07-31 14:13:08.000000000 +0200
@@ -36,6 +36,7 @@
extern char ast_config_AST_PID[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_SOCKET[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_CTL_PERMISSIONS[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_CTL_OWNER[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_CTL_GROUP[AST_CONFIG_MAX_PATH];
-diff -urN asterisk-1.2.9.1.orig/manager.c asterisk-1.2.9.1/manager.c
---- asterisk-1.2.9.1.orig/manager.c 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.9.1/manager.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/manager.c asterisk-1.2.10/manager.c
+--- asterisk-1.2.10.orig/manager.c 2006-02-11 19:15:00.000000000 +0100
++++ asterisk-1.2.10/manager.c 2006-07-31 14:13:08.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
struct ast_variable *vars;
};
-@@ -657,11 +663,17 @@
+@@ -99,6 +105,7 @@
+ { EVENT_FLAG_COMMAND, "command" },
+ { EVENT_FLAG_AGENT, "agent" },
+ { EVENT_FLAG_USER, "user" },
++ { EVENT_FLAG_EXTENSIONSTATUS, "extensionstatus" },
+ { -1, "all" },
+ { 0, "none" },
+ };
+@@ -657,11 +664,17 @@
{
struct ast_channel *c = NULL;
char *name = astman_get_header(m, "Channel");
if (!c) {
astman_send_error(s, m, "No such channel");
return 0;
-@@ -760,6 +772,7 @@
+@@ -760,6 +773,7 @@
}
/*! \brief action_status: Manager "status" command to show channels */
/* Needs documentation... */
static int action_status(struct mansession *s, struct message *m)
-@@ -866,32 +879,50 @@
+@@ -866,32 +880,50 @@
char *exten = astman_get_header(m, "Exten");
char *context = astman_get_header(m, "Context");
char *priority = astman_get_header(m, "Priority");
else
res = -1;
if (!res)
-@@ -937,15 +968,15 @@
+@@ -937,15 +969,15 @@
struct ast_channel *chan = NULL;
if (!ast_strlen_zero(in->app)) {
}
if (!res)
manager_event(EVENT_FLAG_CALL,
-@@ -956,7 +987,7 @@
+@@ -956,7 +988,7 @@
"Exten: %s\r\n"
"Reason: %d\r\n"
"Uniqueid: %s\r\n",
else
manager_event(EVENT_FLAG_CALL,
"OriginateFailure",
-@@ -966,7 +997,7 @@
+@@ -966,7 +998,7 @@
"Exten: %s\r\n"
"Reason: %d\r\n"
"Uniqueid: %s\r\n",
/* Locked by ast_pbx_outgoing_exten or ast_pbx_outgoing_app */
if (chan)
-@@ -999,6 +1030,7 @@
+@@ -999,6 +1031,7 @@
char *priority = astman_get_header(m, "Priority");
char *timeout = astman_get_header(m, "Timeout");
char *callerid = astman_get_header(m, "CallerID");
char *account = astman_get_header(m, "Account");
char *app = astman_get_header(m, "Application");
char *appdata = astman_get_header(m, "Data");
-@@ -1007,12 +1039,15 @@
+@@ -1007,12 +1040,15 @@
struct ast_variable *vars = astman_get_variables(m);
char *tech, *data;
char *l=NULL, *n=NULL;
pthread_t th;
pthread_attr_t attr;
-@@ -1028,6 +1063,10 @@
+@@ -1028,6 +1064,10 @@
astman_send_error(s, m, "Invalid timeout\n");
return 0;
}
ast_copy_string(tmp, name, sizeof(tmp));
tech = tmp;
data = strchr(tmp, '/');
-@@ -1048,6 +1087,7 @@
+@@ -1048,6 +1088,7 @@
if (ast_strlen_zero(l))
l = NULL;
}
if (ast_true(async)) {
struct fast_originate_helper *fast = malloc(sizeof(struct fast_originate_helper));
if (!fast) {
-@@ -1068,8 +1108,10 @@
+@@ -1068,8 +1109,10 @@
ast_copy_string(fast->context, context, sizeof(fast->context));
ast_copy_string(fast->exten, exten, sizeof(fast->exten));
ast_copy_string(fast->account, account, sizeof(fast->account));
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (ast_pthread_create(&th, &attr, fast_originate, fast)) {
-@@ -1079,19 +1121,28 @@
+@@ -1079,19 +1122,28 @@
}
}
} else if (!ast_strlen_zero(app)) {
return 0;
}
-@@ -1565,10 +1616,10 @@
+@@ -1565,10 +1617,12 @@
return 0;
}
-static int manager_state_cb(char *context, char *exten, int state, void *data)
+static int manager_state_cb(char *context, char *exten, int state, void *data, char *cid_num, char *cid_name)
{
++ char hint[256] = "";
++ ast_get_hint(hint, sizeof(hint) - 1, NULL, 0, NULL, context, exten);
/* Notify managers of change */
- manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nStatus: %d\r\n", exten, context, state);
-+ manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nStatus: %d\r\nCallerID: \"%s\" <%s>\r\n", exten, context, state, cid_num, cid_name);
++ manager_event(EVENT_FLAG_EXTENSIONSTATUS, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nStatus: %d\r\nCallerID: \"%s\" <%s>\r\nHint: %s\r\n", exten, context, state, cid_num, cid_name, hint);
return 0;
}
-diff -urN asterisk-1.2.9.1.orig/pbx/pbx_spool.c asterisk-1.2.9.1/pbx/pbx_spool.c
---- asterisk-1.2.9.1.orig/pbx/pbx_spool.c 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.9.1/pbx/pbx_spool.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/pbx/pbx_spool.c asterisk-1.2.10/pbx/pbx_spool.c
+--- asterisk-1.2.10.orig/pbx/pbx_spool.c 2006-02-11 19:15:00.000000000 +0100
++++ asterisk-1.2.10/pbx/pbx_spool.c 2006-07-31 14:13:08.000000000 +0200
@@ -259,11 +259,11 @@
if (!ast_strlen_zero(o->app)) {
if (option_verbose > 2)
}
if (res) {
ast_log(LOG_NOTICE, "Call failed to go through, reason %d\n", reason);
-diff -urN asterisk-1.2.9.1.orig/pbx.c asterisk-1.2.9.1/pbx.c
---- asterisk-1.2.9.1.orig/pbx.c 2006-05-23 19:15:23.000000000 +0200
-+++ asterisk-1.2.9.1/pbx.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/pbx.c asterisk-1.2.10/pbx.c
+--- asterisk-1.2.10.orig/pbx.c 2006-06-18 23:03:58.000000000 +0200
++++ asterisk-1.2.10/pbx.c 2006-07-31 14:13:08.000000000 +0200
@@ -353,7 +353,8 @@
{ "Hangup", pbx_builtin_hangup,
free(cbprev);
}
list->callbacks = NULL;
-@@ -3778,7 +3779,7 @@
+@@ -3777,7 +3778,7 @@
while (thiscb) {
prevcb = thiscb;
thiscb = thiscb->next;
free(prevcb);
}
} else {
-@@ -4980,7 +4981,7 @@
+@@ -4981,7 +4982,7 @@
return 0; /* success */
}
{
struct ast_channel *chan;
struct async_stat *as;
-@@ -4990,7 +4991,7 @@
+@@ -4991,7 +4992,7 @@
if (sync) {
LOAD_OH(oh);
if (channel) {
*channel = chan;
if (chan)
-@@ -5092,7 +5093,7 @@
+@@ -5093,7 +5094,7 @@
goto outgoing_exten_cleanup;
}
memset(as, 0, sizeof(struct async_stat));
if (channel) {
*channel = chan;
if (chan)
-@@ -5138,7 +5139,7 @@
+@@ -5139,7 +5140,7 @@
pthread_t t;
};
{
struct app_tmp *tmp = data;
struct ast_app *app;
-@@ -5154,7 +5155,7 @@
+@@ -5155,7 +5156,7 @@
return NULL;
}
{
struct ast_channel *chan;
struct async_stat *as;
-@@ -5174,7 +5175,7 @@
+@@ -5175,7 +5176,7 @@
goto outgoing_app_cleanup;
}
if (sync) {
if (chan) {
if (chan->cdr) { /* check if the channel already has a cdr record, if not give it one */
ast_log(LOG_WARNING, "%s already has a call record??\n", chan->name);
-@@ -5261,7 +5262,8 @@
+@@ -5262,7 +5263,8 @@
goto outgoing_app_cleanup;
}
memset(as, 0, sizeof(struct async_stat));
if (!chan) {
free(as);
res = -1;
-@@ -5548,6 +5550,9 @@
+@@ -5551,6 +5553,9 @@
*/
static int pbx_builtin_hangup(struct ast_channel *chan, void *data)
{
/* Just return non-zero and it will hang up */
if (!chan->hangupcause)
chan->hangupcause = AST_CAUSE_NORMAL_CLEARING;
-@@ -6204,6 +6209,9 @@
+@@ -6207,6 +6212,9 @@
return -1;
}
}
return res = ast_say_number(chan, atoi((char *) tmp), "", chan->language, options);
}
-@@ -6211,8 +6219,12 @@
+@@ -6214,8 +6222,12 @@
{
int res = 0;
return res;
}
-@@ -6220,8 +6232,12 @@
+@@ -6223,8 +6235,12 @@
{
int res = 0;
return res;
}
-@@ -6229,8 +6245,12 @@
+@@ -6232,8 +6248,12 @@
{
int res = 0;
return res;
}
-diff -urN asterisk-1.2.9.1.orig/res/Makefile asterisk-1.2.9.1/res/Makefile
---- asterisk-1.2.9.1.orig/res/Makefile 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.9.1/res/Makefile 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/res/Makefile asterisk-1.2.10/res/Makefile
+--- asterisk-1.2.10.orig/res/Makefile 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.10/res/Makefile 2006-07-31 14:13:08.000000000 +0200
@@ -11,7 +11,7 @@
# the GNU General Public License
#
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
ifneq (${OSARCH},FreeBSD)
-diff -urN asterisk-1.2.9.1.orig/res/res_agi.c asterisk-1.2.9.1/res/res_agi.c
---- asterisk-1.2.9.1.orig/res/res_agi.c 2006-06-01 01:50:00.000000000 +0200
-+++ asterisk-1.2.9.1/res/res_agi.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/res/res_agi.c asterisk-1.2.10/res/res_agi.c
+--- asterisk-1.2.10.orig/res/res_agi.c 2006-07-12 15:54:10.000000000 +0200
++++ asterisk-1.2.10/res/res_agi.c 2006-07-31 14:13:08.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
pid = fork();
if (pid < 0) {
ast_log(LOG_WARNING, "Failed to fork(): %s\n", strerror(errno));
-@@ -290,15 +326,19 @@
+@@ -293,15 +329,19 @@
} else {
close(STDERR_FILENO + 1);
}
+ for (x=STDERR_FILENO + 3;x<1024;x++)
close(x);
- /* Don't run AGI scripts with realtime priority -- it causes audio stutter */
+ /* Execute script */
@@ -317,6 +357,9 @@
if (efd) {
*efd = audio[1];
if (res == 2) /* New command */
return RESULT_SUCCESS;
else if (res == 1)
-@@ -1860,7 +1906,12 @@
+@@ -1854,7 +1900,12 @@
int ms;
int returnstatus = 0;
struct ast_frame *f;
FILE *readf;
/* how many times we'll retry if ast_waitfor_nandfs will return without either
channel or file descriptor in case select is interrupted by a system call (EINTR) */
-@@ -1874,10 +1925,22 @@
+@@ -1868,10 +1919,22 @@
return -1;
}
setlinebuf(readf);
if (c) {
retry = RETRY;
/* Idle the channel until we get a command */
-@@ -1888,13 +1951,24 @@
+@@ -1882,13 +1945,24 @@
break;
} else {
/* If it's voice, write it to the audio pipe */
retry = RETRY;
if (!fgets(buf, sizeof(buf), readf)) {
/* Program terminated */
-@@ -1916,6 +1990,7 @@
+@@ -1910,6 +1984,7 @@
if ((returnstatus < 0) || (returnstatus == AST_PBX_KEEPALIVE)) {
break;
}
} else {
if (--retry <= 0) {
ast_log(LOG_WARNING, "No channel, no fd?\n");
-@@ -2022,6 +2097,7 @@
+@@ -2016,6 +2091,7 @@
int argc = 0;
int fds[2];
int efd = -1;
int pid;
char *stringp;
AGI agi;
-@@ -2047,15 +2123,18 @@
+@@ -2041,15 +2117,18 @@
}
}
#endif
}
LOCAL_USER_REMOVE(u);
return res;
-@@ -2089,6 +2168,35 @@
+@@ -2083,6 +2162,35 @@
return res;
}
static int deadagi_exec(struct ast_channel *chan, void *data)
{
return agi_exec_full(chan, data, 0, 1);
-@@ -2118,6 +2226,7 @@
+@@ -2112,6 +2220,7 @@
ast_cli_unregister(&dumpagihtml);
ast_cli_unregister(&cli_debug);
ast_cli_unregister(&cli_no_debug);
ast_unregister_application(eapp);
ast_unregister_application(deadapp);
return ast_unregister_application(app);
-@@ -2131,6 +2240,7 @@
+@@ -2125,6 +2234,7 @@
ast_cli_register(&cli_no_debug);
ast_register_application(deadapp, deadagi_exec, deadsynopsis, descrip);
ast_register_application(eapp, eagi_exec, esynopsis, descrip);
return ast_register_application(app, agi_exec, synopsis, descrip);
}
-diff -urN asterisk-1.2.9.1.orig/res/res_features.c asterisk-1.2.9.1/res/res_features.c
---- asterisk-1.2.9.1.orig/res/res_features.c 2006-05-23 19:15:23.000000000 +0200
-+++ asterisk-1.2.9.1/res/res_features.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/res/res_features.c asterisk-1.2.10/res/res_features.c
+--- asterisk-1.2.10.orig/res/res_features.c 2006-05-23 19:15:23.000000000 +0200
++++ asterisk-1.2.10/res/res_features.c 2006-08-02 09:55:40.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
);
/* There's a problem, hang them up*/
-@@ -1683,6 +1763,280 @@
+@@ -1683,6 +1763,282 @@
return res;
}
+ tms = (tv.tv_sec - pu->start.tv_sec) * 1000 + (tv.tv_usec - pu->start.tv_usec) / 1000;
+ for (x=0;x<AST_MAX_FDS;x++) {
+ if ((pu->chan->fds[x] > -1) && (FD_ISSET(pu->chan->fds[x], &rfds) || FD_ISSET(pu->chan->fds[x], &efds))) {
-+ /* if (FD_ISSET(pu->chan->fds[x], &efds))
-+ pu->chan->exception = 1; */
++ if (FD_ISSET(pu->chan->fds[x], &efds))
++ ast_set_flag(pu->chan, AST_FLAG_EXCEPTION);
++ else
++ ast_clear_flag(pu->chan, AST_FLAG_EXCEPTION);
+ pu->chan->fdno = x;
+ /* See if they need servicing */
+ f = ast_read(pu->chan);
static int park_exec(struct ast_channel *chan, void *data)
{
int res=0;
-@@ -1731,9 +2085,10 @@
+@@ -1731,9 +2087,10 @@
"From: %s\r\n"
"CallerID: %s\r\n"
"CallerIDName: %s\r\n"
);
free(pu);
-@@ -1901,12 +2256,13 @@
+@@ -1901,12 +2258,13 @@
"Timeout: %ld\r\n"
"CallerID: %s\r\n"
"CallerIDName: %s\r\n"
,idText);
cur = cur->next;
-@@ -1922,6 +2278,386 @@
+@@ -1922,6 +2280,416 @@
return RESULT_SUCCESS;
}
+ return 0;
+}
+
++static void autoanswer_reregister_extensions(void)
++{
++ struct aauser *cur;
++ struct ast_context *con;
++ char exten[AST_MAX_EXTENSION];
++ char args[AST_MAX_EXTENSION];
++
++ ast_mutex_lock(&autoanswer_lock);
++
++ cur=aalot;
++ while(cur) {
++ con = ast_context_find(cur->context);
++ if (!con) {
++ con = ast_context_create(NULL,cur->context, registrar);
++ if (!con) {
++ ast_log(LOG_ERROR, "Context '%s' does not exist and unable to create\n", cur->context);
++ }
++ }
++ if (con) {
++ snprintf(exten, sizeof(exten), "%s", cur->exten);
++ snprintf(args, sizeof(args), "%s|%s", cur->context, cur->exten);
++ ast_add_extension2(con, 1, exten, 1, NULL, NULL, autoanswer, strdup((char *)args), free, registrar);
++ }
++ cur = cur->next;
++ }
++
++ ast_mutex_unlock(&autoanswer_lock);
++}
+static void *do_autoanswer_thread(void *ignore)
+{
+ int ms, tms, max;
+ tms = (tv.tv_sec - pu->start.tv_sec) * 1000 + (tv.tv_usec - pu->start.tv_usec) / 1000;
+ for (x=0;x<AST_MAX_FDS;x++) {
+ if ((pu->chan->fds[x] > -1) && (FD_ISSET(pu->chan->fds[x], &rfds) || FD_ISSET(pu->chan->fds[x], &efds))) {
-+/* if (FD_ISSET(pu->chan->fds[x], &efds))
-+ pu->chan->exception = 1; */
++ if (FD_ISSET(pu->chan->fds[x], &efds))
++ ast_set_flag(pu->chan, AST_FLAG_EXCEPTION);
++ else
++ ast_clear_flag(pu->chan, AST_FLAG_EXCEPTION);
+ pu->chan->fdno = x;
+ /* See if they need servicing */
+ f = ast_read(pu->chan);
int ast_pickup_call(struct ast_channel *chan)
{
-@@ -2076,7 +2812,7 @@
+@@ -2076,7 +2844,7 @@
}
{
int mallocd=0;
if (!feature) {
-@@ -2151,14 +2887,22 @@
+@@ -2138,6 +2906,7 @@
+ }
+
+ int reload(void) {
++ autoanswer_reregister_extensions();
+ return load_config();
+ }
+
+@@ -2151,14 +2920,22 @@
if ((res = load_config()))
return res;
ast_cli_register(&showparked);
return res;
}
-@@ -2169,7 +2913,11 @@
+@@ -2169,7 +2946,11 @@
ast_manager_unregister("ParkedCalls");
ast_cli_unregister(&showfeatures);
ast_unregister_application(parkcall);
return ast_unregister_application(parkedcall);
}
-diff -urN asterisk-1.2.9.1.orig/res/res_monitor.c asterisk-1.2.9.1/res/res_monitor.c
---- asterisk-1.2.9.1.orig/res/res_monitor.c 2006-03-02 20:05:40.000000000 +0100
-+++ asterisk-1.2.9.1/res/res_monitor.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/res/res_monitor.c asterisk-1.2.10/res/res_monitor.c
+--- asterisk-1.2.10.orig/res/res_monitor.c 2006-03-02 20:05:40.000000000 +0100
++++ asterisk-1.2.10/res/res_monitor.c 2006-07-31 14:13:08.000000000 +0200
@@ -90,7 +90,7 @@
/* Start monitoring a channel */
res = ast_monitor_stop(c, 1);
ast_mutex_unlock(&c->lock);
if (res) {
-diff -urN asterisk-1.2.9.1.orig/res/res_watchdog.c asterisk-1.2.9.1/res/res_watchdog.c
---- asterisk-1.2.9.1.orig/res/res_watchdog.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.9.1/res/res_watchdog.c 2006-06-09 10:25:04.000000000 +0200
+diff -urN asterisk-1.2.10.orig/res/res_watchdog.c asterisk-1.2.10/res/res_watchdog.c
+--- asterisk-1.2.10.orig/res/res_watchdog.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.10/res/res_watchdog.c 2006-08-10 14:07:14.000000000 +0200
@@ -0,0 +1,149 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ while(cat) {
+ cat = ast_category_browse(cfg, cat);
+ utype = ast_variable_retrieve(cfg, cat, "type");
-+ if (utype) {
++/* if (utype) {
+ ast_log(LOG_NOTICE, "type = %s\n", utype);
-+ }
++ } */
+ udevice = ast_variable_retrieve(cfg, cat, "device");
-+ if (udevice) {
++/* if (udevice) {
+ ast_log(LOG_NOTICE, "device = %s\n", udevice);
-+ }
++ } */
+ uinterval = ast_variable_retrieve(cfg, cat, "interval");
-+ if (uinterval) {
++/* if (uinterval) {
+ ast_log(LOG_NOTICE, "interval = %s\n", uinterval);
-+ }
++ } */
+ if (uinterval && udevice && utype) {
+ woof = malloc(sizeof(struct watchdog_pvt));
+ if (!woof) {
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.9.1.orig/rtp.c asterisk-1.2.9.1/rtp.c
---- asterisk-1.2.9.1.orig/rtp.c 2006-06-01 00:26:38.000000000 +0200
-+++ asterisk-1.2.9.1/rtp.c 2006-06-09 10:25:04.000000000 +0200
-@@ -444,6 +444,11 @@
+diff -urN asterisk-1.2.10.orig/rtp.c asterisk-1.2.10/rtp.c
+--- asterisk-1.2.10.orig/rtp.c 2006-07-13 20:44:17.000000000 +0200
++++ asterisk-1.2.10/rtp.c 2006-07-31 14:16:56.000000000 +0200
+@@ -445,6 +445,11 @@
struct rtpPayloadType rtpPT;
len = sizeof(sin);
diff -urN libpri-1.2.3.orig/Makefile libpri-1.2.3/Makefile
--- libpri-1.2.3.orig/Makefile 2006-04-30 17:17:47.000000000 +0200
-+++ libpri-1.2.3/Makefile 2006-06-09 10:18:25.000000000 +0200
-@@ -27,6 +27,9 @@
++++ libpri-1.2.3/Makefile 2006-07-27 17:45:09.000000000 +0200
+@@ -27,6 +27,13 @@
# Uncomment if you want libpri to count number of Q921/Q931 sent/received
#LIBPRI_COUNTERS=-DLIBPRI_COUNTERS
+# Uncomment if you want libpri to always keep layer 2 up
+#LAYER2ALWAYSUP=-DLAYER2ALWAYSUP
++
++# Uncomment if you want libpri to hangup a call to an NT (p2mp) port if one
++# device sends a RELEASE COMPLETE with cause 17
++#FASTBUSYONBUSY=-DFASTBUSYONBUSY
+
CC=gcc
OSARCH=$(shell uname -s)
-@@ -38,7 +41,7 @@
+@@ -38,7 +45,7 @@
DYNAMIC_LIBRARY=libpri.so.1.0
STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
-+CFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS) $(LAYER2ALWAYSUP) -DRELAX_TRB
++CFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS) $(LAYER2ALWAYSUP) $(FASTBUSYONBUSY) -DRELAX_TRB
INSTALL_PREFIX=$(DESTDIR)
INSTALL_BASE=/usr
SOFLAGS = -Wl,-hlibpri.so.1.0
+-- more facilities
diff -urN libpri-1.2.3.orig/libpri.h libpri-1.2.3/libpri.h
--- libpri-1.2.3.orig/libpri.h 2006-04-27 18:08:39.000000000 +0200
-+++ libpri-1.2.3/libpri.h 2006-06-06 14:28:32.000000000 +0200
++++ libpri-1.2.3/libpri.h 2006-07-11 11:34:59.000000000 +0200
@@ -5,6 +5,8 @@
*
* Copyright (C) 2001, Linux Support Services, Inc.
/* Simple states */
#define PRI_STATE_DOWN 0
-@@ -250,11 +262,13 @@
+@@ -250,11 +262,17 @@
#define PRI_NSF_ATT_MULTIQUEST 0xF0
#define PRI_NSF_CALL_REDIRECTION_SERVICE 0xF7
++#ifdef RELAX_TRB
++#define PRI_RELAX_TRB
++#endif
++
+typedef struct q921_call q921_call;
typedef struct q931_call q931_call;
} pri_event_generic;
typedef struct pri_event_error {
-@@ -273,18 +287,19 @@
+@@ -273,18 +291,19 @@
int cref;
int progress;
int progressmask;
} pri_event_answer;
typedef struct pri_event_facname {
-@@ -302,32 +317,37 @@
+@@ -302,32 +321,37 @@
int e;
int channel; /* Channel requested */
int callingpres; /* Presentation of Calling CallerID */
} pri_event_ring;
typedef struct pri_event_hangup {
-@@ -335,6 +355,8 @@
+@@ -335,6 +359,8 @@
int channel; /* Channel requested */
int cause;
int cref;
q931_call *call; /* Opaque call pointer */
long aoc_units; /* Advise of Charge number of charged units */
char useruserinfo[260]; /* User->User info */
-@@ -375,20 +397,80 @@
+@@ -375,20 +401,80 @@
char digits[64];
} pri_event_keypad_digit;
pri_event_keypad_digit digit; /* Digits that come during a call */
} pri_event;
-@@ -403,7 +485,9 @@
+@@ -403,7 +489,9 @@
channel operating in HDLC mode with FCS computed by the fd's driver. Also it
must be NON-BLOCKING! Frames received on the fd should include FCS. Nodetype
must be one of PRI_NETWORK or PRI_CPE. switchtype should be PRI_SWITCH_* */
/* Create D-channel just as above with user defined I/O callbacks and data */
extern struct pri *pri_new_cb(int fd, int nodetype, int switchtype, pri_io_cb io_read, pri_io_cb io_write, void *userdata);
-@@ -427,6 +511,9 @@
+@@ -427,6 +515,9 @@
/* Enable transmission support of Facility IEs on the pri */
extern void pri_facility_enable(struct pri *pri);
/* Run PRI on the given D-channel, taking care of any events that
need to be handled. If block is set, it will block until an event
occurs which needs to be handled */
-@@ -463,6 +550,12 @@
+@@ -463,6 +554,12 @@
/* Send a digit in overlap mode */
extern int pri_information(struct pri *pri, q931_call *call, char digit);
/* Answer the incomplete(call without called number) call on the given channel.
Set non-isdn to non-zero if you are not connecting to ISDN equipment */
extern int pri_need_more_info(struct pri *pri, q931_call *call, int channel, int nonisdn);
-@@ -471,6 +564,35 @@
+@@ -471,6 +568,35 @@
Set non-isdn to non-zero if you are not connecting to ISDN equipment */
extern int pri_answer(struct pri *pri, q931_call *call, int channel, int nonisdn);
/* Set CRV reference for GR-303 calls */
-@@ -479,14 +601,14 @@
+@@ -479,14 +605,14 @@
/* backwards compatibility for those who don't use asterisk with libpri */
#define pri_release(a,b,c) \
#define PRI_DESTROYCALL
extern void pri_destroycall(struct pri *pri, q931_call *call);
-@@ -519,14 +641,13 @@
+@@ -519,14 +645,13 @@
extern void pri_sr_free(struct pri_sr *sr);
extern int pri_sr_set_channel(struct pri_sr *sr, int channel, int exclusive, int nonisdn);
extern void pri_call_set_useruser(q931_call *sr, char *userchars);
extern int pri_setup(struct pri *pri, q931_call *call, struct pri_sr *req);
-@@ -547,8 +668,8 @@
+@@ -547,8 +672,8 @@
/* Override message and error stuff */
#define PRI_NEW_SET_API
#define PRI_SET_OVERLAPDIAL
diff -urN libpri-1.2.3.orig/pri.c libpri-1.2.3/pri.c
--- libpri-1.2.3.orig/pri.c 2005-11-29 19:39:18.000000000 +0100
-+++ libpri-1.2.3/pri.c 2006-06-09 10:17:29.000000000 +0200
++++ libpri-1.2.3/pri.c 2006-07-11 12:39:20.000000000 +0200
@@ -1,24 +1,14 @@
/*
* libpri: An implementation of Primary Rate ISDN
return 0;
}
-@@ -851,3 +979,12 @@
+@@ -851,3 +979,14 @@
sr->redirectingreason = reason;
return 0;
}
+void pri_shutdown(struct pri *pri)
+{
+#ifndef LAYER2ALWAYSUP
++#ifndef RELAX_TRB
+ if ((pri->localtype == BRI_NETWORK) || (pri->localtype == BRI_CPE) || (pri->localtype == BRI_CPE_PTMP)) {
+ q921_reset(pri, pri->tei, 1);
+ }
+#endif
++#endif
+}
diff -urN libpri-1.2.3.orig/pri_facility.c libpri-1.2.3/pri_facility.c
--- libpri-1.2.3.orig/pri_facility.c 2006-02-14 00:06:02.000000000 +0100
}
diff -urN libpri-1.2.3.orig/q921.c libpri-1.2.3/q921.c
--- libpri-1.2.3.orig/q921.c 2005-12-06 22:35:50.000000000 +0100
-+++ libpri-1.2.3/q921.c 2006-06-15 14:55:46.000000000 +0200
++++ libpri-1.2.3/q921.c 2006-08-01 09:55:53.000000000 +0200
@@ -1,10 +1,12 @@
/*
* libpri: An implementation of Primary Rate ISDN
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-@@ -50,19 +52,23 @@
+@@ -50,19 +52,24 @@
(hf).h.tei = (pri)->tei; \
} while(0)
-static void reschedule_t203(struct pri *pri);
+static void reschedule_t203(struct pri *pri, int tei);
+static void q921_flush_txqueue(struct pri *pri, int tei, int devnull);
++static void q921_send_teiverify(struct pri *pri,int tei);
-static void q921_discard_retransmissions(struct pri *pri)
+static void q921_discard_retransmissions(struct pri *pri, int tei)
}
static int q921_transmit(struct pri *pri, q921_h *h, int len)
-@@ -88,11 +94,15 @@
+@@ -88,11 +95,15 @@
pri_error(pri, "Short write: %d/%d (%s)\n", res, len + 2, strerror(errno));
return -1;
}
{
q921_h h;
Q921_INIT(pri, h);
-@@ -100,6 +110,7 @@
+@@ -100,6 +111,7 @@
h.u.m2 = 0; /* M2 = 0 */
h.u.p_f = pfbit; /* Final bit on */
h.u.ft = Q921_FRAMETYPE_U;
switch(pri->localtype) {
case PRI_NETWORK:
h.h.c_r = 0;
-@@ -107,6 +118,19 @@
+@@ -107,6 +119,19 @@
case PRI_CPE:
h.h.c_r = 1;
break;
default:
pri_error(pri, "Don't know how to U/A on a type %d node\n", pri->localtype);
return;
-@@ -116,18 +140,359 @@
+@@ -116,18 +141,364 @@
q921_transmit(pri, &h, 3);
}
+ pri->ev.gen.e = PRI_EVENT_DCHAN_DOWN;
+ pri->ev.gen.tei = 0;
+ pri->sabme_retrans[0] = 0;
-+ /* dont try again, they are gone */
++ q921_send_teiverify(pri, 127);
++#ifdef RELAX_TRB
++ pri->t202_timer[0] = pri_schedule_event(pri, pri->timers[PRI_TIMER_T202] + 3000, q921_send_teireq, pri);
++#endif
+ return;
+ }
+
+ pri->ev.gen.e = PRI_EVENT_DCHAN_DOWN;
+ pri->ev.gen.tei = tei;
+ pri->sabme_retrans[teio] = 0;
-+ /* dont try again, they are gone */
++#ifdef RELAX_TRB
++ pri->sabme_timer[teio] = pri_schedule_event2(pri, pri->timers[PRI_TIMER_T200] + 3000, q921_send_sabme_now, pri, tei);
++#endif
+ return;
+ }
Q921_INIT(pri, h);
h.u.m3 = 3; /* M3 = 3 */
h.u.m2 = 3; /* M2 = 3 */
h.u.p_f = 1; /* Poll bit set */
-@@ -139,25 +504,42 @@
+@@ -139,25 +510,42 @@
case PRI_CPE:
h.h.c_r = 0;
break;
while(f) {
if (f->h.n_s == num) {
/* Cancel each packet as necessary */
-@@ -165,26 +547,26 @@
+@@ -165,26 +553,26 @@
if (prev)
prev->next = f->next;
else
q921_transmit(pri, (q921_h *)(&f->h), f->len);
break;
}
-@@ -198,77 +580,136 @@
+@@ -198,77 +586,136 @@
return 0;
}
h.s.p_f = pf;
switch(pri->localtype) {
case PRI_NETWORK:
-@@ -277,23 +718,38 @@
+@@ -277,23 +724,38 @@
case PRI_CPE:
h.h.c_r = 1;
break;
h.s.p_f = pbit; /* Poll/Final set appropriately */
switch(pri->localtype) {
case PRI_NETWORK:
-@@ -308,81 +764,192 @@
+@@ -308,81 +770,192 @@
else
h.h.c_r = 1;
break;
f = malloc(sizeof(q921_frame) + len + 2);
if (f) {
memset(f,0,sizeof(q921_frame) + len + 2);
-@@ -400,47 +967,80 @@
+@@ -400,47 +973,80 @@
else
f->h.h.c_r = 1;
break;
} else {
pri_error(pri, "!! Out of memory for Q.921 transmit\n");
-@@ -449,49 +1049,86 @@
+@@ -449,49 +1055,86 @@
return 0;
}
if (res == -1) {
return NULL;
}
-@@ -500,10 +1137,10 @@
+@@ -500,10 +1143,10 @@
} else {
/* If we haven't already sent a reject, send it now, otherwise
we are obliged to RR */
}
return NULL;
}
-@@ -641,75 +1278,152 @@
+@@ -641,75 +1284,158 @@
};
}
+ if (pri->t202_timer[teio]) {
+ pri_schedule_del(pri, pri->t202_timer[teio]);
+ pri->t202_timer[teio] = 0;
++ }
++
++/* neonova test */
++ if (pri->t203_timer[teio]) {
++ pri_schedule_del(pri, pri->t203_timer[teio]);
++ pri->t203_timer[teio] = 0;
+ }
/* Reset any rejects */
return NULL;
}
/* Informational frame */
-@@ -720,8 +1434,10 @@
+@@ -720,8 +1446,10 @@
return q921_handle_iframe(pri, &h->i, len);
break;
case 1:
return NULL;
}
if (len < 4) {
-@@ -731,80 +1447,128 @@
+@@ -731,80 +1459,128 @@
switch(h->s.ss) {
case 0:
/* Receiver Ready */
}
break;
case 3:
-@@ -821,8 +1585,16 @@
+@@ -821,8 +1597,16 @@
if (pri->debug & PRI_DEBUG_Q921_STATE)
pri_message(pri, "-- Got DM Mode from peer.\n");
/* Disconnected mode, try again after T200 */
return ev;
} else {
-@@ -830,21 +1602,148 @@
+@@ -830,21 +1614,153 @@
pri_message(pri, "-- Ignoring unsolicited DM with p/f set to 0\n");
#if 0
/* Requesting that we start */
+ }
+ break;
+ case Q921_TEI_ID_REMOVE:
-+ pri_error(pri, "TEI remove TEI = %d\n",(h->u.data[4] >> 1));
+ if (pri->localtype != BRI_CPE_PTMP)
+ break;
+ if (((h->u.data[4] >> 1) == Q921_TEI_GROUP) || (pri->tei == (h->u.data[4] >> 1))){
case 2:
if (pri->debug & PRI_DEBUG_Q921_STATE)
pri_message(pri, "-- Got Disconnect from peer.\n");
++#ifndef RELAX_TRB
+ if (pri->q921_state[teio] != Q921_LINK_CONNECTION_ESTABLISHED) {
+ q921_send_dm(pri, 1, h->h.tei);
+ return NULL;
+ }
++#endif
/* Acknowledge */
- q921_send_ua(pri, h->u.p_f);
- ev = q921_dchannel_down(pri);
- q921_start(pri, 0);
+ q921_send_ua(pri, h->u.p_f, h->h.tei);
+ ev = q921_dchannel_down(pri, h->h.tei);
-+#ifndef LAYER2ALWAYSUP
+ if ((pri->localtype == BRI_CPE_PTMP) || (pri->localtype == BRI_CPE) || (pri->localtype == BRI_NETWORK)) {
++#ifndef LAYER2ALWAYSUP
+ /* release layer 2 */
+ return NULL;
++#else
++ /* keep layer 2 up */
++ if (pri->t203_timer[teio])
++ pri_schedule_del(pri, pri->t203_timer[teio]);
++ pri->t203_timer[teio] = 0;
++ q921_send_sabme(pri, 1, pri->tei);
++#endif
+ }
+ if ((pri->localtype == PRI_NETWORK) || (pri->localtype == PRI_CPE)){
-+#endif
+ q921_start(pri, 0, 0);
-+#ifndef LAYER2ALWAYSUP
+ }
-+#endif
return ev;
case 3:
if (h->u.m2 == 3) {
-@@ -866,17 +1765,28 @@
+@@ -866,17 +1782,28 @@
}
}
/* Send Unnumbered Acknowledgement */
} else
pri_error(pri, "!! Weird frame received (m3=3, m2 = %d)\n", h->u.m2);
break;
-@@ -901,19 +1811,42 @@
+@@ -901,19 +1828,42 @@
/* Discard FCS */
len -= 2;
#ifdef PROCESS_SUBCHANNELS
/* If it's not us, try any subchannels we have */
if (pri->subchannel)
-@@ -921,10 +1854,16 @@
+@@ -921,10 +1871,16 @@
else
#endif
return NULL;
return ev;
}
-@@ -938,14 +1877,58 @@
+@@ -938,14 +1894,58 @@
return e;
}
}
diff -urN libpri-1.2.3.orig/q931.c libpri-1.2.3/q931.c
--- libpri-1.2.3.orig/q931.c 2006-04-27 18:08:39.000000000 +0200
-+++ libpri-1.2.3/q931.c 2006-06-13 10:53:33.000000000 +0200
++++ libpri-1.2.3/q931.c 2006-08-01 10:55:05.000000000 +0200
@@ -1,10 +1,12 @@
/*
* libpri: An implementation of Primary Rate ISDN
c->ourcallstate = Q931_CALL_STATE_CALL_RECEIVED;
c->peercallstate = Q931_CALL_STATE_CALL_DELIVERED;
+ c->alert = 1;
-+ c->alive = 1;
+ c->alive = 1;
+- return send_message(pri, c, Q931_ALERTING, alerting_ies);
+ if ((pri->localtype == PRI_NETWORK) || (pri->localtype == PRI_CPE)) {
+ return send_message(pri, c, Q931_ALERTING, alerting_ies);
+ } else {
+int q931_retrieve_reject(struct pri *pri, q931_call *c)
+{
+ return send_message(pri, c, Q931_RETRIEVE_REJECT, retrieve_reject_ies);
-+}
-+
+ }
+
+-static int connect_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 };
+static int suspend_acknowledge_ies[] = { Q931_DISPLAY, -1 };
+
+int q931_suspend_acknowledge(struct pri *pri, q931_call *c, char *display)
+ c->channelno = channel;
+ c->chanflags &= ~FLAG_PREFERRED;
+ c->chanflags |= FLAG_EXCLUSIVE;
- c->alive = 1;
-- return send_message(pri, c, Q931_ALERTING, alerting_ies);
++ c->alive = 1;
+ c->ourcallstate = Q931_CALL_STATE_ACTIVE;
+ c->peercallstate = Q931_CALL_STATE_ACTIVE;
+ strncpy(tempcallername,c->callername,sizeof(tempcallername));
+ res = send_message(pri, c, Q931_RESUME_ACKNOWLEDGE, resume_acknowledge_ies);
+ strncpy(c->callername,tempcallername,sizeof(c->callername));
+ return res;
- }
-
--static int connect_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 };
++}
++
+
+static int connect_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, Q931_DISPLAY, -1 };
+static int connect_NET_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, Q931_IE_TIME_DATE, -1 };
if (channel) {
c->ds1no = (channel & 0xff00) >> 8;
c->ds1explicit = (channel & 0x10000) >> 16;
-@@ -2566,12 +3348,40 @@
- c->progressmask = PRI_PROG_CALLED_NOT_ISDN;
- } else
- c->progressmask = 0;
-+c->progressmask = PRI_PROG_INBAND_AVAILABLE;
+@@ -2569,9 +3351,39 @@
c->ourcallstate = Q931_CALL_STATE_OVERLAP_RECEIVING;
c->peercallstate = Q931_CALL_STATE_OVERLAP_SENDING;
c->alive = 1;
+ pri->ev.hangup.channel = c->channelno;
+ pri->ev.hangup.cref = c->cr;
+ pri->ev.hangup.aoc_units = -1;
-+// pri->ev.hangup.cause = c->cause;
-+ pri->ev.hangup.cause = PRI_CAUSE_SWITCH_CONGESTION;
++ if (c->cause == -1) {
++ pri->ev.hangup.cause = PRI_CAUSE_SWITCH_CONGESTION;
++ } else {
++ pri->ev.hangup.cause = c->cause;
++ }
+ pri->ev.hangup.call = c;
+ q931_hangup(pri, c, c->cause);
+}
static void pri_connect_timeout(void *data)
{
struct q931_call *c = data;
-@@ -2624,6 +3434,7 @@
+@@ -2624,6 +3436,7 @@
int q931_connect(struct pri *pri, q931_call *c, int channel, int nonisdn)
{
if (channel) {
c->ds1no = (channel & 0xff00) >> 8;
c->ds1explicit = (channel & 0x10000) >> 16;
-@@ -2638,22 +3449,37 @@
+@@ -2638,22 +3451,37 @@
c->progressmask = PRI_PROG_CALLED_NOT_ISDN;
} else
c->progressmask = 0;
c->ourcallstate = Q931_CALL_STATE_RELEASE_REQUEST;
/* c->peercallstate stays the same */
if (c->alive) {
-@@ -2669,7 +3495,14 @@
+@@ -2669,7 +3497,14 @@
} else {
c->retranstimer = pri_schedule_event(pri, pri->timers[PRI_TIMER_T308], pri_release_finaltimeout, c);
}
} else
return send_message(pri, c, Q931_RELEASE_COMPLETE, release_ies); /* Yes, release_ies, not release_complete_ies */
} else
-@@ -2681,7 +3514,7 @@
+@@ -2681,7 +3516,7 @@
int q931_restart(struct pri *pri, int channel)
{
struct q931_call *c;
if (!c)
return -1;
if (!channel)
-@@ -2698,10 +3531,12 @@
+@@ -2698,10 +3533,12 @@
return send_message(pri, c, Q931_RESTART, restart_ies);
}
c->ourcallstate = Q931_CALL_STATE_DISCONNECT_REQUEST;
c->peercallstate = Q931_CALL_STATE_DISCONNECT_INDICATION;
if (c->alive) {
-@@ -2713,14 +3548,27 @@
+@@ -2713,14 +3550,27 @@
if (c->retranstimer)
pri_schedule_del(pri, c->retranstimer);
c->retranstimer = pri_schedule_event(pri, pri->timers[PRI_TIMER_T305], pri_disconnect_timeout, c);
static int gr303_setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, -1 };
static int cis_setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_CALLED_PARTY_NUMBER, -1 };
-@@ -2728,7 +3576,12 @@
+@@ -2728,7 +3578,12 @@
int q931_setup(struct pri *pri, q931_call *c, struct pri_sr *req)
{
int res;
c->transcapability = req->transmode;
c->transmoderate = TRANS_MODE_64_CIRCUIT;
-@@ -2753,6 +3606,7 @@
+@@ -2753,6 +3608,7 @@
c->chanflags = FLAG_EXCLUSIVE;
else if (c->channelno)
c->chanflags = FLAG_PREFERRED;
if (req->caller) {
libpri_copy_string(c->callernum, req->caller, sizeof(c->callernum));
c->callerplan = req->callerplan;
-@@ -2812,14 +3666,19 @@
+@@ -2812,14 +3668,19 @@
res = send_message(pri, c, Q931_SETUP, gr303_setup_ies);
else if (c->justsignalling)
res = send_message(pri, c, Q931_SETUP, cis_setup_ies);
}
return res;
-@@ -2835,7 +3694,11 @@
+@@ -2835,7 +3696,11 @@
if (cause > -1) {
c->cause = cause;
c->causecode = CODE_CCITT;
/* release_ies has CAUSE in it */
res = send_message(pri, c, Q931_RELEASE_COMPLETE, release_ies);
} else
-@@ -2860,6 +3723,117 @@
+@@ -2860,6 +3725,125 @@
return 0;
}
+ }
+
+ // if all phones have signalled busy AND the timer is not running anymore!
++#ifdef FASTBUSYONBUSY
++ if ((c->cause == PRI_CAUSE_USER_BUSY) && (c->t303timer)) {
++ c->t303running = 0;
++ pri_schedule_del(pri, c->t303timer);
++ }
++#endif
++
+ if ((left==0) && (c->cause == PRI_CAUSE_USER_BUSY) && (c->t303running == 0)) {
+ // pri_error(pri, "q921_handle_hangup(%d, %d, %d)\n", c->cr, tei, c->tei);
+ // make sure * frees the channel
+ pri->ev.hangup.channel = c->channelno | (c->ds1no << 8);
+ pri->ev.hangup.cref = c->cr;
+ pri->ev.hangup.call = c;
++ pri->ev.hangup.aoc_units = 0;
+ pri->ev.e = PRI_EVENT_HANGUP;
+ }
+ return res;
int q931_hangup(struct pri *pri, q931_call *c, int cause)
{
int disconnect = 1;
-@@ -2871,7 +3845,7 @@
+@@ -2871,7 +3855,7 @@
/* If mandatory IE was missing, insist upon that cause code */
if (c->cause == PRI_CAUSE_MANDATORY_IE_MISSING)
cause = c->cause;
/* We'll send RELEASE_COMPLETE with these causes */
disconnect = 0;
release_compl = 1;
-@@ -2885,7 +3859,7 @@
+@@ -2885,7 +3869,7 @@
case Q931_CALL_STATE_NULL:
if (c->peercallstate == Q931_CALL_STATE_NULL)
/* free the resources if we receive or send REL_COMPL */
else if (c->peercallstate == Q931_CALL_STATE_RELEASE_REQUEST)
q931_release_complete(pri,c,cause);
break;
-@@ -2911,6 +3885,11 @@
+@@ -2911,6 +3895,11 @@
/* received SETUP_ACKNOWLEDGE */
/* send DISCONNECT in general */
if (c->peercallstate != Q931_CALL_STATE_NULL && c->peercallstate != Q931_CALL_STATE_DISCONNECT_REQUEST && c->peercallstate != Q931_CALL_STATE_DISCONNECT_INDICATION && c->peercallstate != Q931_CALL_STATE_RELEASE_REQUEST && c->peercallstate != Q931_CALL_STATE_RESTART_REQUEST && c->peercallstate != Q931_CALL_STATE_RESTART) {
if (disconnect)
q931_disconnect(pri,c,cause);
else if (release_compl)
-@@ -2926,8 +3905,14 @@
+@@ -2926,8 +3915,14 @@
break;
case Q931_CALL_STATE_DISCONNECT_INDICATION:
/* received DISCONNECT */
q931_release(pri,c,cause);
}
break;
-@@ -2941,19 +3926,17 @@
+@@ -2941,19 +3936,17 @@
pri_error(pri, "q931_hangup shouldn't be called in this state, ourstate %s, peerstate %s\n",callstate2str(c->ourcallstate),callstate2str(c->peercallstate));
break;
default:
q931_call *c;
q931_ie *ie;
unsigned int x;
-@@ -2965,6 +3948,7 @@
+@@ -2965,6 +3958,7 @@
int codeset, cur_codeset;
int last_ie[8];
struct apdu_event *cur = NULL;
memset(last_ie, 0, sizeof(last_ie));
if (pri->debug & PRI_DEBUG_Q931_DUMP)
-@@ -2978,13 +3962,13 @@
+@@ -2978,13 +3972,13 @@
KLUDGE this by changing byte 4 from a 0xf (SERVICE)
to a 0x7 (SERVICE ACKNOWLEDGE) */
h->raw[h->crlen + 2] -= 0x8;
if (!c) {
pri_error(pri, "Unable to locate call %d\n", q931_cr(h));
return -1;
-@@ -3007,6 +3991,7 @@
+@@ -3007,6 +4001,7 @@
case Q931_SETUP:
if (pri->debug & PRI_DEBUG_Q931_STATE)
pri_message(pri, "-- Processing Q.931 Call Setup\n");
c->channelno = -1;
c->slotmap = -1;
c->chanflags = 0;
-@@ -3027,28 +4012,44 @@
+@@ -3027,28 +4022,44 @@
c->callername[0] = '\0';
c->callerani[0] = '\0';
c->callerplanani = -1;
c->progress = -1;
c->progressmask = 0;
break;
-@@ -3059,20 +4060,22 @@
+@@ -3059,20 +4070,22 @@
break;
case Q931_RELEASE:
case Q931_DISCONNECT:
case Q931_STATUS:
c->cause = -1;
c->causecode = -1;
-@@ -3089,22 +4092,32 @@
+@@ -3089,22 +4102,32 @@
case Q931_STATUS_ENQUIRY:
break;
case Q931_SETUP_ACKNOWLEDGE:
case Q931_SUSPEND_ACKNOWLEDGE:
case Q931_SUSPEND_REJECT:
pri_error(pri, "!! Not yet handling pre-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
-@@ -3113,7 +4126,7 @@
+@@ -3113,7 +4136,7 @@
pri_error(pri, "!! Don't know how to post-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
q931_status(pri,c, PRI_CAUSE_MESSAGE_TYPE_NONEXIST);
if (c->newcall)
return -1;
}
memset(mandies, 0, sizeof(mandies));
-@@ -3193,12 +4206,19 @@
+@@ -3193,12 +4216,19 @@
missingmand = 0;
for (x=0;x<MAX_MAND_IES;x++) {
if (mandies[x]) {
}
}
-@@ -3207,7 +4227,7 @@
+@@ -3207,7 +4237,7 @@
case Q931_RESTART:
if (missingmand) {
q931_status(pri, c, PRI_CAUSE_MANDATORY_IE_MISSING);
break;
}
c->ourcallstate = Q931_CALL_STATE_RESTART;
-@@ -3225,6 +4245,7 @@
+@@ -3225,6 +4255,7 @@
}
/* Must be new call */
if (!c->newcall) {
break;
}
if (c->progressmask & PRI_PROG_CALLER_NOT_ISDN)
-@@ -3242,16 +4263,20 @@
+@@ -3242,16 +4273,20 @@
pri->ev.ring.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
pri->ev.ring.callingpres = c->callerpres;
pri->ev.ring.callingplan = c->callerplan;
libpri_copy_string(pri->ev.ring.origcalledname, c->origcalledname, sizeof(pri->ev.ring.origcalledname));
libpri_copy_string(pri->ev.ring.origcallednum, c->origcallednum, sizeof(pri->ev.ring.origcallednum));
libpri_copy_string(pri->ev.ring.redirectingnum, c->redirectingnum, sizeof(pri->ev.ring.redirectingnum));
-@@ -3261,11 +4286,13 @@
+@@ -3261,11 +4296,13 @@
pri->ev.ring.redirectingreason = c->redirectingreason;
pri->ev.ring.origredirectingreason = c->origredirectingreason;
pri->ev.ring.flexible = ! (c->chanflags & FLAG_EXCLUSIVE);
pri->ev.ring.redirectingreason = c->redirectingreason;
pri->ev.ring.progress = c->progress;
pri->ev.ring.progressmask = c->progressmask;
-@@ -3275,6 +4302,9 @@
+@@ -3275,6 +4312,9 @@
q931_release_complete(pri,c,PRI_CAUSE_INVALID_CALL_REFERENCE);
break;
}
c->ourcallstate = Q931_CALL_STATE_CALL_DELIVERED;
c->peercallstate = Q931_CALL_STATE_CALL_RECEIVED;
pri->ev.e = PRI_EVENT_RINGING;
-@@ -3295,17 +4325,24 @@
+@@ -3295,17 +4335,24 @@
q931_status(pri, c, PRI_CAUSE_WRONG_MESSAGE);
break;
}
if (c->justsignalling) { /* Make sure WE release when we initiatie a signalling only connection */
q931_release(pri, c, PRI_CAUSE_NORMAL_CLEARING);
break;
-@@ -3313,23 +4350,43 @@
+@@ -3313,23 +4360,43 @@
return Q931_RES_HAVEEVENT;
case Q931_FACILITY:
if (c->newcall) {
break;
}
pri->ev.e = PRI_EVENT_PROGRESS;
-@@ -3347,6 +4404,11 @@
+@@ -3347,6 +4414,11 @@
q931_status(pri,c,PRI_CAUSE_WRONG_MESSAGE);
break;
}
pri->ev.proceeding.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
if (mh->msg == Q931_CALL_PROCEEDING) {
pri->ev.e = PRI_EVENT_PROCEEDING;
-@@ -3364,16 +4426,21 @@
+@@ -3364,16 +4436,21 @@
break;
}
if (c->ourcallstate != Q931_CALL_STATE_CONNECT_REQUEST) {
break;
}
if (c->newcall) {
-@@ -3410,31 +4477,69 @@
+@@ -3410,31 +4487,70 @@
if (res)
return res;
}
- break;
+ if (c->peercallstate != c->sugcallstate) {
+ pri_error(pri, "updating callstate, peercallstate %d to %d\n", c->peercallstate, c->sugcallstate);
-+ c->peercallstate = c->sugcallstate;
++// c->peercallstate = c->sugcallstate;
++ c->ourcallstate = c->sugcallstate;
+ if (c->sugcallstate != Q931_CALL_STATE_ACTIVE) {
+ /* pass hangup to upper layer! */
+ if (c->alive) {
break;
case Q931_RELEASE:
if (missingmand) {
-@@ -3450,6 +4555,7 @@
+@@ -3450,6 +4566,7 @@
pri->ev.e = PRI_EVENT_HANGUP;
pri->ev.hangup.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
pri->ev.hangup.cref = c->cr;
pri->ev.hangup.cause = c->cause;
pri->ev.hangup.call = c;
pri->ev.hangup.aoc_units = c->aoc_units;
-@@ -3478,9 +4584,16 @@
+@@ -3478,9 +4595,16 @@
pri->ev.e = PRI_EVENT_HANGUP_REQ;
pri->ev.hangup.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
pri->ev.hangup.cref = c->cr;
if (c->alive)
return Q931_RES_HAVEEVENT;
else
-@@ -3511,7 +4624,7 @@
+@@ -3511,7 +4635,7 @@
pri->ev.e = PRI_EVENT_INFO_RECEIVED;
pri->ev.ring.call = c;
pri->ev.ring.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
libpri_copy_string(pri->ev.ring.callingsubaddr, c->callingsubaddr, sizeof(pri->ev.ring.callingsubaddr));
pri->ev.ring.complete = c->complete; /* this covers IE 33 (Sending Complete) */
return Q931_RES_HAVEEVENT;
-@@ -3531,7 +4644,6 @@
+@@ -3531,7 +4655,6 @@
pri->ev.e = PRI_EVENT_SETUP_ACK;
pri->ev.setup_ack.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
pri->ev.setup_ack.call = c;
cur = c->apdus;
while (cur) {
if (!cur->sent && cur->message == Q931_FACILITY) {
-@@ -3547,19 +4659,53 @@
+@@ -3547,19 +4670,53 @@
pri->ev.notify.channel = c->channelno;
pri->ev.notify.info = c->notify;
return Q931_RES_HAVEEVENT;
case Q931_SUSPEND_ACKNOWLEDGE:
case Q931_SUSPEND_REJECT:
pri_error(pri, "!! Not yet handling post-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
-@@ -3569,7 +4715,7 @@
+@@ -3569,7 +4726,7 @@
pri_error(pri, "!! Don't know how to post-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
q931_status(pri,c, PRI_CAUSE_MESSAGE_TYPE_NONEXIST);
if (c->newcall)